正在显示
1 个修改的文件
包含
5 行增加
和
2 行删除
@@ -46,8 +46,11 @@ class Shop extends Frontend | @@ -46,8 +46,11 @@ class Shop extends Frontend | ||
46 | $userModel = new \app\index\model\User(); | 46 | $userModel = new \app\index\model\User(); |
47 | $user = $userModel->findData(['id'=>$user_id]); | 47 | $user = $userModel->findData(['id'=>$user_id]); |
48 | if(!empty($user)){ | 48 | if(!empty($user)){ |
49 | - $province_ids = explode(',',$user['province_ids']); | ||
50 | - if($user['is_svip'] == '1' || ($user['is_vip'] == '1' && $province_ids && in_array($province_id,$province_ids))){ | 49 | + $province_ids = []; |
50 | + if($user['province_ids']) { | ||
51 | + $province_ids = explode(',',$user['province_ids']); | ||
52 | + } | ||
53 | + if($user['is_svip'] == '1' || ($user['is_vip'] == '1' && in_array($province_id,$province_ids))){ | ||
51 | $encrypt = '1'; | 54 | $encrypt = '1'; |
52 | } | 55 | } |
53 | } | 56 | } |
-
请 注册 或 登录 后发表评论