From e4618f9555b9f841330aec675c0d8af675b1909f Mon Sep 17 00:00:00 2001 From: wangxinglong <2371974647@qq.com> Date: Thu, 10 Mar 2022 10:37:47 +0800 Subject: [PATCH] setter --- app/controller/api/User.php | 15 +++++++-------- view/manager/config/wechat.html | 8 +++++++- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/app/controller/api/User.php b/app/controller/api/User.php index 39d5235..7c9fd42 100644 --- a/app/controller/api/User.php +++ b/app/controller/api/User.php @@ -150,7 +150,6 @@ class User extends Base public function getUserCenterInfo() { $accountId = $this->request->user['user_id'] ?? 0; - try { $accountRepo = AccountRepository::getInstance(); $couponRepo = CouponRepository::getInstance(); @@ -185,7 +184,7 @@ class User extends Base // 商家优惠卷情况统计 'couponCountList' => $busRepo->getCountBusinessOnShelf($account['business']['code'], 29), ], - "alertMoney"=>config("wechat.balance"), + "alertMoney"=>config("wechat.balance") ?? 300, "redPrice"=>CouponRepository::getInstance()->getUserRedPrice( $account['user_code']), ]; @@ -194,13 +193,13 @@ class User extends Base // 用户领取的优惠卷总数量 $couponCount = $couponRepo->getModel()::getCountByWhere(['consumer_code' => $account['user_code']]); $personalRes = [ - 'avatar' => File::convertCompleteFileUrl($account['avatar_url']), - 'nickName' => $account['nick_name'], - 'userType' => $account['type'], + 'avatar' => File::convertCompleteFileUrl($account['avatar_url']), + 'nickName' => $account['nick_name'], + 'userType' => $account['type'], 'userTypeDes' => Account::accountTypeDescList()[$account['type']] ?? '游客', 'couponCount' => $couponCount, - "alertMoney"=>config("wechat.balance"), - "redPrice"=>CouponRepository::getInstance()->getUserRedPrice( $account['user_code']), + "alertMoney" => config("wechat.balance")?? 300, + "redPrice" => CouponRepository::getInstance()->getUserRedPrice( $account['user_code']), ]; @@ -244,7 +243,7 @@ class User extends Base $personalRes['business']["state"] = $account['business']['state']; $personalRes['business']["reason"] = $account['business']['reason']; } - + $personalRes['refundCustomerService'] = config("wechat.refundCustomerService")?? ''; return $this->json(0, 'success', $personalRes); } diff --git a/view/manager/config/wechat.html b/view/manager/config/wechat.html index 2f86b83..56d011f 100644 --- a/view/manager/config/wechat.html +++ b/view/manager/config/wechat.html @@ -196,7 +196,13 @@ - +