From 8e69969c0e9f0828a8f5c8ebbdb77813a1e94b47 Mon Sep 17 00:00:00 2001 From: gyq <875626088@qq.com> Date: Fri, 5 Jul 2024 18:08:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.production | 4 +-- package.json | 2 +- src/App.vue | 3 +- src/components/more.vue | 21 +++++++++++++ src/router/index.js | 5 +++ src/views/webview/index.vue | 61 +++++++++++++++++++++++++++++++++++++ 6 files changed, 92 insertions(+), 4 deletions(-) create mode 100644 src/views/webview/index.vue diff --git a/.env.production b/.env.production index 78f60f4..66fd823 100644 --- a/.env.production +++ b/.env.production @@ -11,7 +11,7 @@ VITE_API_WSS = 'wss://cashier.sxczgkj.cn/client' VITE_API_PHP_URL = 'http://192.168.2.33:1666/index.php/api' # 测试 -VITE_API_URL = 'https://cashier-client.sxczgkj.cn/cashier-client' +# VITE_API_URL = 'https://cashier-client.sxczgkj.cn/cashier-client' # 线上环境接口地址 -# VITE_API_URL = 'https://cashierclient.sxczgkj.cn/cashier-client/' \ No newline at end of file +VITE_API_URL = 'https://cashierclient.sxczgkj.cn/cashier-client/' \ No newline at end of file diff --git a/package.json b/package.json index f6b799a..4ba82c4 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "vite-electron", "private": true, - "version": "1.3.37", + "version": "1.3.39", "main": "dist-electron/main.js", "scripts": { "dev": "chcp 65001 && vite", diff --git a/src/App.vue b/src/App.vue index 9c13d9a..a55428d 100644 --- a/src/App.vue +++ b/src/App.vue @@ -63,7 +63,8 @@ watch(route, (to) => { if (to.meta.keepAlive) { includeList.push(to.name); } - let arr = ["/login", "/device_list", "/add_device", "/add_label"]; + // 需要全屏的路由 + let arr = ["/login", "/device_list", "/add_device", "/add_label", '/webview']; if (arr.includes(to.path)) { hideLeftMenu.value = true; } else { diff --git a/src/components/more.vue b/src/components/more.vue index 70873ed..e0e8969 100644 --- a/src/components/more.vue +++ b/src/components/more.vue @@ -70,6 +70,19 @@ 锁屏 + @@ -113,6 +126,14 @@ function openCallHandle() { emit('openCall') } +// 跳转 +function to(pathName, data) { + router.push({ + name: pathName, + query: data + }) +} + defineExpose({ show }) diff --git a/src/router/index.js b/src/router/index.js index 786a89b..26f0fed 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -88,6 +88,11 @@ const routes = [ name: "add_label", component: () => import("@/views/device/add_label.vue"), }, + { + path: "/webview", + name: "webview", + component: () => import("@/views/webview/index.vue"), + }, ]; const router = createRouter({ diff --git a/src/views/webview/index.vue b/src/views/webview/index.vue new file mode 100644 index 0000000..aa7b3bf --- /dev/null +++ b/src/views/webview/index.vue @@ -0,0 +1,61 @@ + + + + + \ No newline at end of file