正在显示
1 个修改的文件
包含
11 行增加
和
0 行删除
@@ -540,6 +540,17 @@ class Member extends Frontend | @@ -540,6 +540,17 @@ class Member extends Frontend | ||
540 | $province2 = $provinceModel->selectData([]); | 540 | $province2 = $provinceModel->selectData([]); |
541 | $this->view->assign('province2',$province2); | 541 | $this->view->assign('province2',$province2); |
542 | $this->view->assign('province_ids',$user['province_ids']); | 542 | $this->view->assign('province_ids',$user['province_ids']); |
543 | + //这和svip价格 | ||
544 | + $user_province = Db::name('user_province')->where(['user_id'=>$this->auth->id,'expiration_time'=>['gt',time()]])->select(); | ||
545 | + $deduct_price = 0; | ||
546 | + $ratio_price = $price['vipprice']/30; | ||
547 | + foreach($user_province as $key => $u_p){ | ||
548 | + $ratio_day = ($u_p['expiration_time']-time())/(24*60*60); | ||
549 | + $deduct_price = $deduct_price + $ratio_price*$ratio_day; | ||
550 | + } | ||
551 | + $svipprice = $price['svipprice']-$deduct_price; | ||
552 | + $price['svipprice'] = $svipprice; | ||
553 | + $this->assign('price',$price); | ||
543 | return $this->view->fetch(); | 554 | return $this->view->fetch(); |
544 | } | 555 | } |
545 | 556 |
-
请 注册 或 登录 后发表评论