百色农校完成
This commit is contained in:
@@ -6,17 +6,17 @@
|
||||
<span class="text-large font-600"> {{ '站内搜索' }} </span>
|
||||
</template>
|
||||
<template #extra>
|
||||
<el-radio-group v-model="where.model" @change="reload">
|
||||
<el-radio-button label="文档" value="docs" />
|
||||
<el-radio-button label="资讯" value="article" />
|
||||
</el-radio-group>
|
||||
<!-- <el-radio-group v-model="where.model" @change="reload">-->
|
||||
<!-- <el-radio-button label="文档" value="docs" />-->
|
||||
<!-- <el-radio-button label="资讯" value="article" />-->
|
||||
<!-- </el-radio-group>-->
|
||||
</template>
|
||||
<el-row :gutter="24" id="container" class="clearfix">
|
||||
<el-col v-for="(item,index) in list" :key="index" :span="6" class="left mb-6">
|
||||
<el-card shadow="hover" :body-style="{ padding: '0px' }" class=" hover:bg-gray-50 cursor-pointer">
|
||||
<nuxt-link :to="`/detail/${item.articleId}.html`">
|
||||
<el-image
|
||||
:src="`${config.FILE_SERVER}${item.image}`"
|
||||
:src="`${item.image}`"
|
||||
fit="cover"
|
||||
:lazy="true" class="w-full md:h-[166px] h-[199px] cursor-pointer bg-gray-50"/>
|
||||
<div class="flex-1 px-4 py-5 sm:p-6 !p-4">
|
||||
@@ -51,6 +51,7 @@ import dayjs from "dayjs";
|
||||
import {getViews} from "~/utils/common";
|
||||
import {pageCmsArticle} from "~/api/cms/cmsArticle";
|
||||
import {FILE_SERVER} from "~/config";
|
||||
import {pageCmsArticleContent} from "~/api/cms/cmsArticleContent";
|
||||
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
@@ -69,17 +70,17 @@ const where = reactive<CmsArticleParam>({
|
||||
keywords: undefined,
|
||||
page: 1,
|
||||
limit: 12,
|
||||
status: 0,
|
||||
parentId: undefined,
|
||||
categoryId: undefined,
|
||||
lang: i18n.locale.value
|
||||
// status: 0,
|
||||
// parentId: undefined,
|
||||
// categoryId: undefined,
|
||||
// lang: i18n.locale.value
|
||||
});
|
||||
|
||||
// 加载页面数据
|
||||
const reload = async () => {
|
||||
list.value = [];
|
||||
|
||||
pageCmsArticle(where).then(response => {
|
||||
pageCmsArticleContent(where).then(response => {
|
||||
list.value = response?.list || [];
|
||||
total.value = response?.count || 0;
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user