diff --git a/application/store/controller/Member.php b/application/store/controller/Member.php index 9a51336c0..1a8af6600 100644 --- a/application/store/controller/Member.php +++ b/application/store/controller/Member.php @@ -47,15 +47,4 @@ class Member extends Controller $query->dateBetween('create_at')->order('id desc')->page(); } - /** - * 数据列表处理 - * @param array $data - */ - protected function _page_filter(&$data = []) - { - foreach ($data as &$vo) { - $vo['nickname'] = emoji_decode($vo['nickname']); - } - } - } diff --git a/application/store/controller/Order.php b/application/store/controller/Order.php index b91dc8806..c3c919f14 100644 --- a/application/store/controller/Order.php +++ b/application/store/controller/Order.php @@ -66,7 +66,6 @@ class Order extends Controller $vo['list'][] = $goods; } foreach ($memberList as $member) if ($member['id'] === $vo['mid']) { - $member['nickname'] = emoji_decode($member['nickname']); $vo['member'] = $member; } } diff --git a/application/store/controller/api/Member.php b/application/store/controller/api/Member.php index 5ab560fcd..90f2e3bd0 100644 --- a/application/store/controller/api/Member.php +++ b/application/store/controller/api/Member.php @@ -71,7 +71,6 @@ class Member extends Controller $where = ['id' => $this->mid, 'openid' => $this->openid]; $this->member = Db::name('StoreMember')->where($where)->find(); if (empty($this->member)) $this->error('无效的会员信息,请重新登录授权!'); - $this->member['nickname'] = emoji_decode($this->member['nickname']); // 会员当前已经领取次数 $where = [['mid', 'eq', $this->mid], ['status', 'in', ['2', '3', '4', '5']]]; $this->member['times_used'] = Db::name('StoreOrder')->where($where)->count(); diff --git a/application/store/controller/api/Wechat.php b/application/store/controller/api/Wechat.php index b9da1ea6c..c086174d6 100644 --- a/application/store/controller/api/Wechat.php +++ b/application/store/controller/api/Wechat.php @@ -75,7 +75,7 @@ class Wechat extends Controller data_save('StoreMember', [ 'openid' => $result['openId'], 'headimg' => $result['avatarUrl'], - 'nickname' => emoji_encode($result['nickName']), + 'nickname' => $result['nickName'], ], 'openid'); $result['member'] = Db::name('StoreMember')->where(['openid' => $result['openId']])->find(); $this->success('小程序加密数据解密成功!', $result); diff --git a/application/store/controller/api/member/Center.php b/application/store/controller/api/member/Center.php index d7fa46e02..bf461fb75 100644 --- a/application/store/controller/api/member/Center.php +++ b/application/store/controller/api/member/Center.php @@ -38,10 +38,10 @@ class Center extends Member $data['headimg'] = $this->request->post('headimg'); } if ($this->request->has('nickname', 'post', true)) { - $data['nickname'] = emoji_encode($this->request->post('nickname')); + $data['nickname'] = $this->request->post('nickname'); } if ($this->request->has('username', 'post', true)) { - $data['username'] = emoji_encode($this->request->post('username')); + $data['username'] = $this->request->post('username'); } if (empty($data)) $this->error('没有需要修改的数据哦!'); if (data_save('StoreMember', array_merge($data, ['id' => $this->mid]), 'id') !== false) { diff --git a/application/wechat/controller/Fans.php b/application/wechat/controller/Fans.php index e3bd6f959..ffb3ea6aa 100644 --- a/application/wechat/controller/Fans.php +++ b/application/wechat/controller/Fans.php @@ -64,9 +64,6 @@ class Fans extends Controller foreach (explode(',', $user['tagid_list']) as $tagid) { if (isset($tags[$tagid])) $user['tags'][] = $tags[$tagid]; } - foreach (['country', 'province', 'city', 'nickname', 'remark'] as $k) { - if (isset($user[$k])) $user[$k] = emoji_decode($user[$k]); - } } } diff --git a/application/wechat/service/FansService.php b/application/wechat/service/FansService.php index 0e17907b7..62bc8a844 100644 --- a/application/wechat/service/FansService.php +++ b/application/wechat/service/FansService.php @@ -41,9 +41,6 @@ class FansService if (isset($user['tagid_list']) && is_array($user['tagid_list'])) { $user['tagid_list'] = is_array($user['tagid_list']) ? join(',', $user['tagid_list']) : ''; } - foreach (['country', 'province', 'city', 'nickname', 'remark'] as $k) { - isset($user[$k]) && $user[$k] = emoji_encode($user[$k]); - } if ($appid !== '') $user['appid'] = $appid; unset($user['privilege'], $user['groupid']); return data_save('WechatFans', $user, 'openid'); @@ -59,10 +56,7 @@ class FansService */ public static function get($openid) { - $user = Db::name('WechatFans')->where(['openid' => $openid])->find(); - foreach (['country', 'province', 'city', 'nickname', 'remark'] as $k) { - isset($user[$k]) && $user[$k] = emoji_decode($user[$k]); - } + return Db::name('WechatFans')->where(['openid' => $openid])->find(); return $user; }