From bcd3437b963c36ff5e2cfdcb63edf8e250643742 Mon Sep 17 00:00:00 2001 From: zjf <1799650030@qq.com> Date: Fri, 8 May 2026 22:57:15 +0800 Subject: [PATCH] zzd --- .env | 14 ++++++++++---- index.html | 5 ----- package.json | 3 ++- src/env.d.ts | 8 ++++++++ src/main.ts | 7 +++++++ 5 files changed, 27 insertions(+), 10 deletions(-) diff --git a/.env b/.env index 272088f..165c62c 100644 --- a/.env +++ b/.env @@ -1,3 +1,6 @@ +# H5:true 时在页面加载 vConsole(浙政钉内可看 Network/Log);稳定上线后改为 false +VITE_VCONSOLE=true + #是否是TOC应用 VITE_IS_TOC=true @@ -16,18 +19,21 @@ VITE_PWD_ENC_KEY='pigxpigxpigxpigx' # OAUTH2 APP模式客户端信息 VITE_OAUTH2_APP_CLIENT='mini:mini' +# 浙政钉 H5:getAuthCode 用 corpId(与 zzdhome 一致,浙政钉内打开业务 H5 时必填) +# VITE_ZZD_CORP_ID= + # --------------------------- 开发环境 api地址 ---------------------------------- # VITE_APP_DEV_SERVICE = https://stgl.pj.gov.cn/api # 域名线上 #VITE_APP_DEV_SERVICE = http://59.202.170.152:81/api # 信创线上 -VITE_APP_DEV_SERVICE = https://dzc-test-1.fy.takin.cc # 邓-本地 -# VITE_APP_DEV_SERVICE = http://127.0.0.1:9999 # 邓-本地 +; VITE_APP_DEV_SERVICE = https://dzc-test-1.fy.takin.cc # 邓-本地 +VITE_APP_DEV_SERVICE = http://127.0.0.1:9999 # 邓-本地 # VITE_APP_DEV_SERVICE = http://123.157.250.162:8089/api # 测试线上 # --------------------------- 开发环境 图片访问基础地址 --------------------------- # VITE_IMAGE_DEV_PATH = https://stgl.pj.gov.cn/api # 域名线上 #VITE_IMAGE_DEV_PATH = http://59.202.170.152:81/api # 信创线上 -VITE_IMAGE_DEV_PATH = https://dzc-test-1.fy.takin.cc # 邓-本地 -#VITE_IMAGE_DEV_PATH = http://127.0.0.1:9999 +#VITE_IMAGE_DEV_PATH = https://dzc-test-1.fy.takin.cc # 邓-本地 +VITE_IMAGE_DEV_PATH = http://127.0.0.1:9999 # VITE_IMAGE_DEV_PATH = http://123.157.250.162:8089/api # 测试线上 # --------------------------- 生产环境 api地址 ---------------------------------- diff --git a/index.html b/index.html index 2f148ee..2ef6934 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,6 @@ - - diff --git a/package.json b/package.json index 9b3772a..1168979 100644 --- a/package.json +++ b/package.json @@ -68,6 +68,7 @@ "qrcode": "^1.5.4", "qs": "^6.13.1", "radash": "^12.1.0", + "vconsole": "^3.15.1", "vue": "^3.3.11", "vue-i18n": "^9.1.9", "vue-waterfall-plugin-next": "^2.6.5", @@ -91,4 +92,4 @@ "vite": "5.2.8", "vue-tsc": "^1.0.24" } -} \ No newline at end of file +} diff --git a/src/env.d.ts b/src/env.d.ts index d3e9c77..67f2f1f 100644 --- a/src/env.d.ts +++ b/src/env.d.ts @@ -1,5 +1,13 @@ /// +interface ImportMetaEnv { + readonly VITE_VCONSOLE?: string +} + +interface ImportMeta { + readonly env: ImportMetaEnv +} + declare module "gdt-jsapi" { const dd: { getAuthCode: (opts: { corpId?: string }) => Promise } export default dd diff --git a/src/main.ts b/src/main.ts index 9b3e559..5e7005b 100644 --- a/src/main.ts +++ b/src/main.ts @@ -5,6 +5,13 @@ import pinia from "../src/sheep/stores/index" import App from "./App.vue" import tmUi from "./uni_modules/tm-ui" +// #ifdef H5 +import VConsole from "vconsole" +if (import.meta.env.VITE_VCONSOLE === "true") { + new VConsole() +} +// #endif + export function createApp() { const app = createSSRApp(App)