From 714eff50b2d79e64d72f7ccad284dcd529126509 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=BF=A0=E6=9E=97?= <170083662@qq.com> Date: Wed, 8 Jan 2025 10:37:59 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BD=91=E7=AB=99=E5=85=B3=E9=97=AD=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E7=A6=81=E7=94=A8=E9=A2=84=E8=A7=88=E5=9C=B0=E5=9D=80?= =?UTF-8?q?=E7=9A=84=E6=89=93=E5=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 12 +- src/api/cms/website/model/index.ts | 1 + src/utils/common.ts | 5 + src/views/cms/navigation/index.vue | 14 +- src/views/cms/website/index.vue | 1 + yarn.lock | 8964 ++++++++++++++-------------- 6 files changed, 4518 insertions(+), 4479 deletions(-) diff --git a/.env.development b/.env.development index b65099a..a189928 100644 --- a/.env.development +++ b/.env.development @@ -1,7 +1,11 @@ VITE_APP_NAME=后台管理系统 VITE_SOCKET_URL=wss://server.gxwebsoft.com -VITE_SERVER_URL=https://server.gxwebsoft.com/api -VITE_API_URL=https://modules.gxwebsoft.com/api -#VITE_THINK_URL=https://gxtyzx-api.websoft.top/api +VITE_SERVER_URL=https://gxtyzx-server.websoft.top/api +VITE_API_URL=https://gxtyzx-modules.websoft.top/api +VITE_THINK_URL=https://gxtyzx-api2.websoft.top/api -VITE_THINK_URL=http://127.0.0.1:9099/api + +#VITE_SERVER_URL=http://127.0.0.1:30000/api +#VITE_API_URL=http://127.0.0.1:9002/api +#VITE_THINK_URL=http://127.0.0.1:9099/api +#/booking/bookingItem diff --git a/src/api/cms/website/model/index.ts b/src/api/cms/website/model/index.ts index 785f28a..2b6e0ec 100644 --- a/src/api/cms/website/model/index.ts +++ b/src/api/cms/website/model/index.ts @@ -58,6 +58,7 @@ export interface Website { export interface WebsiteParam extends PageParam { title?: string; path?: string; + websiteCode?: string; authority?: string; parentId?: number; } diff --git a/src/utils/common.ts b/src/utils/common.ts index 4bd64c9..4fae00d 100644 --- a/src/utils/common.ts +++ b/src/utils/common.ts @@ -88,6 +88,11 @@ export function openSpmUrl( const timestamp = ref(Date.now() / 1000); token.value = `&token=${uuid()}`; + // 判断网站是否禁用 + if (localStorage.getItem('WebsiteStatus')) { + return false; + } + // 判断模型 if (d?.goodsId) { model.value = 'g'; diff --git a/src/views/cms/navigation/index.vue b/src/views/cms/navigation/index.vue index 6941015..5bdaf0f 100644 --- a/src/views/cms/navigation/index.vue +++ b/src/views/cms/navigation/index.vue @@ -211,7 +211,7 @@ import { getSiteInfo } from '@/api/layout'; import { Design } from '@/api/cms/design/model'; import { getMerchantId } from '@/utils/merchant'; - import { removeSiteInfoCache } from '@/api/cms/website'; + import {listWebsite, removeSiteInfoCache} from '@/api/cms/website'; import { getMerchant } from "@/api/shop/merchant"; // 表格实例 @@ -507,6 +507,18 @@ } }; }; + + /* 查询 */ + const query = () => { + listWebsite({ websiteCode: 'gxtyzx' }).then((list) => { + const item = list[0]; + if (item.status != 1) { + localStorage.setItem('WebsiteStatus', '1'); + return; + } + }); + }; + query();