master
wangxinglong 2022-03-10 10:37:47 +08:00
parent 650079dcf2
commit e4618f9555
2 changed files with 14 additions and 9 deletions

View File

@ -150,7 +150,6 @@ class User extends Base
public function getUserCenterInfo() public function getUserCenterInfo()
{ {
$accountId = $this->request->user['user_id'] ?? 0; $accountId = $this->request->user['user_id'] ?? 0;
try { try {
$accountRepo = AccountRepository::getInstance(); $accountRepo = AccountRepository::getInstance();
$couponRepo = CouponRepository::getInstance(); $couponRepo = CouponRepository::getInstance();
@ -185,7 +184,7 @@ class User extends Base
// 商家优惠卷情况统计 // 商家优惠卷情况统计
'couponCountList' => $busRepo->getCountBusinessOnShelf($account['business']['code'], 29), 'couponCountList' => $busRepo->getCountBusinessOnShelf($account['business']['code'], 29),
], ],
"alertMoney"=>config("wechat.balance"), "alertMoney"=>config("wechat.balance") ?? 300,
"redPrice"=>CouponRepository::getInstance()->getUserRedPrice( $account['user_code']), "redPrice"=>CouponRepository::getInstance()->getUserRedPrice( $account['user_code']),
]; ];
@ -194,13 +193,13 @@ class User extends Base
// 用户领取的优惠卷总数量 // 用户领取的优惠卷总数量
$couponCount = $couponRepo->getModel()::getCountByWhere(['consumer_code' => $account['user_code']]); $couponCount = $couponRepo->getModel()::getCountByWhere(['consumer_code' => $account['user_code']]);
$personalRes = [ $personalRes = [
'avatar' => File::convertCompleteFileUrl($account['avatar_url']), 'avatar' => File::convertCompleteFileUrl($account['avatar_url']),
'nickName' => $account['nick_name'], 'nickName' => $account['nick_name'],
'userType' => $account['type'], 'userType' => $account['type'],
'userTypeDes' => Account::accountTypeDescList()[$account['type']] ?? '游客', 'userTypeDes' => Account::accountTypeDescList()[$account['type']] ?? '游客',
'couponCount' => $couponCount, 'couponCount' => $couponCount,
"alertMoney"=>config("wechat.balance"), "alertMoney" => config("wechat.balance")?? 300,
"redPrice"=>CouponRepository::getInstance()->getUserRedPrice( $account['user_code']), "redPrice" => CouponRepository::getInstance()->getUserRedPrice( $account['user_code']),
]; ];
@ -244,7 +243,7 @@ class User extends Base
$personalRes['business']["state"] = $account['business']['state']; $personalRes['business']["state"] = $account['business']['state'];
$personalRes['business']["reason"] = $account['business']['reason']; $personalRes['business']["reason"] = $account['business']['reason'];
} }
$personalRes['refundCustomerService'] = config("wechat.refundCustomerService")?? '';
return $this->json(0, 'success', $personalRes); return $this->json(0, 'success', $personalRes);
} }

View File

@ -196,7 +196,13 @@
</div> </div>
<div class="layui-form-item layui-form-item-lg ">
<label class="layui-form-label">个人中心-联系客服</label>
<div class="layui-input-inline">
<input class="layui-input" type="text" name="refundCustomerService" value="{$item.refundCustomerService ?? ''}"/>
</div>
<div class="layui-form-mid layui-word-aux">请输入电话或者微信号 用于小程序端用户复制</div>
</div>
<div class="layui-form-item layui-form-item-lg layui-hide"> <div class="layui-form-item layui-form-item-lg layui-hide">
<label class="layui-form-label">评论人工审核可见</label> <label class="layui-form-label">评论人工审核可见</label>