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'))){