From 7a899c2445082a73b527d0a5965695e1b3ce0444 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=BF=A0=E6=9E=97?= <170083662@qq.com> Date: Tue, 12 Nov 2024 13:33:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B7=B2=E7=9F=A5=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/cms/cmsNavigation/model/index.ts | 2 ++ composables/configState.ts | 18 +++++------ nuxt.config.ts | 4 +-- pages/components/AboutUs.vue | 35 ++++++++++------------ pages/components/Carousel.vue | 18 +++++++---- pages/components/CompanyStyle.vue | 45 +++++++++++++--------------- pages/components/NewsCenter.vue | 34 ++++++++++++++++----- pages/components/VideoCenter.vue | 23 +++++--------- pages/index.vue | 30 ++++++++++++------- 9 files changed, 114 insertions(+), 95 deletions(-) diff --git a/api/cms/cmsNavigation/model/index.ts b/api/cms/cmsNavigation/model/index.ts index 39deea9..66529e2 100644 --- a/api/cms/cmsNavigation/model/index.ts +++ b/api/cms/cmsNavigation/model/index.ts @@ -1,4 +1,5 @@ import type { PageParam } from '@/api'; +import type {CmsDesign} from "~/api/cms/cmsDesign/model"; /** * 网站导航记录表 @@ -77,6 +78,7 @@ export interface CmsNavigation { disabled?: boolean; label?: string; value?: number; + design?: CmsDesign; } /** diff --git a/composables/configState.ts b/composables/configState.ts index bee2c09..74782dd 100644 --- a/composables/configState.ts +++ b/composables/configState.ts @@ -1,37 +1,35 @@ import { useState } from '#imports'; -import type { Config } from '~/types/global'; -import type {Website} from "~/api/cms/website/model"; -import type {Navigation} from "~/api/cms/navigation/model"; +import type {CmsWebsite} from "~/api/cms/cmsWebsite/model"; +import type {CmsNavigation} from "~/api/cms/cmsNavigation/model"; import type {User} from "~/api/system/user/model"; import type {Company} from "~/api/system/company/model"; -import type {MyCart, ShopCart} from "~/api/shop/shopCart/model"; // 网站信息 export const useWebsite = () => - useState('website', () => { + useState('website', () => { return {}; }); // 参数配置 export const useConfigInfo = () => - useState('config', () => { + useState('config', () => { return {}; }); // 主导航 export const useMenu = () => - useState('menu', () => { + useState('menu', () => { return []; }); // 副导航 export const useSubMenu = () => - useState('subMenu', () => { + useState('subMenu', () => { return []; }); // 页面元素 -export const useForm = () => useState('form', () => { +export const useForm = () => useState('form', () => { return {}; }); @@ -73,7 +71,7 @@ export const useCompany = () => export const useShowLogin = () => useState('showLogin',() => false) // 购物车状态 -export const useCart = () => useState('cart', () => { +export const useCart = () => useState('cart', () => { return { num: 1, type: 1, diff --git a/nuxt.config.ts b/nuxt.config.ts index 7ad9dfd..53090e6 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -27,11 +27,11 @@ export default defineNuxtConfig({ } }, devServer: { - port: 10301 + port: 10304 }, runtimeConfig: { public: { - tenantId: 10301, + tenantId: 10304, // 开发环境配置 // apiServer: 'http://127.0.0.1:9002/api', // 生产环境 diff --git a/pages/components/AboutUs.vue b/pages/components/AboutUs.vue index ea46967..599e900 100644 --- a/pages/components/AboutUs.vue +++ b/pages/components/AboutUs.vue @@ -1,5 +1,5 @@