From 212e6629fc83f9cdbcaeb8d0cc62bac94e0af258 Mon Sep 17 00:00:00 2001 From: weiwei Date: Fri, 21 Mar 2025 15:44:22 +0800 Subject: [PATCH] 1 --- src/pages.json | 52 ++++++++++++++++++++--------------------- src/pages/tabbar/my.vue | 12 +++++++--- 2 files changed, 35 insertions(+), 29 deletions(-) diff --git a/src/pages.json b/src/pages.json index 9041c1b..dca0775 100644 --- a/src/pages.json +++ b/src/pages.json @@ -30,20 +30,20 @@ "disableScroll": true } }, - // { - // "path": "pages/tabbar/flowStatistics", - // "style": { - // "navigationBarTitleText": "流水统计", - // "disableScroll": true - // } - // }, - // { - // "path": "pages/tabbar/individualOrder", - // "style": { - // "navigationBarTitleText": "订单", - // "disableScroll": true - // } - // }, + { + "path": "pages/tabbar/flowStatistics", + "style": { + "navigationBarTitleText": "流水统计", + "disableScroll": true + } + }, + { + "path": "pages/tabbar/individualOrder", + "style": { + "navigationBarTitleText": "订单", + "disableScroll": true + } + }, { "path": "pages/tabbar/my", "style": { @@ -311,18 +311,18 @@ "iconPath": "static/tabbar/order.png", "selectedIconPath": "static/tabbar/order-select.png" }, - // { - // "pagePath": "pages/tabbar/flowStatistics", - // "text": "流水统计", - // "iconPath": "static/tabbar/order.png", - // "selectedIconPath": "static/tabbar/order-select.png" - // }, - // { - // "pagePath": "pages/tabbar/individualOrder", - // "text": "订单", - // "iconPath": "static/tabbar/order.png", - // "selectedIconPath": "static/tabbar/order-select.png" - // }, + { + "pagePath": "pages/tabbar/flowStatistics", + "text": "流水统计", + "iconPath": "static/tabbar/order.png", + "selectedIconPath": "static/tabbar/order-select.png" + }, + { + "pagePath": "pages/tabbar/individualOrder", + "text": "订单", + "iconPath": "static/tabbar/order.png", + "selectedIconPath": "static/tabbar/order-select.png" + }, { "pagePath": "pages/tabbar/my", "text": "我的", diff --git a/src/pages/tabbar/my.vue b/src/pages/tabbar/my.vue index 9e8f570..18e0617 100644 --- a/src/pages/tabbar/my.vue +++ b/src/pages/tabbar/my.vue @@ -179,9 +179,15 @@ const doLogout = async () => { const doScanCode = async () => { usePayStore().setPayData({}) try { - const res: any = await (window as any).dd.scan({ type: "all", sourceType: ["camera"], scanType: ["cameraScan"] }) - // const decodedString = decodeBase64("eyJpZCI6IjE4ODk0ODM5Mzg0ODQ1MzEyMDEiLCJuYW1lIjoi5rWL6K+V6LaF5biCIn0=") - const decodedString = decodeBase64(res.text) + let decodedString: string | undefined = "" + if (isDevEnv()) { + decodedString = decodeBase64("eyJpZCI6IjE4ODk0ODM5Mzg0ODQ1MzEyMDEiLCJuYW1lIjoi5rWL6K+V6LaF5biCIn0=") + uni.showToast({ title: "开发环境不是浙政钉环境,扫码测试", icon: "none" }) + } else { + const res: any = await (window as any).dd.scan({ type: "all" }) + decodedString = decodeBase64(res.text) + } + if (decodedString) { const decodedJson = JSON.parse(decodedString) if (decodedJson?.id && decodedJson?.name) {