正在显示
2 个修改的文件
包含
8 行增加
和
8 行删除
@@ -306,8 +306,8 @@ class Goods extends Frontend | @@ -306,8 +306,8 @@ class Goods extends Frontend | ||
306 | $data[$key]['insurance'] = $insurance; | 306 | $data[$key]['insurance'] = $insurance; |
307 | if(empty($user_id)){ | 307 | if(empty($user_id)){ |
308 | $text = "(请您先登录)"; | 308 | $text = "(请您先登录)"; |
309 | - $data[$key]['store_phone'] = "***********$text"; | ||
310 | - $data[$key]['store_address'] = "***********$text"; | 309 | + $data[$key]['store_phone'] = substr_replace($vo['store_phone'],'****',3,4).$text; |
310 | + $data[$key]['store_address'] = substr_replace($vo['store_phone'],'********',3).$text; | ||
311 | } | 311 | } |
312 | //当前用户若不是会员加密部分信息 | 312 | //当前用户若不是会员加密部分信息 |
313 | if($insurance == '2'){ | 313 | if($insurance == '2'){ |
@@ -315,8 +315,8 @@ class Goods extends Frontend | @@ -315,8 +315,8 @@ class Goods extends Frontend | ||
315 | if(empty($user_id)){ | 315 | if(empty($user_id)){ |
316 | $text = "(请您先登录)"; | 316 | $text = "(请您先登录)"; |
317 | } | 317 | } |
318 | - $data[$key]['store_phone'] = "***********$text"; | ||
319 | - $data[$key]['store_address'] = "***********$text"; | 318 | + $data[$key]['store_phone'] = substr_replace($vo['store_phone'],'****',3,4).$text; |
319 | + $data[$key]['store_address'] = substr_replace($vo['store_phone'],'********',3).$text; | ||
320 | } | 320 | } |
321 | //计算平均分 | 321 | //计算平均分 |
322 | $score_count = $evaluateModel->where(['goods_id'=>$vo['id']])->count(); | 322 | $score_count = $evaluateModel->where(['goods_id'=>$vo['id']])->count(); |
@@ -62,8 +62,8 @@ class Shop extends Frontend | @@ -62,8 +62,8 @@ class Shop extends Frontend | ||
62 | $data['is_collect'] = $is_collect; | 62 | $data['is_collect'] = $is_collect; |
63 | if(empty($user_id)){ | 63 | if(empty($user_id)){ |
64 | $text = "(请您先登录)"; | 64 | $text = "(请您先登录)"; |
65 | - $data['phone'] = "***********$text"; | ||
66 | - $data['address'] = "***********$text"; | 65 | + $data['phone'] = substr_replace($data['phone'],'****',3,4).$text; |
66 | + $data['address'] = substr_replace($data['address'],'********',3).$text; | ||
67 | } | 67 | } |
68 | //当前用户若不是会员加密部分信息 | 68 | //当前用户若不是会员加密部分信息 |
69 | if($encrypt == '2'){ | 69 | if($encrypt == '2'){ |
@@ -71,8 +71,8 @@ class Shop extends Frontend | @@ -71,8 +71,8 @@ class Shop extends Frontend | ||
71 | if(empty($user_id)){ | 71 | if(empty($user_id)){ |
72 | $text = "(请您先登录)"; | 72 | $text = "(请您先登录)"; |
73 | } | 73 | } |
74 | - $data['phone'] = "***********$text"; | ||
75 | - $data['address'] = "***********$text"; | 74 | + $data['phone'] = substr_replace($data['phone'],'****',3,4).$text; |
75 | + $data['address'] = substr_replace($data['address'],'********',3).$text; | ||
76 | } | 76 | } |
77 | $this->assign('data',$data); | 77 | $this->assign('data',$data); |
78 | // dump(collection($data)->toArray()); | 78 | // dump(collection($data)->toArray()); |
-
请 注册 或 登录 后发表评论