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();