From d5f5cbc05b44a658c4a4ba32690c3ff967ded487 Mon Sep 17 00:00:00 2001 From: Yuanuo Date: Sat, 4 Aug 2018 14:00:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E4=BA=AB=E6=96=87=E4=BB=B6=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E6=A0=B9=E6=8D=AE=E5=88=86=E4=BA=AB=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E6=8E=92=E5=BA=8F=E8=80=8C=E4=B8=8D=E5=BA=94=E8=AF=A5=E6=98=AF?= =?UTF-8?q?ID=E3=80=82=20=E6=98=BE=E7=A4=BA=E5=88=86=E4=BA=AB=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=88=97=E8=A1=A8=E6=97=B6=E6=A0=B9=E6=8D=AE=E5=88=86?= =?UTF-8?q?=E4=BA=AB=E6=97=B6=E9=97=B4=E5=80=92=E5=BA=8F=E6=8E=92=E5=88=97?= =?UTF-8?q?=EF=BC=8C=E6=9C=80=E6=96=B0=E5=88=86=E4=BA=AB=E7=9A=84=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E6=98=BE=E7=A4=BA=E5=9C=A8=E6=9C=80=E5=89=8D=EF=BC=8C?= =?UTF-8?q?=E5=9B=A0=E4=B8=BA=E5=88=86=E4=BA=AB=E9=A1=BA=E5=BA=8F=E5=B9=B6?= =?UTF-8?q?=E4=B8=8D=E4=B8=80=E5=AE=9A=E6=8C=89=E7=85=A7=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E9=A1=BA=E5=BA=8F=E5=86=B3=E5=AE=9A=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/index/controller/Explore.php | 2 +- application/index/controller/Profile.php | 4 ++-- application/index/controller/Share.php | 2 +- application/index/model/AdminHandler.php | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/application/index/controller/Explore.php b/application/index/controller/Explore.php index 2b4b3321..7f1bebe1 100644 --- a/application/index/controller/Explore.php +++ b/application/index/controller/Explore.php @@ -35,7 +35,7 @@ class Explore extends Controller{ $list = Db::name('shares') ->where('type',"public") ->where('origin_name',"like","%".$keyWords."%") - ->order('id DESC') + ->order('share_time DESC') ->paginate(10); $listData = $list->all(); foreach ($listData as $key => $value) { diff --git a/application/index/controller/Profile.php b/application/index/controller/Profile.php index 4e2979db..458d78df 100644 --- a/application/index/controller/Profile.php +++ b/application/index/controller/Profile.php @@ -35,7 +35,7 @@ class Profile extends Controller{ $list = Db::name('shares') ->where('owner',$userId) ->where('type',"public") - ->order('id DESC') + ->order('share_time DESC') ->paginate(10); break; case 'hot': @@ -49,7 +49,7 @@ class Profile extends Controller{ $list = Db::name('shares') ->where('owner',$userId) ->where('type',"public") - ->order('id DESC') + ->order('share_time DESC') ->paginate(10); break; } diff --git a/application/index/controller/Share.php b/application/index/controller/Share.php index 7376dc2f..61733de7 100644 --- a/application/index/controller/Share.php +++ b/application/index/controller/Share.php @@ -178,7 +178,7 @@ class Share extends Controller{ } $userInfo = $this->userObj->getInfo(); $groupData = $this->userObj->getGroupData(); - $list = Db::name('shares')->where('owner',$this->userObj->uid)->paginate(10); + $list = Db::name('shares')->where('owner',$this->userObj->uid)->order('share_time DESC')->paginate(30); $listData = $list->all(); foreach ($listData as $key => $value) { if($value["source_type"]=="file"){ diff --git a/application/index/model/AdminHandler.php b/application/index/model/AdminHandler.php index 45a1d71a..c8e4bcf1 100644 --- a/application/index/model/AdminHandler.php +++ b/application/index/model/AdminHandler.php @@ -519,7 +519,7 @@ class AdminHandler extends Model{ public function listShare(){ $pageSize = !cookie('?pageSize') ? 10 : cookie('pageSize'); - $orderType = empty(cookie('orderMethodShare')) ? "id DESC" : cookie('orderMethodShare'); + $orderType = empty(cookie('orderMethodShare')) ? "share_time DESC" : cookie('orderMethodShare'); $this->pageData = Db::name("shares") ->where(function ($query) { if(!empty(cookie('shareSearch'))){