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

合并分支 'wxg' 到 'master'

调试购买vip



查看合并请求 !16
@@ -107,7 +107,7 @@ class WechatPay extends HomeBase @@ -107,7 +107,7 @@ class WechatPay extends HomeBase
107 }else{ 107 }else{
108 $vip_passtime = time() + 365*24*60*60; 108 $vip_passtime = time() + 365*24*60*60;
109 } 109 }
110 - $userModel->updateData(['vip_passtime'=>$vip_passtime,'province_ids'=>$data['province_ids']]); 110 + $userModel->updateData(['vip_passtime'=>$vip_passtime,'province_ids'=>",".$data['province_ids'].","]);
111 }else if($data['vip_type'] == '2'){ 111 }else if($data['vip_type'] == '2'){
112 //超级会员 112 //超级会员
113 if($user['is_svip'] == '1'){ 113 if($user['is_svip'] == '1'){
@@ -13,21 +13,23 @@ class User extends Model @@ -13,21 +13,23 @@ class User extends Model
13 { 13 {
14 public function findData($where){ 14 public function findData($where){
15 $data = $this->where($where)->find(); 15 $data = $this->where($where)->find();
16 - //判断是否为会员  
17 - $is_vip = '2';  
18 - if(!empty($data['vip_passtime'])){  
19 - if($data['vip_passtime'] > time()){  
20 - $is_vip = "1"; 16 + if(!empty($data)){
  17 + //判断是否为会员
  18 + $is_vip = '2';
  19 + if(!empty($data['vip_passtime'])){
  20 + if($data['vip_passtime'] > time()){
  21 + $is_vip = "1";
  22 + }
21 } 23 }
22 - }  
23 - $is_svip = '2';  
24 - if(!empty($data['svip_passtime'])){  
25 - if($data['svip_passtime'] > time()){  
26 - $is_svip = "1"; 24 + $is_svip = '2';
  25 + if(!empty($data['svip_passtime'])){
  26 + if($data['svip_passtime'] > time()){
  27 + $is_svip = "1";
  28 + }
27 } 29 }
  30 + $data['is_vip'] = $is_vip;
  31 + $data['is_svip'] = $is_svip;
28 } 32 }
29 - $data['is_vip'] = $is_vip;  
30 - $data['is_svip'] = $is_svip;  
31 return $data; 33 return $data;
32 } 34 }
33 public function updateData($where,$data){ 35 public function updateData($where,$data){