正在显示
1 个修改的文件
包含
4 行增加
和
0 行删除
@@ -559,6 +559,9 @@ class Member extends Frontend | @@ -559,6 +559,9 @@ class Member extends Frontend | ||
559 | $vipdesc_model = new Vipdesc(); | 559 | $vipdesc_model = new Vipdesc(); |
560 | $price = $price_model->where('id',1)->find(); | 560 | $price = $price_model->where('id',1)->find(); |
561 | $vipdesc = $vipdesc_model->where('id',1)->find(); | 561 | $vipdesc = $vipdesc_model->where('id',1)->find(); |
562 | + $userModel = new \app\index\model\User(); | ||
563 | + $user = $userModel->findData(['id'=>$this->auth->id]); | ||
564 | + if($user['svip_passtime'] < time()){ | ||
562 | //折合svip价格 | 565 | //折合svip价格 |
563 | $user_province = Db::name('user_province')->where(['user_id'=>$this->auth->id,'expiration_time'=>['gt',time()]])->select(); | 566 | $user_province = Db::name('user_province')->where(['user_id'=>$this->auth->id,'expiration_time'=>['gt',time()]])->select(); |
564 | $deduct_price = []; | 567 | $deduct_price = []; |
@@ -569,6 +572,7 @@ class Member extends Frontend | @@ -569,6 +572,7 @@ class Member extends Frontend | ||
569 | } | 572 | } |
570 | $svipprice = ($price['svipprice']-array_sum($deduct_price)) <= 0 ? 0 : ($price['svipprice']-array_sum($deduct_price)); | 573 | $svipprice = ($price['svipprice']-array_sum($deduct_price)) <= 0 ? 0 : ($price['svipprice']-array_sum($deduct_price)); |
571 | $price['svipprice'] = round($svipprice,2); | 574 | $price['svipprice'] = round($svipprice,2); |
575 | + } | ||
572 | $this->assign('price',$price); | 576 | $this->assign('price',$price); |
573 | $this->view->assign('price',$price); | 577 | $this->view->assign('price',$price); |
574 | $this->view->assign('vipdesc',$vipdesc); | 578 | $this->view->assign('vipdesc',$vipdesc); |
-
请 注册 或 登录 后发表评论