百色农校
This commit is contained in:
@@ -12,6 +12,8 @@ export interface CmsAd {
|
||||
type?: number;
|
||||
// 广告位名称
|
||||
name?: string;
|
||||
// 样式
|
||||
style?: string;
|
||||
// 宽
|
||||
width?: string;
|
||||
// 高
|
||||
|
||||
@@ -11,10 +11,18 @@
|
||||
}
|
||||
|
||||
.head-bg {
|
||||
background: url(../images/nav1.jpg) repeat-x top center;
|
||||
height: 124px;
|
||||
width: 100% !important;
|
||||
background: url('https://gxbsnx.com/Temp/images/new/imgimg4.png');
|
||||
height: 39px;
|
||||
display: flex;
|
||||
justify-items: center;
|
||||
clear: both;
|
||||
}
|
||||
.menu-bg{
|
||||
background: url('https://www.gxbsnx.com/Temp/images/background/back_green.png') repeat-x top center;
|
||||
background-size: 100% 100%;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.wel {
|
||||
line-height: 36px;
|
||||
font-size: 13px;
|
||||
|
||||
@@ -15,7 +15,7 @@ import {listCmsLink, pageCmsLink} from "~/api/cms/cmsLink";
|
||||
import type {CmsLink} from "~/api/cms/cmsLink/model";
|
||||
|
||||
const list = ref<CmsLink[]>([])
|
||||
pageCmsLink({limit: 10}).then(res => {
|
||||
pageCmsLink({limit: 8}).then(res => {
|
||||
list.value = res?.list || [];
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<div class="flex flex-col text-base">
|
||||
<p class="text-base text-gray-400 py-2 font-bold">APP客户端</p>
|
||||
<p class="text-base text-gray-400 py-2 font-bold">扫一扫关注公众号</p>
|
||||
<el-avatar :src="config.wxQrcode" shape="square" :size="120" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,14 +1,23 @@
|
||||
<template>
|
||||
<!-- 头部组件 -->
|
||||
<div class="sm:p-0 px-4 shadow-sm fixed z-100 top-0 w-full bg-white">
|
||||
<div class="shadow-sm fixed z-100 top-0 left-0 w-full bg-white">
|
||||
<!-- 顶部通栏 -->
|
||||
<TopBar />
|
||||
<!-- 导航栏 -->
|
||||
<div class="flex justify-between xl:w-screen-xl m-auto">
|
||||
<el-space>
|
||||
<Logo />
|
||||
<Menu :data="navigations" />
|
||||
</el-space>
|
||||
<div class="flex justify-between clear-both hidden-sm-and-down">
|
||||
<div class="flex flex-col w-full">
|
||||
<div class="flex justify-between menu-bg w-full py-3">
|
||||
<div class="xl:w-screen-xl m-auto flex justify-between">
|
||||
<Logo />
|
||||
<img src="https://gxbsnx.com/Temp/images/background/title_right.png" width="291" height="88" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="w-full bg-white">
|
||||
<div class="xl:w-screen-xl m-auto">
|
||||
<Menu :data="navigations" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<Login />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -72,16 +72,6 @@
|
||||
<el-menu-item v-else :index="`${index}`"><a :href="navTo(item)">{{ item.title }}</a></el-menu-item>
|
||||
</template>
|
||||
</el-menu>
|
||||
<!-- <div v-if="setting.searchBtn" class="search-tools flex justify-center p-4 mt-5">-->
|
||||
<!-- <el-input v-model="keywords" placeholder="请输入关键词..." :suffix-icon="Search" @change="onSearch"/>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div v-if="setting.langBtn" class="lang flex justify-center text-center">-->
|
||||
<!-- <el-space>-->
|
||||
<!-- <a @click="onLang(`zh`)" class="text-sm text-gray-500">中文版</a>-->
|
||||
<!-- <el-divider direction="vertical" />-->
|
||||
<!-- <a @click="onLang(`en`)" class="text-sm text-gray-400">English</a>-->
|
||||
<!-- </el-space>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
</el-drawer>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<nuxt-link to="/" class="flex items-center cursor-pointer gap-sm mr-7" v-if="website">
|
||||
<el-image v-if="website.websiteLogo || logo?.value" :style="`${logo?.style}`" :src="logo?.value || website?.websiteLogo" class="rounded-sm rounded-sm sm:w-[158px] sm:h-[54px] h-[50px] py-1 sm:py-0"/>
|
||||
<el-image v-if="website.websiteLogo || logo?.value" :style="`${logo?.style}`" :src="logo?.value || website?.websiteLogo" class="rounded-sm rounded-sm sm:w-[360px] sm:h-[80px] h-[80px] py-1 sm:py-0"/>
|
||||
<h4 v-else class="text-gray-700 text-xl font-bold" :style="`${logo?.style}`">{{ website?.websiteName }}</h4>
|
||||
</nuxt-link>
|
||||
</template>
|
||||
|
||||
@@ -1,28 +1,62 @@
|
||||
<script setup lang="ts">
|
||||
import {useConfigInfo} from "~/composables/configState";
|
||||
import { Search } from '@element-plus/icons-vue'
|
||||
import {useConfigInfo, useMenu} from "~/composables/configState";
|
||||
import { Search,Message, Fold } from '@element-plus/icons-vue'
|
||||
const config = useConfigInfo();
|
||||
const keyword = ref<string>('');
|
||||
const i18n = useI18n();
|
||||
const navigations = useMenu();
|
||||
const drawer = ref<boolean>(false);
|
||||
|
||||
const onSearch = () => {
|
||||
window.location.href = `/${i18n.locale.value}/search/${keyword.value}`;
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class=" bg-blue-50 text-gray-400 px-2 py-1" v-if="config.showTopBar == 'true'">
|
||||
<div class="w1200 flex justify-between items-center">
|
||||
<span>{{ config?.topWelcomeInfo }}</span>
|
||||
<div class="head-bg bg-blue-50 text-gray-400 px-2">
|
||||
<div class=" flex justify-between items-center xl:w-screen-xl m-auto sm:px-0 w-full">
|
||||
<span class="text-white">{{ config?.topWelcomeInfo }}</span>
|
||||
<div class="lang flex justify-center text-center items-center">
|
||||
<el-space>
|
||||
<div class="search">
|
||||
<div class="fl mr-5">
|
||||
<el-space size="large">
|
||||
<a :href="`/zh?spm=zh_CN`" class="text-xs flex items-center hidden-sm-and-down"><el-icon color="#fff" size="16"><Message /></el-icon><span class="text-white px-1">校长信箱</span></a>
|
||||
<a :href="`https://old.gxbsnx.com`" class="text-xs flex items-center hidden-sm-and-down"><el-icon color="#fff" size="16"><Message /></el-icon><span class="text-white px-1">旧版</span></a>
|
||||
<div class="search mx-5 hidden-sm-and-down">
|
||||
<div class="fl">
|
||||
<el-input v-model="keyword" :placeholder="`${$t('searchKeywords')}...`" :suffix-icon="Search" @change="onSearch" />
|
||||
</div>
|
||||
</div>
|
||||
<a :href="`/zh?spm=zh_CN`" class="text-sm"><span class="text-gray-500">中文版</span></a>
|
||||
<el-divider direction="vertical" />
|
||||
<a :href="`/en?spm=en_US`" class="text-sm"><span class="text-gray-500">English</span></a>
|
||||
<!-- 移动端 -->
|
||||
<div class="hidden-sm-and-up">
|
||||
<div class="hidden-sm-and-up mx-5 sm:mx-0">
|
||||
<div class="el-dropdown-link flex items-center" @click="drawer = true">
|
||||
<el-icon color="white" :size="24"><Fold /></el-icon>
|
||||
</div>
|
||||
<el-drawer
|
||||
v-model="drawer"
|
||||
:size="290"
|
||||
>
|
||||
<div id="menu">
|
||||
<el-menu
|
||||
currentIndex="/product"
|
||||
:unique-opened="true"
|
||||
>
|
||||
<template v-for="(item,index) in navigations" :key="index">
|
||||
<el-sub-menu v-if="item?.children && item.children.length > 0" :index="`${index}`">
|
||||
<template #title><span>{{ item.title }}</span></template>
|
||||
<el-menu-item v-for="(sub,subIndex) in item.children" :index="`${subIndex}`">
|
||||
<el-space>
|
||||
<el-avatar v-if="sub.icon" :src="sub.icon" shape="square" size="small"></el-avatar>
|
||||
<a :href="navTo(sub)">{{ sub.title }}</a>
|
||||
</el-space>
|
||||
</el-menu-item>
|
||||
</el-sub-menu>
|
||||
<el-menu-item v-else :index="`${index}`"><a :href="navTo(item)">{{ item.title }}</a></el-menu-item>
|
||||
</template>
|
||||
</el-menu>
|
||||
</div>
|
||||
</el-drawer>
|
||||
</div>
|
||||
</div>
|
||||
</el-space>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<!-- 自定义banner -->
|
||||
<div v-if="layout?.banner" class="banner m-auto relative sm:flex hidden-sm-and-down flex justify-center">
|
||||
<el-image :src="layout?.banner" class="min-h-sm sm:h-auto w-full"></el-image>
|
||||
<div class="banner-bar absolute top-0 w-full sm:flex hidden">
|
||||
<div v-if="layout?.banner" class="banner m-auto relative sm:flex hidden-sm-and-down flex justify-center mt-[220px]">
|
||||
<el-image :src="layout?.banner" class="w-screen-xl"></el-image>
|
||||
<div class="banner-bar absolute top-10 w-full sm:flex hidden">
|
||||
<div class="banner-text py-12 md:w-screen-xl m-auto opacity-90 flex flex-col justify-center">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div v-if="editor === 1" v-html="data"></div>
|
||||
<MdPreview v-else :id="id" :modelValue="data" />
|
||||
<div v-html="data"></div>
|
||||
<!-- <MdPreview v-else :id="id" :modelValue="data" />-->
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
|
||||
35
components/Index/Ad421.vue
Normal file
35
components/Index/Ad421.vue
Normal file
@@ -0,0 +1,35 @@
|
||||
<script setup lang="ts">
|
||||
|
||||
import type {CmsAd} from "~/api/cms/cmsAd/model";
|
||||
import {getCmsAd} from "~/api/cms/cmsAd";
|
||||
|
||||
const ad421 = ref<CmsAd>();
|
||||
const isMobile = useIsMobile();
|
||||
|
||||
// 请求数据
|
||||
const reload = async () => {
|
||||
getCmsAd(421).then(res => {
|
||||
if (isMobile.value) {
|
||||
res.height = '67';
|
||||
}
|
||||
ad421.value = res;
|
||||
});
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
reload();
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div v-if="ad421" v-for="(item,index) in ad421.imageList" :key="index">
|
||||
<nuxt-link :to="ad421.style" class="flex justify-center items-center relative my-4">
|
||||
<el-image class="absolute" :src="item.url" :style="`width: ${ad421.width ? ad421.width + 'px' : 'auto'}; height: ${ad421.height ? ad421.height + 'px' : 'auto'};`" />
|
||||
</nuxt-link>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
</style>
|
||||
35
components/Index/Ad422.vue
Normal file
35
components/Index/Ad422.vue
Normal file
@@ -0,0 +1,35 @@
|
||||
<script setup lang="ts">
|
||||
|
||||
import type {CmsAd} from "~/api/cms/cmsAd/model";
|
||||
import {getCmsAd} from "~/api/cms/cmsAd";
|
||||
|
||||
const ad422 = ref<CmsAd>();
|
||||
const isMobile = useIsMobile();
|
||||
|
||||
// 请求数据
|
||||
const reload = async () => {
|
||||
getCmsAd(422).then(res => {
|
||||
if (isMobile.value) {
|
||||
res.height = '123';
|
||||
}
|
||||
ad422.value = res;
|
||||
});
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
reload();
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div v-if="ad422" v-for="(item,index) in ad422.imageList" :key="index">
|
||||
<nuxt-link :to="ad422.style" class="flex justify-center items-center relative my-4">
|
||||
<el-image class="absolute" :src="item.url" :style="`width: ${ad422.width ? ad422.width + 'px' : 'auto'}; height: ${ad422.height ? ad422.height + 'px' : 'auto'};`" />
|
||||
</nuxt-link>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
</style>
|
||||
58
components/Index/BNNews.vue
Normal file
58
components/Index/BNNews.vue
Normal file
@@ -0,0 +1,58 @@
|
||||
<template>
|
||||
<div class="xl:w-screen-xl m-auto py-4 px-4 lg:px-0">
|
||||
<div class="text-center flex flex-col items-center z-0 relative">
|
||||
<h2 class="text-4xl font-bold tracking-tight text-gray-800 dark:text-white">
|
||||
{{ '百农新闻' }}
|
||||
</h2>
|
||||
<div class="sub-title">
|
||||
<p class="text-gray-400 text-sm dark:text-gray-400 py-3">
|
||||
{{ 'BaiSe NongXiao News' }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<el-card shadow="hover">
|
||||
<el-row :gutter="24">
|
||||
<el-col :lg="10" :xs="24">
|
||||
<HotNewsCarousel />
|
||||
</el-col>
|
||||
<el-col :lg="14" :xs="24" class="w-full h-auto">
|
||||
<template v-for="(item, index) in list" :key="index">
|
||||
<nuxt-link :to="`/detail/${item.articleId}.html`" class="item">
|
||||
<div class="text-lg my-3 flex justify-between">
|
||||
<span class="title text-gray-800 hover:text-green-700 text-sm lg:text-lg">{{ item.title }}</span>
|
||||
<span class="text-gray-400 text-sm text-right w-[100px]">{{
|
||||
dayjs(item.createTime).format('MM-DD')
|
||||
}}</span>
|
||||
</div>
|
||||
</nuxt-link>
|
||||
</template>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</div>
|
||||
<div v-if="list.length == 0" class="px-1 text-center text-gray-500 min-h-xs">没有更多了</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { navigateTo } from '#imports';
|
||||
import dayjs from 'dayjs';
|
||||
import type { CmsArticle } from '~/api/cms/cmsArticle/model';
|
||||
import { pageCmsArticle } from '~/api/cms/cmsArticle';
|
||||
import HotNewsCarousel from '~/components/Index/HotNewsCarousel.vue';
|
||||
|
||||
const list = ref<CmsArticle[]>([]);
|
||||
|
||||
// 请求数据
|
||||
const reload = async () => {
|
||||
pageCmsArticle({
|
||||
limit: 8,
|
||||
recommend: 1,
|
||||
parentId: 4131
|
||||
}).then(res => {
|
||||
list.value = res?.list || [];
|
||||
});
|
||||
};
|
||||
onMounted(() => {
|
||||
reload();
|
||||
});
|
||||
</script>
|
||||
@@ -1,31 +1,30 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="w-full bg-white mb-3 hidden-sm-and-down" v-if="ad">
|
||||
<div style="margin-top: 210px;" class="w-full bg-white mb-3 hidden-sm-and-down" v-if="ad">
|
||||
<el-carousel :height="`${ad?.height || '500'}px`">
|
||||
<el-carousel-item v-for="(item,index) in ad?.imageList" :key="index">
|
||||
<div class="item relative flex justify-center items-center">
|
||||
<el-image :src="item.url" fit="cover" class="w-full" :style="`height: ${ad?.height}px;`" />
|
||||
<el-image :src="item.url" fit="fill" class="w-full" :style="`height: ${ad?.height}px;`" />
|
||||
<!-- fit: '' | 'fill' | 'contain' | 'cover' | 'none' | 'scale-down'-->
|
||||
</div>
|
||||
{{ad.height}}==
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
</div>
|
||||
|
||||
<!-- 移动端 -->
|
||||
<div class="sm:hidden w-full bg-white mt-[48px] mb-3 hidden-sm-and-up" v-if="ad">
|
||||
<el-carousel indicator-position="none" height="150">
|
||||
<div class="sm:hidden w-full bg-white mt-[38px] mb-3 hidden-sm-and-up" v-if="ad">
|
||||
<el-carousel indicator-position="none" height="200">
|
||||
<el-carousel-item v-for="(item,index) in ad?.imageList" :key="index">
|
||||
<el-image :src="item.url" />
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import type {CompanyParam} from "~/api/system/company/model";
|
||||
import type {CmsAd} from "~/api/cms/cmsAd/model";
|
||||
import {pageCmsAd} from "~/api/cms/cmsAd";
|
||||
import {getCmsAd, pageCmsAd} from "~/api/cms/cmsAd";
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
@@ -47,6 +46,9 @@ const emit = defineEmits<{
|
||||
|
||||
const ad = ref<CmsAd>();
|
||||
|
||||
const ad421 = ref<CmsAd>();
|
||||
const ad422 = ref<CmsAd>();
|
||||
|
||||
// 搜索表单
|
||||
const where = reactive<CompanyParam>({
|
||||
keywords: ''
|
||||
@@ -63,6 +65,12 @@ const reload = async () => {
|
||||
ad.value = res.list[0];
|
||||
}
|
||||
})
|
||||
getCmsAd(421).then(res => {
|
||||
ad421.value = res;
|
||||
});
|
||||
getCmsAd(422).then(res => {
|
||||
ad422.value = res;
|
||||
});
|
||||
}
|
||||
|
||||
watch(
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
<template>
|
||||
<div class="w-full container-bg bg-blue-600 gap-10 flex justify-center items-center py-6">
|
||||
<span class="text-xl text-white font-bold">联系我们,为您降本增效</span>
|
||||
<el-button size="large" @click="navigateTo(`/order/659.html`)">马上联系</el-button>
|
||||
<el-button size="large" @click="openUrl(`https://zzyx.gxcampus.com/register`)">在线报名</el-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import {navigateTo} from "#imports";
|
||||
import {navigateTo, openUrl} from "#imports";
|
||||
|
||||
</script>
|
||||
<style type="text/css">
|
||||
|
||||
@@ -4,22 +4,22 @@
|
||||
<h2 class="text-4xl font-bold tracking-tight text-gray-800 dark:text-white">
|
||||
{{ title || '热点新闻' }}
|
||||
</h2>
|
||||
<!-- <div class="sub-title">-->
|
||||
<!-- <p class="text-gray-400 text-sm dark:text-gray-400 py-3">-->
|
||||
<!-- {{ comments || '官方开发的应用' }}-->
|
||||
<!-- </p>-->
|
||||
<!-- </div>-->
|
||||
<div class="sub-title">
|
||||
<p class="text-gray-400 text-sm dark:text-gray-400 py-3">
|
||||
{{ comments || 'Unlimited Scenery' }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<el-row :gutter="24" id="container" class="clearfix">
|
||||
<el-col v-for="(item,index) in list" :key="index" :xs="24" :span="6" class="left mb-6">
|
||||
<el-col v-for="(item,index) in list" :key="index" :xs="12" :span="6" class="left mb-6">
|
||||
<el-card shadow="hover" :body-style="{ padding: '0px' }" class=" hover:bg-gray-50 cursor-pointer" @click="navigateTo(`/detail/${item.articleId}.html`)">
|
||||
<el-image
|
||||
:src="item.image"
|
||||
fit="cover"
|
||||
:lazy="true" class="w-full md:h-[166px] h-[199px] cursor-pointer bg-gray-50"/>
|
||||
:lazy="true" class="w-full md:h-[166px] h-[100px] lg:h-[199px] cursor-pointer bg-gray-50"/>
|
||||
<div class="flex-1 px-4 py-5 sm:p-6 !p-4">
|
||||
<div class="text-gray-700 dark:text-white text-base font-semibold flex flex-col gap-1.5">
|
||||
<div class="line-clamp-2 text-lg min-h-[54px]">
|
||||
<div class="line-clamp-2 text-sm lg:text-lg lg:min-h-[54px] min-h-auto">
|
||||
{{ item.title }}
|
||||
</div>
|
||||
</div>
|
||||
@@ -47,9 +47,11 @@
|
||||
<script lang="ts" setup>
|
||||
import {navigateTo} from "#imports";
|
||||
import dayjs from "dayjs";
|
||||
import { View } from '@element-plus/icons-vue'
|
||||
import type {CmsArticle} from "~/api/cms/cmsArticle/model";
|
||||
import {listCmsArticle} from "~/api/cms/cmsArticle";
|
||||
import {listCmsArticle, pageCmsArticle} from "~/api/cms/cmsArticle";
|
||||
import type {CmsArticleParam} from "~/api/cms/cmsArticle/model";
|
||||
import {getImage} from "~/utils/common";
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
@@ -74,12 +76,14 @@ const id = ref<number>(0);
|
||||
|
||||
// 请求数据
|
||||
const reload = async () => {
|
||||
listCmsArticle({
|
||||
pageCmsArticle({
|
||||
limit: 8,
|
||||
recommend: 1,
|
||||
categoryId: props.categoryId
|
||||
}).then(data => {
|
||||
list.value = data || [];
|
||||
}).then(res => {
|
||||
list.value = res?.list.map(d => {
|
||||
d.image = getImage(d.image)
|
||||
return d;
|
||||
}) || [];
|
||||
})
|
||||
}
|
||||
reload();
|
||||
|
||||
75
components/Index/HotNewsCarousel.vue
Normal file
75
components/Index/HotNewsCarousel.vue
Normal file
@@ -0,0 +1,75 @@
|
||||
<template>
|
||||
<div class="lg:my-3 my-0 relative">
|
||||
<el-carousel :height="flashHeight + 'px'" indicator-position="none">
|
||||
<el-carousel-item v-for="(item,index) in list" :key="index">
|
||||
<nuxt-link :to="`/detail/${item.articleId}.html`" class="item flex justify-center items-center">
|
||||
<img :src="`${FILE_SERVER}${item.image}`" class="w-[500px] h-[380px]" />
|
||||
<div class="absolute bottom-3 z-100 text-white font-bold px-4 line-clamp-1 text-sm lg:text-lg">{{ item.title }}</div>
|
||||
</nuxt-link>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import type {CompanyParam} from "~/api/system/company/model";
|
||||
import {pageCmsArticle} from "~/api/cms/cmsArticle";
|
||||
import type {CmsArticle} from "~/api/cms/cmsArticle/model";
|
||||
import {FILE_SERVER} from "~/config";
|
||||
|
||||
const isMobile = useIsMobile();
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
config?: any;
|
||||
list?: any[];
|
||||
disabled?: boolean;
|
||||
title?: string;
|
||||
comments?: string;
|
||||
}>(),
|
||||
{
|
||||
title: '卡片标题',
|
||||
comments: '卡片描述'
|
||||
}
|
||||
);
|
||||
|
||||
const emit = defineEmits<{
|
||||
(e: 'done'): void;
|
||||
}>();
|
||||
|
||||
const list = ref<CmsArticle[]>([]);
|
||||
const flashHeight = ref<number>(372)
|
||||
|
||||
// 搜索表单
|
||||
const where = reactive<CompanyParam>({
|
||||
keywords: ''
|
||||
});
|
||||
|
||||
// 请求数据
|
||||
const reload = async () => {
|
||||
pageCmsArticle({
|
||||
recommend: 1,
|
||||
limit: 5,
|
||||
lang: getLang()
|
||||
}).then(res => {
|
||||
list.value = res?.list || [];
|
||||
})
|
||||
if(isMobile.value){
|
||||
flashHeight.value = 260;
|
||||
}
|
||||
}
|
||||
|
||||
watch(
|
||||
() => props.config,
|
||||
() => {
|
||||
reload();
|
||||
},
|
||||
{immediate: true}
|
||||
);
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.hidden-sm-and-up .el-carousel{
|
||||
height: 160px;
|
||||
}
|
||||
</style>
|
||||
@@ -2,23 +2,36 @@
|
||||
<div class="xl:w-screen-xl m-auto py-4 px-4 sm:px-0">
|
||||
<div class="text-center flex flex-col items-center z-0 relative">
|
||||
<h2 class="text-4xl font-bold tracking-tight text-gray-800 dark:text-white">
|
||||
{{ title || '合作伙伴' }}
|
||||
{{ title || '友情链接' }}
|
||||
</h2>
|
||||
<div class="sub-title">
|
||||
<p class="text-gray-400 text-sm dark:text-gray-400 py-3">
|
||||
{{ comments || '感谢所有合作伙伴和赞助商的支持!' }}
|
||||
{{ comments || 'Link' }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<el-row id="container" :gutter="24" class="clearfix">
|
||||
<el-col v-for="(item,index) in list" :key="index" :sm="4" :xs="12" class="left mb-8">
|
||||
<el-col v-for="(item,index) in list" :key="index" :sm="6" :xs="12" class="left mb-8 hidden-sm-and-down">
|
||||
<nuxt-link :to="`${item.url}`" class="flex-1 cursor-pointer flex flex-col text-center" target="_blank">
|
||||
<el-card :body-style="{ padding: '0px' }" class="items-center flex justify-center" shadow="hover"
|
||||
@mouseleave="hideMenu" @mouseover="showMenu(item)">
|
||||
<div class="flex-1 py-5 sm:p-4 !p-4">
|
||||
<el-space class="text-gray-700 dark:text-white text-base font-semibold h-[28px] flex justify-center items-center">
|
||||
<el-image v-if="item.icon" :alt="item.name" :src="item.icon" style="height: 30px"/>
|
||||
<span :title="item.name" class="text-lg line-clamp-1">{{ item.name }}</span>
|
||||
<span :title="item.name" class="line-clamp-1 text-sm lg:text-lg">{{ item.name }}</span>
|
||||
</el-space>
|
||||
</div>
|
||||
</el-card>
|
||||
</nuxt-link>
|
||||
</el-col>
|
||||
<el-col v-for="(item,index) in list" :key="index" :sm="6" :xs="12" class="left mb-2 hidden-sm-and-up">
|
||||
<nuxt-link :to="`${item.url}`" class="flex-1 cursor-pointer flex flex-col text-center" target="_blank">
|
||||
<el-card :body-style="{ padding: '0px' }" class="items-center flex justify-center" shadow="hover"
|
||||
@mouseleave="hideMenu" @mouseover="showMenu(item)">
|
||||
<div class="flex-1 py-1 sm:p-0 !p-0">
|
||||
<el-space class="text-gray-700 dark:text-white text-base font-semibold h-[28px] flex justify-center items-center">
|
||||
<el-image v-if="item.icon" :alt="item.name" :src="item.icon" style="height: 30px"/>
|
||||
<span :title="item.name" class="line-clamp-1 text-sm lg:text-lg">{{ item.name }}</span>
|
||||
</el-space>
|
||||
</div>
|
||||
</el-card>
|
||||
@@ -68,7 +81,7 @@ const hideMenu = () => {
|
||||
|
||||
// 请求数据
|
||||
const reload = async () => {
|
||||
pageCmsLink({limit: 6}).then(data => {
|
||||
pageCmsLink({limit: 36}).then(data => {
|
||||
list.value = data?.list || [];
|
||||
})
|
||||
}
|
||||
|
||||
123
components/Index/ZSNews.vue
Normal file
123
components/Index/ZSNews.vue
Normal file
@@ -0,0 +1,123 @@
|
||||
<template>
|
||||
<div class="xl:w-screen-xl m-auto px-4 sm:px-0">
|
||||
<el-row :gutter="24" id="container" class="clearfix">
|
||||
<el-col :span="8" :xs="24">
|
||||
<el-card shadow="hover" :body-style="{ padding: '0px' }" class=" hover:bg-gray-50 cursor-pointer mb-5" >
|
||||
<template #header>
|
||||
<div class="text-lg font-medium">
|
||||
招生就业
|
||||
</div>
|
||||
</template>
|
||||
<div class="px-5">
|
||||
<template v-for="(item,index) in zsList" :key="index">
|
||||
<nuxt-link :to="`/detail/${item.articleId}.html`" class="item">
|
||||
<div class="text-lg my-3 flex justify-between">
|
||||
<span class="title text-gray-800 hover:text-green-700 line-clamp-2 text-sm lg:text-lg">{{ item.title }}</span>
|
||||
<span class="text-gray-400 text-sm text-right w-[100px]">{{ dayjs(item.createTime).format('MM-DD') }}</span>
|
||||
</div>
|
||||
</nuxt-link>
|
||||
</template>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="8" :xs="24">
|
||||
<el-card shadow="hover" :body-style="{ padding: '0px' }" class=" hover:bg-gray-50 cursor-pointer mb-5" >
|
||||
<template #header>
|
||||
<div class="text-lg font-medium">
|
||||
通知公告
|
||||
</div>
|
||||
</template>
|
||||
<div class="px-5">
|
||||
<template v-for="(item,index) in tzList" :key="index">
|
||||
<nuxt-link :to="`/detail/${item.articleId}.html`" class="item">
|
||||
<div class="text-lg my-3 flex justify-between">
|
||||
<span class="title text-gray-800 hover:text-green-700 line-clamp-2 text-sm lg:text-lg">{{ item.title }}</span>
|
||||
<span class="text-gray-400 text-sm text-right w-[100px]">{{ dayjs(item.createTime).format('MM-DD') }}</span>
|
||||
</div>
|
||||
</nuxt-link>
|
||||
</template>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="8" :xs="24">
|
||||
<el-card shadow="hover" :body-style="{ padding: '0px' }" class=" hover:bg-gray-50 cursor-pointer mb-5" >
|
||||
<template #header>
|
||||
<div class="text-lg font-medium">
|
||||
教学教研
|
||||
</div>
|
||||
</template>
|
||||
<div class="px-5">
|
||||
<template v-for="(item,index) in jyList" :key="index">
|
||||
<nuxt-link :to="`/detail/${item.articleId}.html`" class="item">
|
||||
<div class="text-lg my-3 flex justify-between">
|
||||
<span class="title text-gray-800 hover:text-green-700 line-clamp-2 text-sm lg:text-lg">{{ item.title }}</span>
|
||||
<span class="text-gray-400 text-sm text-right w-[100px]">{{ dayjs(item.createTime).format('MM-DD') }}</span>
|
||||
</div>
|
||||
</nuxt-link>
|
||||
</template>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div v-if="disabled" class="px-1 text-center text-gray-500 min-h-xs">
|
||||
没有更多了
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import {navigateTo} from "#imports";
|
||||
import dayjs from "dayjs";
|
||||
import type {CmsArticle} from "~/api/cms/cmsArticle/model";
|
||||
import {listCmsArticle, pageCmsArticle} from "~/api/cms/cmsArticle";
|
||||
import type {CmsArticleParam} from "~/api/cms/cmsArticle/model";
|
||||
import Carousel from "~/components/Index/Carousel.vue";
|
||||
import HotNewsCarousel from "~/components/Index/HotNewsCarousel.vue";
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
param?: CmsArticleParam;
|
||||
disabled?: boolean;
|
||||
categoryId?: number;
|
||||
title?: string;
|
||||
comments?: string;
|
||||
fit?: any;
|
||||
}>(),
|
||||
{
|
||||
fit: 'cover'
|
||||
}
|
||||
);
|
||||
|
||||
const emit = defineEmits<{
|
||||
(e: 'done'): void;
|
||||
}>();
|
||||
|
||||
const zsList = ref<CmsArticle[]>([]);
|
||||
const tzList = ref<CmsArticle[]>([]);
|
||||
const jyList = ref<CmsArticle[]>([]);
|
||||
|
||||
// 请求数据
|
||||
const reload = async () => {
|
||||
pageCmsArticle({
|
||||
limit: 8,
|
||||
recommend: 1,
|
||||
parentId: 4132
|
||||
}).then(res => {
|
||||
zsList.value = res?.list || [];
|
||||
})
|
||||
pageCmsArticle({
|
||||
limit: 8,
|
||||
recommend: 1,
|
||||
categoryId: 4152
|
||||
}).then(res => {
|
||||
tzList.value = res?.list || [];
|
||||
})
|
||||
pageCmsArticle({
|
||||
limit: 8,
|
||||
parentId: 4133
|
||||
}).then(res => {
|
||||
jyList.value = res?.list || [];
|
||||
})
|
||||
}
|
||||
reload();
|
||||
</script>
|
||||
@@ -24,8 +24,10 @@ export const useClientRequest = <T = unknown>(url: string, opts?: FetchOptions)
|
||||
const defaultOptions: FetchOptions = {
|
||||
baseURL: baseUrl.value,
|
||||
onRequest({ options }) {
|
||||
// @ts-ignore
|
||||
options.headers = (options.headers || {}) as { [key: string]: string };
|
||||
if (token.value) {
|
||||
// @ts-ignore
|
||||
options.headers.Authorization = token.value;
|
||||
}
|
||||
},
|
||||
|
||||
@@ -27,12 +27,15 @@ export const useServerRequest = <T>(url: string, opts?: UseFetchOptions<T, unkno
|
||||
const defaultOptions: UseFetchOptions<unknown> = {
|
||||
baseURL: baseUrl.value,
|
||||
onRequest({ options }) {
|
||||
// @ts-ignore
|
||||
options.headers = (options.headers || {}) as { [key: string]: string };
|
||||
// TODO 0 默认租户ID
|
||||
if(process.env.NODE_ENV === 'development') {
|
||||
// @ts-ignore
|
||||
options.headers.tenantid = `${runtimeConfig.public.tenantId}`;
|
||||
}
|
||||
if (token.value) {
|
||||
// @ts-ignore
|
||||
options.headers.Authorization = token.value;
|
||||
}
|
||||
// TODO 1 从二级域名解构租户ID
|
||||
@@ -45,6 +48,7 @@ export const useServerRequest = <T>(url: string, opts?: UseFetchOptions<T, unkno
|
||||
}
|
||||
// TODO 2 从绑定域名解构的租户ID
|
||||
if(localStorage.getItem('TenantId')){
|
||||
// @ts-ignore
|
||||
options.headers.tenantid = `${localStorage.getItem('TenantId')}`;
|
||||
}
|
||||
},
|
||||
|
||||
@@ -10,7 +10,7 @@ export const SERVER_API_URL = import.meta.env.VITE_SERVER_URL || 'https://server
|
||||
export const MODULES_API_URL = import.meta.env.VITE_API_URL || 'https://cms-api.websoft.top/api';
|
||||
export const COMMON_API_URL = import.meta.env.VITE_THINK_URL || 'https://common-api.websoft.top/api';
|
||||
// 文件服务器地址
|
||||
export const FILE_SERVER = 'https://file.wsdns.cn';
|
||||
export const FILE_SERVER = 'https://gxbsnx.com';
|
||||
|
||||
/**
|
||||
* 以下配置一般不需要修改
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
*/
|
||||
|
||||
// 填租户ID
|
||||
const appId = 10491;
|
||||
const appId = 10490;
|
||||
// 接口地址
|
||||
let apiBaseUrl = 'https://cms-api.websoft.top/api'
|
||||
// 应用名称
|
||||
const appName = '工匠基地';
|
||||
const appName = '广西百色农业学校';
|
||||
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ export default defineNuxtConfig({
|
||||
],
|
||||
link: [{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }],
|
||||
script: [
|
||||
{ innerHTML: 'var备案号 = "备案号:桂ICP备13003666号";', type: 'text/javascript' }
|
||||
{ innerHTML: 'var备案号 = "备案号:桂ICP备13005851";', type: 'text/javascript' }
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<!-- 底部菜单 -->
|
||||
<TabBar />
|
||||
<TabBar class="bg-red-500" />
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
|
||||
<!-- 主体部分 -->
|
||||
<div class="xl:w-screen-xl m-auto py-4 mt-12 px-4 sm:px-0 sm:mt-20">
|
||||
<div class="xl:w-screen-xl m-auto py-4 mt-12 px-4 sm:px-0 sm:mt-[220px]">
|
||||
<el-page-header :icon="ArrowLeft" @back="goBack">
|
||||
<template #content>
|
||||
<span class="text-large font-600"> {{ page.title }} </span>
|
||||
@@ -41,7 +41,7 @@ import { ArrowLeft,View,Search } from '@element-plus/icons-vue'
|
||||
import {useLayout, usePage} from "~/composables/configState";
|
||||
import type {CmsNavigation} from "~/api/cms/cmsNavigation/model";
|
||||
import type {CmsArticle, CmsArticleParam} from "~/api/cms/cmsArticle/model";
|
||||
import {getNavIdByParamsId, getViews, paramsId} from "~/utils/common";
|
||||
import {getImage, getNavIdByParamsId, getViews, paramsId} from "~/utils/common";
|
||||
import dayjs from "dayjs";
|
||||
import {getCmsNavigation, listCmsNavigation} from "~/api/cms/cmsNavigation";
|
||||
import {pageCmsArticle} from "~/api/cms/cmsArticle";
|
||||
@@ -97,7 +97,10 @@ const reload = async () => {
|
||||
pageCmsArticle(where).then(response => {
|
||||
if(response){
|
||||
total.value = response?.count;
|
||||
list.value = response?.list;
|
||||
list.value = response?.list.map(d => {
|
||||
d.image = getImage(d.image);
|
||||
return d;
|
||||
});
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<!-- 文章详情 -->
|
||||
<template>
|
||||
<!-- 主体部分 -->
|
||||
<div class="xl:w-screen-xl m-auto py-4 mt-12 px-4 sm:px-0 sm:mt-20">
|
||||
<div class="xl:w-screen-xl m-auto py-4 mt-12 px-4 sm:px-0 sm:mt-[220px]">
|
||||
<el-page-header :icon="ArrowLeft" @back="goBack">
|
||||
<template #content>
|
||||
<span class="font-600 mr-3"> 文章详情 </span>
|
||||
@@ -88,6 +88,7 @@ import {listCmsNavigation} from "~/api/cms/cmsNavigation";
|
||||
import CmsArticleRecently from "~/components/CmsRecently.vue";
|
||||
import Tags from "~/components/Tags.vue";
|
||||
import Content from "~/components/Content.vue";
|
||||
import {FILE_SERVER} from "~/config";
|
||||
|
||||
// 引入状态管理
|
||||
const route = useRoute();
|
||||
@@ -213,6 +214,10 @@ const reload = async () => {
|
||||
category.value = list;
|
||||
})
|
||||
}
|
||||
// 拼接图片路径
|
||||
if(data.content){
|
||||
form.content = form.content?.replace(/src="\//g, 'src="' + FILE_SERVER + '/');
|
||||
}
|
||||
|
||||
if(form.permission === 1){
|
||||
console.log('登录可见')
|
||||
|
||||
@@ -3,23 +3,17 @@
|
||||
<!-- 幻灯片轮播 -->
|
||||
<Carousel/>
|
||||
|
||||
<!-- 着陆页 -->
|
||||
<!-- <LandingHero/>-->
|
||||
<Ad421 />
|
||||
|
||||
<!-- 站点列表 -->
|
||||
<!-- <SiteList/>-->
|
||||
|
||||
<!-- 插件列表 -->
|
||||
<!-- <MarketList />-->
|
||||
<Ad422 />
|
||||
|
||||
<!-- 热点新闻 -->
|
||||
<HotNews title="热点新闻" :categoryId="650"/>
|
||||
<BNNews title="百农新闻"/>
|
||||
|
||||
<ZSNews />
|
||||
|
||||
<!-- 媒体视角 -->
|
||||
<HotNews title="媒体视角" :categoryId="652"/>
|
||||
|
||||
<!-- 客户案例 -->
|
||||
<!-- <CaseList/>-->
|
||||
<HotNews title="校园风光" :categoryId="4144"/>
|
||||
|
||||
<!-- 合作伙伴 -->
|
||||
<Partners/>
|
||||
@@ -41,13 +35,13 @@ import {pageCmsLink} from "~/api/cms/cmsLink";
|
||||
import {addCmsOrder} from "~/api/cms/cmsOrder";
|
||||
import {getCaptcha} from "~/api/passport/login";
|
||||
import Carousel from "~/components/Index/Carousel.vue";
|
||||
import LandingHero from "~/components/Index/LandingHero.vue";
|
||||
import SiteList from "~/components/Index/SiteList.vue";
|
||||
import MarketList from "~/components/Index/MarketList.vue";
|
||||
import HotNews from "~/components/Index/HotNews.vue";
|
||||
import CaseList from "~/components/Index/CaseList.vue"
|
||||
import Partners from "~/components/Index/Partners.vue";
|
||||
import Customized from "~/components/Index/Customized.vue";
|
||||
import BNNews from "~/components/Index/BNNews.vue";
|
||||
import Ad421 from "~/components/Index/Ad421.vue";
|
||||
import Ad422 from "~/components/Index/Ad422.vue";
|
||||
import ZSNews from "~/components/Index/ZSNews.vue";
|
||||
|
||||
const route = useRoute();
|
||||
const i18n = useI18n();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
|
||||
<!-- 主体部分 -->
|
||||
<div class="xl:w-screen-xl m-auto py-4 mt-12 px-4 sm:px-0 sm:mt-20">
|
||||
<div class="xl:w-screen-xl m-auto py-4 mt-12 px-4 sm:px-0 sm:mt-[220px]">
|
||||
<el-page-header :icon="ArrowLeft" @back="goBack">
|
||||
<template #content>
|
||||
<span class="text-large font-600"> {{ page.title }} </span>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
|
||||
<!-- 主体部分 -->
|
||||
<div class="xl:w-screen-xl m-auto py-4 mt-12 px-4 sm:px-0 sm:mt-20">
|
||||
<div class="xl:w-screen-xl m-auto py-4 mt-12 px-4 sm:px-0 sm:mt-[220px]">
|
||||
<el-page-header :icon="ArrowLeft" @back="goBack">
|
||||
<template #content>
|
||||
<span class="text-large font-600 line-clamp-1"> 网址导航 </span>
|
||||
@@ -32,24 +32,15 @@
|
||||
</el-dialog>
|
||||
</template>
|
||||
<el-row id="container" :gutter="24" class="clearfix">
|
||||
<el-col v-for="(item,index) in list" :key="index" :sm="4" :xs="12" class="left mb-8">
|
||||
<el-col v-for="(item,index) in list" :key="index" :sm="6" :xs="12" class="left mb-8">
|
||||
<nuxt-link :to="`${item.url}`" class="flex-1 cursor-pointer flex flex-col text-center" target="_blank">
|
||||
<el-card :body-style="{ padding: '0px' }" class="items-center flex justify-center" shadow="hover">
|
||||
<el-popover
|
||||
:content="item.comments"
|
||||
:width="200"
|
||||
placement="bottom"
|
||||
trigger="hover"
|
||||
>
|
||||
<template #reference>
|
||||
<div class="flex-1 py-5 sm:p-4 !p-4">
|
||||
<el-space class="text-gray-700 dark:text-white text-base font-semibold h-[28px] flex justify-center items-center">
|
||||
<el-image v-if="item.icon" :alt="item.name" :src="item.icon" style="height: 32px"/>
|
||||
<span :title="item.name" class="text-lg line-clamp-1">{{ item.name }}</span>
|
||||
</el-space>
|
||||
</div>
|
||||
</template>
|
||||
</el-popover>
|
||||
<div class="flex-1 py-5 sm:p-4 !p-4">
|
||||
<el-space class="text-gray-700 dark:text-white text-base font-semibold h-[28px] flex justify-center items-center">
|
||||
<el-image v-if="item.icon" :alt="item.name" :src="item.icon" style="height: 32px"/>
|
||||
<span :title="item.name" class="text-lg line-clamp-1">{{ item.name }}</span>
|
||||
</el-space>
|
||||
</div>
|
||||
</el-card>
|
||||
</nuxt-link>
|
||||
</el-col>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<!-- Banner -->
|
||||
<Banner :layout="layout"/>
|
||||
<!-- 主体部分 -->
|
||||
<div class="xl:w-screen-xl m-auto py-4 mt-12 px-4 sm:px-0 sm:mt-20">
|
||||
<div class="xl:w-screen-xl m-auto py-4 mt-12 px-4 sm:px-0 sm:mt-[220px]">
|
||||
<el-page-header :icon="ArrowLeft" @back="goBack">
|
||||
<template #content>
|
||||
<span class="text-large font-600"> {{ page.title }} </span>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<!-- Banner -->
|
||||
<Banner :layout="layout"/>
|
||||
<!-- 主体部分 -->
|
||||
<div class="xl:w-screen-xl m-auto py-4 mt-12 px-4 sm:px-0 sm:mt-20">
|
||||
<div class="xl:w-screen-xl m-auto py-4 mt-12 px-4 sm:px-0 sm:mt-[220px]">
|
||||
<el-page-header :icon="ArrowLeft" @back="goBack">
|
||||
<template #content>
|
||||
<span class="text-large font-600"> {{ page.title }} </span>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<!-- Banner -->
|
||||
<Banner :layout="layout" />
|
||||
<!-- 主体部分 -->
|
||||
<div class="xl:w-screen-xl m-auto py-4 px-4 sm:px-0">
|
||||
<div class="xl:w-screen-xl m-auto mt-12 py-4 px-4 sm:px-0">
|
||||
<el-page-header :icon="ArrowLeft" @back="goBack">
|
||||
<template #content>
|
||||
<span class="text-large font-600"> {{ page.title || '页面标题' }} </span>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<!-- 主体部分 -->
|
||||
<div class="xl:w-screen-xl m-auto py-4 mt-20">
|
||||
<div class="xl:w-screen-xl m-auto py-4 mt-[220px]">
|
||||
<el-page-header :icon="ArrowLeft" @back="goBack">
|
||||
<template #content>
|
||||
<span class="text-large font-600"> {{ '站内搜索' }} </span>
|
||||
@@ -14,7 +14,7 @@
|
||||
<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="`/${item.detail}/${item.articleId}.html`">
|
||||
<nuxt-link :to="`/detail/${item.articleId}.html`">
|
||||
<el-image
|
||||
:src="item.image"
|
||||
fit="cover"
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 635 B After Width: | Height: | Size: 698 B |
@@ -1,4 +1,5 @@
|
||||
import type {CmsArticle} from "~/api/cms/cmsArticle/model";
|
||||
import {FILE_SERVER} from "~/config";
|
||||
const route = useRoute();
|
||||
/**
|
||||
* 判断是否为整数
|
||||
@@ -187,3 +188,12 @@ export const copyText = (text: string) => {
|
||||
// 复制成功后再将构造的标签 移除
|
||||
document.body.removeChild(cInput);
|
||||
};
|
||||
|
||||
|
||||
export const getImage = (text: any) => {
|
||||
// 是否包含字符串
|
||||
if(text.indexOf('/upfile') > -1){
|
||||
return FILE_SERVER + text;
|
||||
}
|
||||
return `${text}`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user