|
@@ -82,6 +82,19 @@ class Goods extends Frontend |
|
@@ -82,6 +82,19 @@ class Goods extends Frontend |
82
|
if(!empty($collect)){
|
82
|
if(!empty($collect)){
|
83
|
$is_collect = "1";
|
83
|
$is_collect = "1";
|
84
|
}
|
84
|
}
|
|
|
85
|
+ $userModel = new \app\index\model\User();
|
|
|
86
|
+ $encrypt = '2';
|
|
|
87
|
+ $user = $userModel->findData(['id'=>$user_id]);
|
|
|
88
|
+ if(!empty($user)){
|
|
|
89
|
+ if($user['is_svip'] == '1' || ($user['is_vip'] == '1' && in_array($user['province_id'],$user['province_ids']))){
|
|
|
90
|
+ $encrypt = '1';
|
|
|
91
|
+ }
|
|
|
92
|
+ }
|
|
|
93
|
+ //当前用户若不是会员加密部分信息
|
|
|
94
|
+ if($encrypt == '2'){
|
|
|
95
|
+ $data['store_phone'] = "***********";
|
|
|
96
|
+ $data['store_address'] = "***********";
|
|
|
97
|
+ }
|
85
|
}
|
98
|
}
|
86
|
$data['is_collect'] = $is_collect;
|
99
|
$data['is_collect'] = $is_collect;
|
87
|
//获取评论
|
100
|
//获取评论
|
|
@@ -250,6 +263,15 @@ class Goods extends Frontend |
|
@@ -250,6 +263,15 @@ class Goods extends Frontend |
250
|
}else{
|
263
|
}else{
|
251
|
$data = $data->select();
|
264
|
$data = $data->select();
|
252
|
}
|
265
|
}
|
|
|
266
|
+ $user_id = $this->auth->id;
|
|
|
267
|
+ $userModel = new \app\index\model\User();
|
|
|
268
|
+ $encrypt = '2';
|
|
|
269
|
+ $user = $userModel->findData(['id'=>$user_id]);
|
|
|
270
|
+ if(!empty($user)){
|
|
|
271
|
+ if($user['is_svip'] == '1' || ($user['is_vip'] == '1' && in_array($user['province_id'],$user['province_ids']))){
|
|
|
272
|
+ $encrypt = '1';
|
|
|
273
|
+ }
|
|
|
274
|
+ }
|
253
|
$storeModel = new Store();
|
275
|
$storeModel = new Store();
|
254
|
$evaluateModel = new Evaluate();
|
276
|
$evaluateModel = new Evaluate();
|
255
|
foreach($data as $key => $vo){
|
277
|
foreach($data as $key => $vo){
|
|
@@ -260,8 +282,8 @@ class Goods extends Frontend |
|
@@ -260,8 +282,8 @@ class Goods extends Frontend |
260
|
$insurance = '1';
|
282
|
$insurance = '1';
|
261
|
}
|
283
|
}
|
262
|
$data[$key]['insurance'] = $insurance;
|
284
|
$data[$key]['insurance'] = $insurance;
|
263
|
- //若不是会员加密部分信息
|
|
|
264
|
- if($insurance == '2'){
|
285
|
+ //当前用户若不是会员加密部分信息
|
|
|
286
|
+ if($encrypt == '2'){
|
265
|
$data[$key]['store_phone'] = "***********";
|
287
|
$data[$key]['store_phone'] = "***********";
|
266
|
$data[$key]['store_address'] = "***********";
|
288
|
$data[$key]['store_address'] = "***********";
|
267
|
}
|
289
|
}
|