diff --git a/application/wap/controller/Store.php b/application/wap/controller/Store.php index 6d86cf12..9f056d05 100644 --- a/application/wap/controller/Store.php +++ b/application/wap/controller/Store.php @@ -224,75 +224,4 @@ class Store extends AuthController return $this->fetch(); } - public function cut_list(){ - $bargain = StoreBargain::getList(); - $bargain = StoreBargainUser::getUserList($bargain); - $bargainUser = StoreBargainUser::getBargainUserStatusSuccess(); - $this->assign([ - 'bargain'=>$bargain, - 'bargainUser'=>$bargainUser, - ]); - return $this->fetch(); - } - public function cut_con($id = 0,$bargainUid = 0){ - if(!$id) return $this->failed('参数错误'); - //砍价产品 - $bargain = StoreBargain::getBargainTerm($id); - $bargain['time'] = time(); - $description = htmlspecialchars_decode($bargain['description']); - $rule = isset($bargain['rule']) ? htmlspecialchars_decode($bargain['rule']) : ''; - if(!$bargainUid) - //判断当前登录人是不是砍价 - if(!StoreBargainUser::isBargainUser($id,$this->userInfo['uid'])) - // 参与砍价 - if(!StoreBargainUser::setBargain($id,$this->userInfo['uid'])) return $this->failed('参与失败,请重新参与砍价',Url::build('store/bargain')); - //顶部人数 - StoreBargain::addBargainLook($id); - $lookCount = StoreBargain::getBargainLook()['look'];//观看人数 - $shareCount = StoreBargain::getBargainShare()['share'];//观看人数 - //砍价 - $selfCut = 0; - if(!$bargainUid){ - $res = StoreBargainUserHelp::setBargainUserHelp($id,$bargainUid ? $bargainUid : $this->userInfo['uid'],$this->userInfo['uid']); - if($res) { - $selfCut = 1; - if(!StoreBargainUserHelp::getSurplusPrice($id,$bargainUid ? $bargainUid : $this->userInfo['uid'])){ - $bargainUserTableId = StoreBargainUser::getBargainUserTableId($id,$bargainUid ? $bargainUid : $this->userInfo['uid']); - $bargain = StoreBargain::where('id',$id)->find()->toArray(); - $bargainUser = StoreBargainUser::where('id',$bargainUserTableId)->find()->toArray(); - } - } - $userInfoBargain = $this->userInfo; - }else $userInfoBargain = User::getUserInfo($bargainUid); - //砍价帮 - $bargainUserTableId = StoreBargainUser::setUserBargain($id,$bargainUid ? $bargainUid : $this->userInfo['uid']); - $storeBargainUserHelp = StoreBargainUserHelp::getList($bargainUserTableId,15); - //获取砍价帮总人数 - $count = StoreBargainUserHelp::getBargainUserHelpPeopleCount($id,$bargainUid ? $bargainUid : $this->userInfo['uid']); - //获取用户还剩余的砍价金额 - $price = StoreBargainUserHelp::getSurplusPrice($id,$bargainUid ? $bargainUid : $this->userInfo['uid']); - //获取砍价进度条 - $pricePercent = StoreBargainUserHelp::getSurplusPricePercent($id,$bargainUid ? $bargainUid : $this->userInfo['uid']); - $selfCutPrice = bcsub(bcsub($bargain['price'],$price,2),$bargain['min_price'],2); - //判断当前登录人是否砍价 1 微砍价 2 已砍价 - $userInfoBargainBool = StoreBargainUserHelp::isBargainUserHelpCount($id,$bargainUid,$this->userInfo['uid']) ? 1 : 2; - $this->assign([ - 'userInfoBargainBool'=>$userInfoBargainBool, - 'selfCut'=>$selfCut, - 'userInfoBargain'=>$userInfoBargain, - 'selfCutPrice'=>$selfCutPrice, - 'bargain'=>$bargain, - 'description'=>$description, - 'rule'=>$rule, - 'shareCount'=>$shareCount, - 'lookCount'=>$lookCount, - 'userCount'=>StoreBargainUser::count(), - 'userHelpList'=>$storeBargainUserHelp, - 'count'=>$count, - 'price'=>$price, - 'pricePercent'=>$pricePercent, - 'bargainUid'=>$bargainUid, - ]); - return $this->fetch(); - } } \ No newline at end of file diff --git a/application/wap/view/first/index/index.html b/application/wap/view/first/index/index.html index 98eed54b..f5ff8b33 100644 --- a/application/wap/view/first/index/index.html +++ b/application/wap/view/first/index/index.html @@ -112,32 +112,6 @@ {/notempty} -
待付款
- - {gt name="orderStatusNum.noPink" value="0"} - {$orderStatusNum.noPink > 99 ? 99 : $orderStatusNum.noPink} - {/gt} -
- 团购中
- {gt name="orderStatusNum.noPostage" value="0"} {$orderStatusNum.noPostage > 99 ? 99 : $orderStatusNum.noPostage} diff --git a/application/wap/view/first/my/order_list.html b/application/wap/view/first/my/order_list.html index 79e76121..1b6052d4 100644 --- a/application/wap/view/first/my/order_list.html +++ b/application/wap/view/first/my/order_list.html @@ -14,7 +14,6 @@