From 42088252c8936443900f7a7817ed2bea700bd5bf Mon Sep 17 00:00:00 2001
From: lihan <3398341942@qq.com>
Date: Wed, 7 Nov 2018 14:56:16 +0800
Subject: [PATCH] 赠送积分和角色管理

---
 app/friendship/controller/FriendController.php | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/app/friendship/controller/FriendController.php b/app/friendship/controller/FriendController.php
index 15023c6..a083e8b 100644
--- a/app/friendship/controller/FriendController.php
+++ b/app/friendship/controller/FriendController.php
@@ -31,17 +31,15 @@ class FriendController extends HomeBaseController
     public function friendList()
     {
         $request = request();
-        $list = [];
-        if ($request->isPost()) {
-            $keyword = $request->param('keyword');
-            if (!empty($keyword)) {
-                $where['mobile'] = ['like', "%$keyword%"];
-                $list = Db::name('user')
-                    ->field('id as friend_id,avatar,user_nickname')
-                    ->where($where)
-                    ->select()->toArray();
-            }
+        $where = [];
+        $keyword = $request->param('keyword');
+        if (!empty($keyword)) {
+            $where['mobile'] = ['like', "%$keyword%"];
         }
+        $list = Db::name('user')
+            ->field('id as friend_id,avatar,user_nickname')
+            ->where($where)
+            ->select()->toArray();
         if (!empty($list)) {
             return $this->fetch(':friend_list', [
                 'list' => $list
--
libgit2 0.24.0