Skip to content

Commit

Permalink
话题排序调整
Browse files Browse the repository at this point in the history
  • Loading branch information
SR.李 committed Oct 12, 2023
1 parent eb6b2b6 commit 74135e1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions application/common/controller/IndexInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ public function topic()
}

// 话题
public function topicSquare()
public function topicList()
{
$topic = Db::name('topic')->order('count', 'desc')->paginate(30, false, ['page' => request()->param('page/d', 1), 'path' => '[PAGE].html']);
$topic = Db::name('topic')->order('count desc')->order('topic_id desc')->paginate(30, false, ['page' => request()->param('page/d', 1), 'path' => '[PAGE].html']);
$this->assign('topicArr', $topic);
return $this->fetch('topic');
}
Expand Down
4 changes: 2 additions & 2 deletions route/route.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
} else {
$module = 'index';
}
Route::get('/topic/$',$module . '/Index/topicSquare');
Route::get('/topic/:page$', $module . '/Index/topicSquare')->pattern(['page'=>'[0-9]+']);
Route::get('/topic/$',$module . '/Index/topicList');
Route::get('/topic/:page$', $module . '/Index/topicList')->pattern(['page'=>'[0-9]+']);
Route::get('/topic/:topic_id/$',$module . '/Index/topic')->pattern(['topic_id' => '[0-9]+']);
Route::get('/square/$',$module . '/Index/blog');
Route::get('/square/:page$',$module . '/Index/blog')->pattern(['page'=>'[0-9]+']);
Expand Down

0 comments on commit 74135e1

Please sign in to comment.