From 19a63d7f50ad580506be421c580a1ee66a9a415d Mon Sep 17 00:00:00 2001 From: Anyon Date: Tue, 13 Oct 2020 14:29:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=B2=89=E4=B8=9D=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/data/controller/ShopOrder.php | 6 ++-- app/wechat/controller/Fans.php | 7 +++- app/wechat/view/fans/index_search.html | 46 ++++++++++++++++++++------ 3 files changed, 44 insertions(+), 15 deletions(-) diff --git a/app/data/controller/ShopOrder.php b/app/data/controller/ShopOrder.php index 413a6a526..1df1144fe 100644 --- a/app/data/controller/ShopOrder.php +++ b/app/data/controller/ShopOrder.php @@ -54,11 +54,11 @@ class ShopOrder extends Controller // 列表选项卡 if (is_numeric($this->type = trim(input('type', 'ta'), 't'))) $query->where(['status' => $this->type]); // 分页排序处理 + $query->order('id desc'); if (input('output') === 'json') { - $result = $query->order('id desc')->page(true, false); - $this->success('获取数据列表成功', $result); + $this->success('获取数据成功', $query->page(true, false)); } else { - $query->order('id desc')->page(); + $query->page(); } } diff --git a/app/wechat/controller/Fans.php b/app/wechat/controller/Fans.php index 842192f48..1f2068bac 100644 --- a/app/wechat/controller/Fans.php +++ b/app/wechat/controller/Fans.php @@ -46,7 +46,12 @@ class Fans extends Controller $this->title = '微信用户管理'; $this->where = ['appid' => WechatService::instance()->getAppid()]; $query = $this->_query($this->table)->like('nickname')->equal('subscribe,is_black'); - $query->dateBetween('subscribe_at')->where($this->where)->order('subscribe_time desc')->page(); + $query->dateBetween('subscribe_at')->where($this->where)->order('subscribe_time desc'); + if (input('output') === 'json') { + $this->success('获取数据成功', $query->page(true, false)); + } else { + $query->page(); + } } /** diff --git a/app/wechat/view/fans/index_search.html b/app/wechat/view/fans/index_search.html index 078c06906..b3701dd84 100644 --- a/app/wechat/view/fans/index_search.html +++ b/app/wechat/view/fans/index_search.html @@ -4,14 +4,14 @@
-
+
+
-
+
+
-
+
+
-
+
+
- + +
- - + \ No newline at end of file