fix: nas主题相关页排序bug
This commit is contained in:
@@ -111,7 +111,9 @@ class TopicNas extends Common
|
|||||||
$trial_instructions = [];
|
$trial_instructions = [];
|
||||||
// 获取banner数据
|
// 获取banner数据
|
||||||
$banners = SysBannerModel::with(['items' => function($query) {
|
$banners = SysBannerModel::with(['items' => function($query) {
|
||||||
$query->withoutField(['sort', 'created_at', 'updated_at', 'deleted_at'])->enabled(true);
|
$query->withoutField(['sort', 'created_at', 'updated_at', 'deleted_at'])
|
||||||
|
->order(['sort' => 'asc', 'id' => 'desc'])
|
||||||
|
->enabled(true);
|
||||||
}])
|
}])
|
||||||
->atPlatform(request()->from)
|
->atPlatform(request()->from)
|
||||||
->uniqueLabel([
|
->uniqueLabel([
|
||||||
@@ -150,7 +152,9 @@ class TopicNas extends Common
|
|||||||
$cooperation_cotacts = [];
|
$cooperation_cotacts = [];
|
||||||
// 获取banner数据
|
// 获取banner数据
|
||||||
$banners = SysBannerModel::with(['items' => function($query) {
|
$banners = SysBannerModel::with(['items' => function($query) {
|
||||||
$query->withoutField(['sort', 'created_at', 'updated_at', 'deleted_at'])->enabled(true);
|
$query->withoutField(['sort', 'created_at', 'updated_at', 'deleted_at'])
|
||||||
|
->order(['sort' => 'asc', 'id' => 'desc'])
|
||||||
|
->enabled(true);
|
||||||
}])
|
}])
|
||||||
->atPlatform(request()->from)
|
->atPlatform(request()->from)
|
||||||
->uniqueLabel([
|
->uniqueLabel([
|
||||||
@@ -189,7 +193,9 @@ class TopicNas extends Common
|
|||||||
// 获取文章分类及文章数据
|
// 获取文章分类及文章数据
|
||||||
$parent = ArticleCategoryModel::uniqueLabel('CATEGORY_681182e0a4529')->language($this->lang_id)->value('id');
|
$parent = ArticleCategoryModel::uniqueLabel('CATEGORY_681182e0a4529')->language($this->lang_id)->value('id');
|
||||||
$article_categorys = ArticleCategoryModel::with(['article' => function($query) {
|
$article_categorys = ArticleCategoryModel::with(['article' => function($query) {
|
||||||
$query->field(['id', 'title', 'category_id'])->limit(3);
|
$query->field(['id', 'title', 'category_id'])
|
||||||
|
->order(['sort' => 'asc', 'id' => 'desc'])
|
||||||
|
->limit(3);
|
||||||
}])
|
}])
|
||||||
->field([
|
->field([
|
||||||
'id',
|
'id',
|
||||||
@@ -205,7 +211,9 @@ class TopicNas extends Common
|
|||||||
$contacts = [];
|
$contacts = [];
|
||||||
// 获取banner数据
|
// 获取banner数据
|
||||||
$banners = SysBannerModel::with(['items' => function ($query) {
|
$banners = SysBannerModel::with(['items' => function ($query) {
|
||||||
$query->withoutField(['sort', 'created_at', 'updated_at', 'deleted_at'])->enabled(true);
|
$query->withoutField(['sort', 'created_at', 'updated_at', 'deleted_at'])
|
||||||
|
->order(['sort' => 'asc', 'id' => 'desc'])
|
||||||
|
->enabled(true);
|
||||||
}])
|
}])
|
||||||
->atPlatform(request()->from)
|
->atPlatform(request()->from)
|
||||||
->uniqueLabel(['BANNER_6819754be2dc6'])
|
->uniqueLabel(['BANNER_6819754be2dc6'])
|
||||||
@@ -238,7 +246,7 @@ class TopicNas extends Common
|
|||||||
// 获取文章分类及文章数据
|
// 获取文章分类及文章数据
|
||||||
$parent = ArticleCategoryModel::uniqueLabel('CATEGORY_681182e0a4529')->language($this->lang_id)->value('id');
|
$parent = ArticleCategoryModel::uniqueLabel('CATEGORY_681182e0a4529')->language($this->lang_id)->value('id');
|
||||||
$article_categorys = ArticleCategoryModel::with(['article' => function ($query) {
|
$article_categorys = ArticleCategoryModel::with(['article' => function ($query) {
|
||||||
$query->field(['id', 'title', 'category_id']);
|
$query->field(['id', 'title', 'category_id'])->order(['sort' => 'asc', 'id' => 'desc']);
|
||||||
}])
|
}])
|
||||||
->field([
|
->field([
|
||||||
'id',
|
'id',
|
||||||
@@ -282,7 +290,9 @@ class TopicNas extends Common
|
|||||||
$data = [];
|
$data = [];
|
||||||
// 获取banner数据
|
// 获取banner数据
|
||||||
$banners = SysBannerModel::with(['items' => function($query) {
|
$banners = SysBannerModel::with(['items' => function($query) {
|
||||||
$query->withoutField(['sort', 'created_at', 'updated_at', 'deleted_at'])->enabled(true);
|
$query->withoutField(['sort', 'created_at', 'updated_at', 'deleted_at'])
|
||||||
|
->order(['sort' => 'asc', 'id' => 'desc'])
|
||||||
|
->enabled(true);
|
||||||
}])
|
}])
|
||||||
->atPlatform(request()->from)
|
->atPlatform(request()->from)
|
||||||
->uniqueLabel([
|
->uniqueLabel([
|
||||||
|
|||||||
Reference in New Issue
Block a user