From 9fb683f42e59c5bccacbd5c0e682997091c926e2 Mon Sep 17 00:00:00 2001 From: devil_gong Date: Wed, 28 Aug 2019 10:40:52 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=88=97=E8=A1=A8=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/index/view/default/search/content.html | 4 +++- application/service/UserService.php | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/application/index/view/default/search/content.html b/application/index/view/default/search/content.html index 0481c4de1..4078ddea4 100644 --- a/application/index/view/default/search/content.html +++ b/application/index/view/default/search/content.html @@ -28,7 +28,9 @@

{{$v.title}}

- ¥{{$v.original_price}} + {{if isset($v['original_price']) and $v['original_price'] gt 0}} + ¥{{$v.original_price}} + {{/if}} 销量 {{$v.sales_count}}

diff --git a/application/service/UserService.php b/application/service/UserService.php index 081592728..f35145a8f 100755 --- a/application/service/UserService.php +++ b/application/service/UserService.php @@ -159,7 +159,7 @@ class UserService $v['upd_time'] = date('Y-m-d H:i:s', $v['upd_time']); // 性别 - $v['gender_text'] = $common_gender_list[$v['gender']]['name']; + $v['gender_text'] = isset($common_gender_list[$v['gender']]) ? $common_gender_list[$v['gender']]['name'] : '未知'; // 状态 $v['status_text'] = $common_user_status_list[$v['status']]['name'];