作者 王晓刚
1 个管道 的构建 通过 耗费 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);