From ba3c3b715f6df5b1d0b2759d1adb14d753559a72 Mon Sep 17 00:00:00 2001 From: jiannibang <271381693@qq.com> Date: Tue, 10 Jan 2023 13:56:25 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0debug=E8=B0=83?= =?UTF-8?q?=E8=AF=95=E8=83=BD=E5=8A=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + public/static/offline/JSON/config.json | 5 +++-- src/composables/useInitConfigAndMallInfo.js | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index e58c51c..bb257e6 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "pinia": "^2.0.11", "qrcodejs2": "^0.0.2", "swiper": "^8.0.7", + "vconsole": "^3.15.0", "vue": "^3.2.13", "vue-i18n": "^9.1.9", "vue-router": "^4.0.3" diff --git a/public/static/offline/JSON/config.json b/public/static/offline/JSON/config.json index c07cb5a..61f7f05 100644 --- a/public/static/offline/JSON/config.json +++ b/public/static/offline/JSON/config.json @@ -2,9 +2,10 @@ "code": "200", "msg": "", "data": { - "interfaceUrl": "https://test.iot.1000my.com/api", + "interfaceUrl": "https://project-iot.test.1000my.com/api", "sourceUrl": "/static/offline", "backSocket": "ws://127.0.0.1:7181", - "mobileNav": "https://1000my.obs.cn-east-2.myhuaweicloud.com/mobileqmgo/index.html#/" + "mobileNav": "https://1000my.obs.cn-east-2.myhuaweicloud.com/mobileqmgo/index.html#/", + "debug": true } } diff --git a/src/composables/useInitConfigAndMallInfo.js b/src/composables/useInitConfigAndMallInfo.js index e53dad1..6a9186e 100644 --- a/src/composables/useInitConfigAndMallInfo.js +++ b/src/composables/useInitConfigAndMallInfo.js @@ -1,10 +1,11 @@ import { getConfig, getCurrentFloor, getGuideList, getTheme } from '@/http/api' import { useStore } from '@/store/root' +import VConsole from 'vconsole' export const useInitConfigAndMallInfo = async () => { const _config = await getConfig() const store = useStore() - + if (_config.data.debug) new VConsole() { const { data: theme } = await getTheme() const r = document.querySelector(':root')