From 80944f86705180ee52c7a4d273efae153e06fcb3 Mon Sep 17 00:00:00 2001
From: yearning <10538594+wangweifeng1999@user.noreply.gitee.com>
Date: 星期五, 26 六月 2026 11:39:30 +0800
Subject: [PATCH] 优化
---
src/main.js | 11 +++++++----
vite.config.js | 6 +++---
src/utils/wxjssdk.js | 4 ++--
3 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/src/main.js b/src/main.js
index 5391ace..043e2ed 100644
--- a/src/main.js
+++ b/src/main.js
@@ -24,9 +24,13 @@
app.component(key, component)
}
-import('vconsole').then((module) => {
- new module.default()
-})
+// ?qxydebug2=true 瑙﹀彂
+const urlParams = new URLSearchParams(window.location.search);
+if (urlParams.get('qxydebug2') === 'true') {
+ import('vconsole').then((module) => {
+ new module.default();
+ });
+}
app.config.globalProperties.$rules = ruleGenerator
app.config.globalProperties.$property = property
@@ -43,7 +47,6 @@
app.use(ElementPlus, {
locale: zhCn,
-
})
const pinia = createPinia()
pinia.use(piniaPluginPersistedstate)
diff --git a/src/utils/wxjssdk.js b/src/utils/wxjssdk.js
index 7312be2..8caae06 100644
--- a/src/utils/wxjssdk.js
+++ b/src/utils/wxjssdk.js
@@ -61,11 +61,11 @@
resolve(localData)
})
} else {
- store.commit('snack/error', `寰俊涓婁紶鍥剧墖澶辫触锛�${res}`)
+ ElMessage.error(`寰俊涓婁紶鍥剧墖澶辫触锛�${res}`)
}
},
fail:function(e) {
- store.commit('snack/error', `寰俊涓婁紶鍥剧墖寮傚父锛�${JSON.stringify(e)}`)
+ ElMessage.error(`寰俊涓婁紶鍥剧墖寮傚父锛�${JSON.stringify(e)}`)
}
})
})
diff --git a/vite.config.js b/vite.config.js
index e829416..28d83f3 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -8,9 +8,9 @@
export default defineConfig({
base: '/examination/verify',
plugins: [vue(), vueDevTools()],
- // esbuild: {
- // drop: ['console', 'debugger']
- // },
+ esbuild: {
+ drop: ['console', 'debugger']
+ },
define: {
// 娉ㄥ叆鏋勫缓鏃堕棿鎴冲埌浠g爜涓�
'__BUILD_TIME__': JSON.stringify(timestamp)
--
Gitblit v1.8.0