Commit 66fd6b7e authored by zhanglongbao's avatar zhanglongbao

fix:历史工单列表无法进入

parent 3793e252
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
"pinia": "^2.2.2", "pinia": "^2.2.2",
"smooth-signature": "^1.0.15", "smooth-signature": "^1.0.15",
"vant": "^4.9.4", "vant": "^4.9.4",
"vconsole": "^3.15.1",
"vue": "^3.4.37", "vue": "^3.4.37",
"vue-router": "^4.4.3" "vue-router": "^4.4.3"
}, },
......
...@@ -23,6 +23,9 @@ dependencies: ...@@ -23,6 +23,9 @@ dependencies:
vant: vant:
specifier: ^4.9.4 specifier: ^4.9.4
version: 4.9.4(vue@3.4.38) version: 4.9.4(vue@3.4.38)
vconsole:
specifier: ^3.15.1
version: 3.15.1
vue: vue:
specifier: ^3.4.37 specifier: ^3.4.37
version: 3.4.38(typescript@5.5.4) version: 3.4.38(typescript@5.5.4)
...@@ -83,6 +86,13 @@ packages: ...@@ -83,6 +86,13 @@ packages:
dependencies: dependencies:
'@babel/types': 7.25.4 '@babel/types': 7.25.4
/@babel/runtime@7.25.6:
resolution: {integrity: sha512-VBj9MYyDb9tuLq7yzqjgzt6Q+IBQLrGZfdjOekyEirZPHxXWoTSGUTMrpsfi58Up73d13NfYLv8HT9vmznjzhQ==}
engines: {node: '>=6.9.0'}
dependencies:
regenerator-runtime: 0.14.1
dev: false
/@babel/types@7.25.4: /@babel/types@7.25.4:
resolution: {integrity: sha512-zQ1ijeeCXVEh+aNL0RlmkPkG8HUiDcU2pzQQFjtbntgAczRASFzj4H+6+bV+dy1ntKR14I/DypeuRG1uma98iQ==} resolution: {integrity: sha512-zQ1ijeeCXVEh+aNL0RlmkPkG8HUiDcU2pzQQFjtbntgAczRASFzj4H+6+bV+dy1ntKR14I/DypeuRG1uma98iQ==}
engines: {node: '>=6.9.0'} engines: {node: '>=6.9.0'}
...@@ -713,6 +723,16 @@ packages: ...@@ -713,6 +723,16 @@ packages:
is-what: 3.14.1 is-what: 3.14.1
dev: true dev: true
/copy-text-to-clipboard@3.2.0:
resolution: {integrity: sha512-RnJFp1XR/LOBDckxTib5Qjr/PMfkatD0MUCQgdpqS8MdKiNUzBjAQBEN6oUy+jW7LI93BBG3DtMB2KOOKpGs2Q==}
engines: {node: '>=12'}
dev: false
/core-js@3.38.1:
resolution: {integrity: sha512-OP35aUorbU3Zvlx7pjsFdu1rGNnD4pgw/CWoYzRY3t2EzoVT7shKHY1dlAy3f41cGIO7ZDPQimhGFTlEYkG/Hw==}
requiresBuild: true
dev: false
/csstype@3.1.3: /csstype@3.1.3:
resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==}
...@@ -1021,6 +1041,10 @@ packages: ...@@ -1021,6 +1041,10 @@ packages:
resolution: {integrity: sha512-VNTrAak/KhO2i8dqqnqnAHOa3cYBwXEZe9h+D5h/1ZqFSTEFHdM65lR7RoIqq3tBBYavsOXV84NoHXZ0AkPyqQ==} resolution: {integrity: sha512-VNTrAak/KhO2i8dqqnqnAHOa3cYBwXEZe9h+D5h/1ZqFSTEFHdM65lR7RoIqq3tBBYavsOXV84NoHXZ0AkPyqQ==}
dev: true dev: true
/mutation-observer@1.0.3:
resolution: {integrity: sha512-M/O/4rF2h776hV7qGMZUH3utZLO/jK7p8rnNgGkjKUw8zCGjRQPxB8z6+5l8+VjRUQ3dNYu4vjqXYLr+U8ZVNA==}
dev: false
/nanoid@3.3.7: /nanoid@3.3.7:
resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==} resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==}
engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
...@@ -1129,6 +1153,10 @@ packages: ...@@ -1129,6 +1153,10 @@ packages:
picomatch: 2.3.1 picomatch: 2.3.1
dev: true dev: true
/regenerator-runtime@0.14.1:
resolution: {integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==}
dev: false
/reusify@1.0.4: /reusify@1.0.4:
resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==}
engines: {iojs: '>=1.0.0', node: '>=0.10.0'} engines: {iojs: '>=1.0.0', node: '>=0.10.0'}
...@@ -1338,6 +1366,15 @@ packages: ...@@ -1338,6 +1366,15 @@ packages:
vue: 3.4.38(typescript@5.5.4) vue: 3.4.38(typescript@5.5.4)
dev: false dev: false
/vconsole@3.15.1:
resolution: {integrity: sha512-KH8XLdrq9T5YHJO/ixrjivHfmF2PC2CdVoK6RWZB4yftMykYIaXY1mxZYAic70vADM54kpMQF+dYmvl5NRNy1g==}
dependencies:
'@babel/runtime': 7.25.6
copy-text-to-clipboard: 3.2.0
core-js: 3.38.1
mutation-observer: 1.0.3
dev: false
/vite@5.4.2(@types/node@22.5.0)(less@4.2.0): /vite@5.4.2(@types/node@22.5.0)(less@4.2.0):
resolution: {integrity: sha512-dDrQTRHp5C1fTFzcSaMxjk6vdpKvT+2/mIdE07Gw2ykehT49O0z/VHS3zZ8iV/Gh8BJJKHWOe5RjaNrW5xf/GA==} resolution: {integrity: sha512-dDrQTRHp5C1fTFzcSaMxjk6vdpKvT+2/mIdE07Gw2ykehT49O0z/VHS3zZ8iV/Gh8BJJKHWOe5RjaNrW5xf/GA==}
engines: {node: ^18.0.0 || >=20.0.0} engines: {node: ^18.0.0 || >=20.0.0}
......
...@@ -4,6 +4,7 @@ import { initApp } from "@/utils/init"; ...@@ -4,6 +4,7 @@ import { initApp } from "@/utils/init";
import router from "@/router"; import router from "@/router";
import { createPinia } from "pinia"; import { createPinia } from "pinia";
import mitt from "mitt"; import mitt from "mitt";
import VConsole from "vconsole";
// css // css
import "./assets/css/reset.css"; import "./assets/css/reset.css";
...@@ -12,6 +13,7 @@ import "./assets/icon/style.css"; ...@@ -12,6 +13,7 @@ import "./assets/icon/style.css";
import "vant/lib/toast/index.css"; import "vant/lib/toast/index.css";
window.mitt = mitt(); window.mitt = mitt();
new VConsole();
const app = createApp(App); const app = createApp(App);
app.use(createPinia()); app.use(createPinia());
......
...@@ -30,7 +30,10 @@ const router = createRouter({ ...@@ -30,7 +30,10 @@ const router = createRouter({
}); });
// 白名单列表 // 白名单列表
const whitelist: string[] = ["/code_product_detail"]; const whitelist: string[] = [
"/code_product_detail",
"/product_history_work_order",
];
let first = true; // 首次进入 let first = true; // 首次进入
router.beforeEach(async (to, from, next) => { router.beforeEach(async (to, from, next) => {
......
...@@ -129,7 +129,7 @@ const product_detail = ref<{ ...@@ -129,7 +129,7 @@ const product_detail = ref<{
const getProductDetail = async () => { const getProductDetail = async () => {
const msg = await api.external.getInfoByQrCode(); const msg = await api.external.getInfoByQrCode();
if (msg.code == 0) { if (msg.code == 0) {
product_detail.value = msg.data; product_detail.value = msg.data || ({} as any);
} }
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment