|
|
@ -2,15 +2,15 @@ |
|
|
|
|
|
|
|
<!-- <Flash/>--> |
|
|
|
|
|
|
|
<Carousel /> |
|
|
|
<Carousel v-if="config" /> |
|
|
|
|
|
|
|
<NewsCenter title="新闻中心" comments="News Center"/> |
|
|
|
<NewsCenter title="新闻中心" v-if="config" :parentId="parentId" :config="config" comments="News Center"/> |
|
|
|
|
|
|
|
<AboutUs title="关于我们" comments="About Us"/> |
|
|
|
<AboutUs title="关于我们" v-if="config" :config="config" comments="About Us"/> |
|
|
|
|
|
|
|
<VideoCenter title="视频中心" comments="Video Center" /> |
|
|
|
<VideoCenter title="视频中心" v-if="config" :config="config" comments="Video Center" /> |
|
|
|
|
|
|
|
<CompanyStyle title="公司风采" comments="Company Style" /> |
|
|
|
<CompanyStyle title="公司风采" v-if="config" :groupId="groupId" :config="config" comments="Company Style" /> |
|
|
|
|
|
|
|
|
|
|
|
<!-- <CompanyList :param="{official: true,recommend: true,limit: 4}" :fit="`cover`" title="产品服务" comments="拥抱开源、坚守品质;致力于打造安全稳定高可用的WEB应用!"/>--> |
|
|
@ -20,7 +20,7 @@ |
|
|
|
</template> |
|
|
|
<script setup lang="ts"> |
|
|
|
import {useConfigInfo, useForm, useToken, useWebsite} from "~/composables/configState"; |
|
|
|
import type {BreadcrumbItem} from "~/types/global"; |
|
|
|
import type {BreadcrumbItem, Config} from "~/types/global"; |
|
|
|
import Flash from './components/Flash.vue'; |
|
|
|
import ArticleList from './components/ArticleList.vue'; |
|
|
|
import NewsCenter from "~/pages/components/NewsCenter.vue"; |
|
|
@ -28,21 +28,24 @@ import AboutUs from "~/pages/components/AboutUs.vue"; |
|
|
|
import VideoCenter from "~/pages/components/VideoCenter.vue"; |
|
|
|
import CompanyStyle from "~/pages/components/CompanyStyle.vue"; |
|
|
|
import Carousel from "~/pages/components/Carousel.vue"; |
|
|
|
import type {ApiResult} from "~/api"; |
|
|
|
|
|
|
|
// 引入状态管理 |
|
|
|
const route = useRoute(); |
|
|
|
const layout = ref<any>(); |
|
|
|
const token = useToken(); |
|
|
|
const form = useForm(); |
|
|
|
const config = useConfigInfo(); |
|
|
|
const groupId = ref() |
|
|
|
const parentId = ref() |
|
|
|
const breadcrumb = ref<BreadcrumbItem>(); |
|
|
|
|
|
|
|
// 请求数据 |
|
|
|
const reload = async () => { |
|
|
|
|
|
|
|
// 页面布局 |
|
|
|
if (form.value?.layout) { |
|
|
|
layout.value = JSON.parse(form.value?.layout) |
|
|
|
} |
|
|
|
// if (form.value?.layout) { |
|
|
|
// layout.value = JSON.parse(form.value?.layout) |
|
|
|
// } |
|
|
|
|
|
|
|
// 未登录状态(是否强制登录) |
|
|
|
if (!token.value || token.value == '') { |
|
|
@ -52,6 +55,13 @@ const reload = async () => { |
|
|
|
// } |
|
|
|
} |
|
|
|
|
|
|
|
// 网站参数 |
|
|
|
const { data: fields } = await useServerRequest<ApiResult<Config>>('/cms/cms-website-field/config', {baseURL: 'https://server.gxwebsoft.com/api',}); |
|
|
|
if (fields.value?.data) { |
|
|
|
config.value = fields.value?.data; |
|
|
|
groupId.value = config.value?.IndexPhotoGroupId; |
|
|
|
parentId.value = config.value?.IndexNewsCenterParentId; |
|
|
|
} |
|
|
|
// seo |
|
|
|
useHead({ |
|
|
|
title: `构建现代WEB应用 · WEBSOFT`, |
|
|
|