|
@@ -499,8 +499,9 @@ class Usercenter extends Api
|
|
|
}
|
|
|
|
|
|
//验证金额
|
|
|
- $wallet_info = Db::name('user_wallet')->where(['user_id' => $this->auth->id])->find();
|
|
|
- if ($wallet_info['vip_endtime'] >= time()) { //会员
|
|
|
+ $wallet_info = Db::name('user_wallet')->where('user_id',$this->auth->id)->find();
|
|
|
+ $is_vip = $this->is_vip($wallet_info['vip_endtime'],$wallet_info['vip_level']);
|
|
|
+ if ($is_vip) { //会员
|
|
|
$price = $to_user_info['chat_price'];//config('site.typing_min_price'); //扣费金币
|
|
|
//获取折扣
|
|
|
$vip_chat_discount = config('site.vip_chat_discount');
|
|
@@ -623,8 +624,9 @@ $resArray['money'] = $money; //返回给前端的计算结果
|
|
|
$this->error('同性不能聊天~');
|
|
|
}
|
|
|
//验证金额
|
|
|
- $wallet_info = Db::name('user_wallet')->where(['user_id' => $this->auth->id])->find();
|
|
|
- if ($wallet_info['vip_endtime'] >= time()) { //会员
|
|
|
+ $wallet_info = Db::name('user_wallet')->where('user_id',$this->auth->id)->find();
|
|
|
+ $is_vip = $this->is_vip($wallet_info['vip_endtime'],$wallet_info['vip_level']);
|
|
|
+ if ($is_vip) { //会员
|
|
|
$price = $to_user_info['voice_price'];//config('site.video_min_price'); //扣费金币
|
|
|
//获取折扣
|
|
|
$vip_video_discount = config('site.vip_video_discount');
|
|
@@ -796,8 +798,9 @@ $resArray['money'] = $money; //返回给前端的计算结果
|
|
|
}*/
|
|
|
|
|
|
//验证金额
|
|
|
- $wallet_info = Db::name('user_wallet')->where(['user_id' => $this->auth->id])->find();
|
|
|
- if ($wallet_info['vip_endtime'] >= time()) { //会员
|
|
|
+ $wallet_info = Db::name('user_wallet')->where('user_id',$this->auth->id)->find();
|
|
|
+ $is_vip = $this->is_vip($wallet_info['vip_endtime'],$wallet_info['vip_level']);
|
|
|
+ if ($is_vip) { //会员
|
|
|
$price = $to_user_info['video_price'];//config('site.video_min_price'); //扣费金币
|
|
|
//获取折扣
|
|
|
$vip_video_discount = config('site.vip_video_discount');
|