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

修改问题文档

... ... @@ -287,19 +287,19 @@ class Goods extends Frontend
$insurance = '2';
$store = $storeModel->findData(['id'=>$vo['store_id']]);
$store_user = $userModel->findData(['id'=>$store['user_id']]);
if($store['is_svip'] == '1' || in_array($param['province_id'],$store_user['province_ids'])){
if($store['is_svip'] == '1' || in_array($param['province_id'],$store['province_ids'])){
$insurance = '1';
}
$data[$key]['insurance'] = $insurance;
//当前用户若不是会员加密部分信息
// if($encrypt == '2'){
if($encrypt == '2'){
$text = '';
if(empty($user_id)){
$text = "(请您先登录)";
$data[$key]['store_phone'] = "***********$text";
$data[$key]['store_address'] = "***********$text";
}
// }
$data[$key]['store_phone'] = "***********$text";
$data[$key]['store_address'] = "***********$text";
}
//计算平均分
$score_count = $evaluateModel->where(['goods_id'=>$vo['id']])->count();
$score_sum = $evaluateModel->where(['goods_id'=>$vo['id']])->sum('level');
... ...
... ... @@ -44,7 +44,7 @@ class Shop extends Frontend
$is_collect = "1";
}
$userModel = new \app\index\model\User();
$user = $userModel->findData(['id'=>$user_id]);
$user = $userModel->findData(['id'=>$data['user_id']]);
if(!empty($user)){
$province_ids = [];
if($user['province_ids']) {
... ...