From cc51eb41480ef469e1f971a3cd66bf7429039eeb Mon Sep 17 00:00:00 2001 From: sugar1569 Date: Tue, 2 Apr 2019 17:41:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=85=AC=E4=BC=97=E5=8F=B7?= =?UTF-8?q?=E7=A7=AF=E5=88=86=E8=AE=B0=E5=BD=95bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/wap/model/user/UserRecharge.php | 2 +- application/wap/model/user/UserSign.php | 2 +- application/wap/model/wap/ArticleCategory.php | 1 + application/wap/view/first/store/detail.html | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/application/wap/model/user/UserRecharge.php b/application/wap/model/user/UserRecharge.php index bde6c671..0aa8feba 100644 --- a/application/wap/model/user/UserRecharge.php +++ b/application/wap/model/user/UserRecharge.php @@ -51,7 +51,7 @@ class UserRecharge extends ModelBasic $user = User::getUserInfo($order['uid']); self::beginTrans(); $res1 = self::where('order_id',$order['order_id'])->update(['paid'=>1,'pay_time'=>time()]); - $res2 = UserBill::income('用户余额充值',$order['uid'],'now_money','recharge',$order['price'],$order['id'],$user['now_money'],'成功充值余额'.floatval($order['price']).'元'); + $res2 = UserBill::income('用户余额充值',$order['uid'],'now_money','recharge',$order['price'],$order['id'],bcadd($user['now_money'],$order['price'],2),'成功充值余额'.floatval($order['price']).'元'); $res3 = User::edit(['now_money'=>bcadd($user['now_money'],$order['price'],2)],$order['uid'],'uid'); $res = $res1 && $res2 && $res3; self::checkTrans($res); diff --git a/application/wap/model/user/UserSign.php b/application/wap/model/user/UserSign.php index ff6493ee..68b208b7 100644 --- a/application/wap/model/user/UserSign.php +++ b/application/wap/model/user/UserSign.php @@ -40,7 +40,7 @@ class UserSign $max = SystemConfigService::get('sx_sign_max_int')?:5; $integral = rand($min,$max); ModelBasic::beginTrans(); - $res1 = UserBill::income('用户签到',$uid,'integral','sign',$integral,0,$userInfo['integral'],'签到获得'.floatval($integral).'积分'); + $res1 = UserBill::income('用户签到',$uid,'integral','sign',$integral,0,bcadd($userInfo['integral'],$integral,2),'签到获得'.floatval($integral).'积分'); $res2 = User::bcInc($uid,'integral',$integral,'uid'); $res = $res1 && $res2; ModelBasic::checkTrans($res); diff --git a/application/wap/model/wap/ArticleCategory.php b/application/wap/model/wap/ArticleCategory.php index e0d768dd..3df9b886 100644 --- a/application/wap/model/wap/ArticleCategory.php +++ b/application/wap/model/wap/ArticleCategory.php @@ -20,6 +20,7 @@ class ArticleCategory extends ModelBasic public static function cidByArticleList($cid, $first, $limit, $field = '*') { + $model = new self(); $model = Db::name('article'); //if ($cid) $model->where("CONCAT(',',cid,',')", 'LIKE', "'%,$cid,%'"); if ($cid) $model->where('cid',$cid); diff --git a/application/wap/view/first/store/detail.html b/application/wap/view/first/store/detail.html index 4ce74404..dfd257ca 100644 --- a/application/wap/view/first/store/detail.html +++ b/application/wap/view/first/store/detail.html @@ -69,7 +69,7 @@

{$store.store_name}

-

已售{$store.ficti}

+

已售{$store.ficti+$store.sales}

¥{$store.price|floatval}