...
|
...
|
@@ -82,6 +82,19 @@ class Goods extends Frontend |
|
|
if(!empty($collect)){
|
|
|
$is_collect = "1";
|
|
|
}
|
|
|
$userModel = new \app\index\model\User();
|
|
|
$encrypt = '2';
|
|
|
$user = $userModel->findData(['id'=>$user_id]);
|
|
|
if(!empty($user)){
|
|
|
if($user['is_svip'] == '1' || ($user['is_vip'] == '1' && in_array($user['province_id'],$user['province_ids']))){
|
|
|
$encrypt = '1';
|
|
|
}
|
|
|
}
|
|
|
//当前用户若不是会员加密部分信息
|
|
|
if($encrypt == '2'){
|
|
|
$data['store_phone'] = "***********";
|
|
|
$data['store_address'] = "***********";
|
|
|
}
|
|
|
}
|
|
|
$data['is_collect'] = $is_collect;
|
|
|
//获取评论
|
...
|
...
|
@@ -250,6 +263,15 @@ class Goods extends Frontend |
|
|
}else{
|
|
|
$data = $data->select();
|
|
|
}
|
|
|
$user_id = $this->auth->id;
|
|
|
$userModel = new \app\index\model\User();
|
|
|
$encrypt = '2';
|
|
|
$user = $userModel->findData(['id'=>$user_id]);
|
|
|
if(!empty($user)){
|
|
|
if($user['is_svip'] == '1' || ($user['is_vip'] == '1' && in_array($user['province_id'],$user['province_ids']))){
|
|
|
$encrypt = '1';
|
|
|
}
|
|
|
}
|
|
|
$storeModel = new Store();
|
|
|
$evaluateModel = new Evaluate();
|
|
|
foreach($data as $key => $vo){
|
...
|
...
|
@@ -260,8 +282,8 @@ class Goods extends Frontend |
|
|
$insurance = '1';
|
|
|
}
|
|
|
$data[$key]['insurance'] = $insurance;
|
|
|
//若不是会员加密部分信息
|
|
|
if($insurance == '2'){
|
|
|
//当前用户若不是会员加密部分信息
|
|
|
if($encrypt == '2'){
|
|
|
$data[$key]['store_phone'] = "***********";
|
|
|
$data[$key]['store_address'] = "***********";
|
|
|
}
|
...
|
...
|
|