作者 王晓刚
1 个管道 的构建 通过 耗费 0 秒

修改问题文档

... ... @@ -540,6 +540,17 @@ class Member extends Frontend
$province2 = $provinceModel->selectData([]);
$this->view->assign('province2',$province2);
$this->view->assign('province_ids',$user['province_ids']);
//这和svip价格
$user_province = Db::name('user_province')->where(['user_id'=>$this->auth->id,'expiration_time'=>['gt',time()]])->select();
$deduct_price = 0;
$ratio_price = $price['vipprice']/30;
foreach($user_province as $key => $u_p){
$ratio_day = ($u_p['expiration_time']-time())/(24*60*60);
$deduct_price = $deduct_price + $ratio_price*$ratio_day;
}
$svipprice = $price['svipprice']-$deduct_price;
$price['svipprice'] = $svipprice;
$this->assign('price',$price);
return $this->view->fetch();
}
... ...