From 212e6629fc83f9cdbcaeb8d0cc62bac94e0af258 Mon Sep 17 00:00:00 2001 From: weiwei Date: Fri, 21 Mar 2025 15:44:22 +0800 Subject: [PATCH 01/12] 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) { From d23a96857af443cb75833aa075eed1c566748bc3 Mon Sep 17 00:00:00 2001 From: weiwei Date: Fri, 21 Mar 2025 17:00:39 +0800 Subject: [PATCH 02/12] 1 --- .env | 4 ++-- src/pages/merchant/food.vue | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.env b/.env index b162418..bc55261 100644 --- a/.env +++ b/.env @@ -26,9 +26,9 @@ VITE_OAUTH2_APP_CLIENT='mini:mini' VITE_IMAGE_BASE_PATH = http://59.202.170.152:81/api # 信创线上 # ******************** start 开发环境 start ******************** -# VITE_APP_DEV_SERVICE = http://59.202.170.152:81/api # 信创线上 +VITE_APP_DEV_SERVICE = http://59.202.170.152:81/api # 信创线上 # VITE_APP_DEV_SERVICE = https://stgl.pj.gov.cn/app-api -VITE_APP_DEV_SERVICE = http://192.168.101.64:9999 # 邓-本地 +# VITE_APP_DEV_SERVICE = http://192.168.101.64:9999 # 邓-本地 # VITE_APP_DEV_SERVICE = http://127.0.0.1:9999 # VITE_APP_DEV_SERVICE = http://123.156.230.15:8089/api/ # 线上 # VITE_APP_DEV_SERVICE = http://220.191.229.171:8090/api # 线上 diff --git a/src/pages/merchant/food.vue b/src/pages/merchant/food.vue index 304b19b..98739e5 100644 --- a/src/pages/merchant/food.vue +++ b/src/pages/merchant/food.vue @@ -154,11 +154,11 @@ const doProduct = (v: any) => { {{ item.name }} ¥{{ hooks.useMoney(item.price) }} - ¥{{ hooks.useMoney(item.marketPrice) }} + ¥{{ hooks.useMoney(item.marketPrice) }} - + {{ hooks.useFormatNum("库存", "", item.stock) }} - + {{ hooks.useFormatNum("销量", "", item.salesCount) }} From ac6fc9245c7985173421b460235251d070a56355 Mon Sep 17 00:00:00 2001 From: weiwei Date: Fri, 21 Mar 2025 18:15:13 +0800 Subject: [PATCH 03/12] 1 --- src/pages.json | 52 +++++++++++++++++++++++++------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/src/pages.json b/src/pages.json index dca0775..9041c1b 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": "我的", From 7819d15326a3c9085246f289fee628f4c044a023 Mon Sep 17 00:00:00 2001 From: weiwei Date: Mon, 24 Mar 2025 11:01:23 +0800 Subject: [PATCH 04/12] 1 --- src/pages/tabbar/my.vue | 9 +++------ src/sheep/utils/request.ts | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/pages/tabbar/my.vue b/src/pages/tabbar/my.vue index 18e0617..d15bd16 100644 --- a/src/pages/tabbar/my.vue +++ b/src/pages/tabbar/my.vue @@ -132,12 +132,9 @@ const doLogin = async (loginType: number, token: string, accountId: string | nul case 2: if (isEmpty(tokenStorage) || isEmpty(userStorage)) { try { - uni.showLoading({ - title: "登录中...", - mask: true, - }) + uni.showLoading({ title: "登录中...", mask: true }) const res = await userApi.auth(token) - if (res?.code === 0) { + if (res.code == 0) { uni.setStorageSync(tokenKey, res.data) uni.hideLoading() uni.showToast({ title: "登录成功", icon: "none" }) @@ -182,7 +179,7 @@ const doScanCode = async () => { let decodedString: string | undefined = "" if (isDevEnv()) { decodedString = decodeBase64("eyJpZCI6IjE4ODk0ODM5Mzg0ODQ1MzEyMDEiLCJuYW1lIjoi5rWL6K+V6LaF5biCIn0=") - uni.showToast({ title: "开发环境不是浙政钉环境,扫码测试", icon: "none" }) + uni.showToast({ title: "开发环境不是浙政钉环境,扫码仅供测试", icon: "none" }) } else { const res: any = await (window as any).dd.scan({ type: "all" }) decodedString = decodeBase64(res.text) diff --git a/src/sheep/utils/request.ts b/src/sheep/utils/request.ts index 853a5b7..3d07e3a 100644 --- a/src/sheep/utils/request.ts +++ b/src/sheep/utils/request.ts @@ -157,7 +157,7 @@ http.interceptors.request.use(async (config) => { try { uni.showLoading({ title: "加载中...", mask: true }) const res = await userApi.auth(token) - if (res?.code === 0) { + if (res.code == 0) { uni.setStorageSync(TOKEN_KEY, res.data) const { data: userData } = await userApi.userInfo() uni.setStorageSync(USER_INFO_KEY, userData) From abfe55853900fc1b4a36d9cff560f1963a39bd8d Mon Sep 17 00:00:00 2001 From: dzc <2388224167@qq.com> Date: Mon, 24 Mar 2025 11:43:37 +0800 Subject: [PATCH 05/12] 11 --- .env | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.env b/.env index bc55261..b162418 100644 --- a/.env +++ b/.env @@ -26,9 +26,9 @@ VITE_OAUTH2_APP_CLIENT='mini:mini' VITE_IMAGE_BASE_PATH = http://59.202.170.152:81/api # 信创线上 # ******************** start 开发环境 start ******************** -VITE_APP_DEV_SERVICE = http://59.202.170.152:81/api # 信创线上 +# VITE_APP_DEV_SERVICE = http://59.202.170.152:81/api # 信创线上 # VITE_APP_DEV_SERVICE = https://stgl.pj.gov.cn/app-api -# VITE_APP_DEV_SERVICE = http://192.168.101.64:9999 # 邓-本地 +VITE_APP_DEV_SERVICE = http://192.168.101.64:9999 # 邓-本地 # VITE_APP_DEV_SERVICE = http://127.0.0.1:9999 # VITE_APP_DEV_SERVICE = http://123.156.230.15:8089/api/ # 线上 # VITE_APP_DEV_SERVICE = http://220.191.229.171:8090/api # 线上 From 2aef1e445db4469b57dd7e49b511151730d6ee5d Mon Sep 17 00:00:00 2001 From: weiwei Date: Mon, 24 Mar 2025 11:45:47 +0800 Subject: [PATCH 06/12] =?UTF-8?q?=E6=B5=81=E6=B0=B4=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 4 +-- src/pages.json | 52 ++++++++++++++-------------- src/pages/tabbar/flowStatistics.vue | 29 +++++++++------- src/pages/tabbar/individualOrder.vue | 16 +++++---- src/sheep/api/flowStatistics.ts | 13 +++++++ src/sheep/api/index.ts | 30 +++++++++------- src/sheep/api/individualOrder.ts | 13 +++++++ 7 files changed, 96 insertions(+), 61 deletions(-) create mode 100644 src/sheep/api/flowStatistics.ts create mode 100644 src/sheep/api/individualOrder.ts diff --git a/.env b/.env index bc55261..b162418 100644 --- a/.env +++ b/.env @@ -26,9 +26,9 @@ VITE_OAUTH2_APP_CLIENT='mini:mini' VITE_IMAGE_BASE_PATH = http://59.202.170.152:81/api # 信创线上 # ******************** start 开发环境 start ******************** -VITE_APP_DEV_SERVICE = http://59.202.170.152:81/api # 信创线上 +# VITE_APP_DEV_SERVICE = http://59.202.170.152:81/api # 信创线上 # VITE_APP_DEV_SERVICE = https://stgl.pj.gov.cn/app-api -# VITE_APP_DEV_SERVICE = http://192.168.101.64:9999 # 邓-本地 +VITE_APP_DEV_SERVICE = http://192.168.101.64:9999 # 邓-本地 # VITE_APP_DEV_SERVICE = http://127.0.0.1:9999 # VITE_APP_DEV_SERVICE = http://123.156.230.15:8089/api/ # 线上 # VITE_APP_DEV_SERVICE = http://220.191.229.171:8090/api # 线上 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/flowStatistics.vue b/src/pages/tabbar/flowStatistics.vue index b1b18d4..fbfa4ed 100644 --- a/src/pages/tabbar/flowStatistics.vue +++ b/src/pages/tabbar/flowStatistics.vue @@ -17,14 +17,15 @@ 流水统计 - {{ state.nowVal }} + {{ state.formatVal }} (null) const state = reactive({ pa: { - payTimeList: [], + createTimeList: [], }, - nowVal: "", - newdata: "", + formatVal: "", + date: "", }) -const { list, startPage, scroll } = hooks.usePage(pageRef, orderApi.page, null, "data.records") +const { list, startPage, scroll } = hooks.usePage(pageRef, flowStatisticsApi.page, null, "data.records") onShow(() => { - // const isLogin = await hooks.useCheckLogin() - // if (!isLogin) return + const isLogin = hooks.useCheckLogin() + if (!isLogin) return }) const query = (page: number, pagesize: number) => { - // const isLogin = hooks.useStaticCheckLogin() - // if (!isLogin) return + const isLogin = hooks.useStaticCheckLogin() + if (!isLogin) return startPage(page, pagesize, false, state.pa) } // 时间范围选择器确认 const datePickerConfirm = (date: any) => { - state.pa.payTimeList = state.newdata + state.pa.createTimeList = date.map((v: any) => hooks.useTime(v, "{y}-{m}-{d}")) + console.log("xx", state.pa.createTimeList) + pageRef.value.reload(false) } diff --git a/src/pages/tabbar/individualOrder.vue b/src/pages/tabbar/individualOrder.vue index c599c3e..391bf1f 100644 --- a/src/pages/tabbar/individualOrder.vue +++ b/src/pages/tabbar/individualOrder.vue @@ -31,8 +31,10 @@ {{ v.merchantName }} - 已支付 - 售后 + 未支付 + 已支付 + 售后 + 已核销 @@ -48,7 +50,7 @@ - 共 {{ v.carList.length }} 件 + 共 {{ v.carList?.length || "null" }} 件 ¥ {{ hooks.useMoney(v.totalPrice) }} @@ -98,14 +100,14 @@ import { onShow } from "@dcloudio/uni-app" import { hooks } from "@@/index" import { filePath } from "@@/utils/file" import zTabs from "@@/components/other/z-tabs/z-tabs.vue" -import { orderApi } from "@@/api" +import { individualOrderApi } from "@@/api" const pageRef = ref(null) // 选项卡 const tabs = [ { id: null, name: "全部", disabled: false }, - { id: 1, name: "已支付", disabled: false }, - { id: 2, name: "售后", disabled: false }, + { id: 5, name: "已支付", disabled: false }, + { id: 10, name: "售后", disabled: false }, ] const state = reactive({ pa: { @@ -113,7 +115,7 @@ const state = reactive({ }, // showDrawer: false, }) -const { list, startPage, scroll } = hooks.usePage(pageRef, orderApi.page, null, "data.records") +const { list, startPage, scroll } = hooks.usePage(pageRef, individualOrderApi.page, null, "data.records") onShow(() => { // const isLogin = await hooks.useCheckLogin() diff --git a/src/sheep/api/flowStatistics.ts b/src/sheep/api/flowStatistics.ts new file mode 100644 index 0000000..367bd3f --- /dev/null +++ b/src/sheep/api/flowStatistics.ts @@ -0,0 +1,13 @@ +import request from "@/sheep/utils/request" + +export default { + page: (params: any) => + request({ + url: "/hard/hard-total/app/mch-water-day", + method: "GET", + params, + custom: { + showLoading: false, + }, + }), +} diff --git a/src/sheep/api/index.ts b/src/sheep/api/index.ts index d6fda50..583e2d2 100644 --- a/src/sheep/api/index.ts +++ b/src/sheep/api/index.ts @@ -1,25 +1,29 @@ -export { default as applyApi } from "./apply"; +export { default as applyApi } from "./apply" -export { default as boxesApi } from "./boxes"; +export { default as boxesApi } from "./boxes" -export { default as commonApi } from "./common"; +export { default as commonApi } from "./common" -export { default as foodApi } from "./food"; +export { default as foodApi } from "./food" -export { default as merchantApi } from "./merchant"; +export { default as merchantApi } from "./merchant" -export { default as orderApi } from "./order"; +export { default as orderApi } from "./order" -export { default as payApi } from "./pay"; +export { default as payApi } from "./pay" -export { default as productApi } from "./product"; +export { default as productApi } from "./product" -export { default as refundApi } from "./refund"; +export { default as refundApi } from "./refund" -export { default as userApi } from "./user"; +export { default as userApi } from "./user" -export { default as walletApi } from "./wallet"; +export { default as walletApi } from "./wallet" -export { default as faceApi } from "./face"; +export { default as faceApi } from "./face" -export { default as shopApi } from "./shop"; +export { default as shopApi } from "./shop" + +export { default as flowStatisticsApi } from "./flowStatistics" + +export { default as individualOrderApi } from "./individualOrder" diff --git a/src/sheep/api/individualOrder.ts b/src/sheep/api/individualOrder.ts new file mode 100644 index 0000000..db28c53 --- /dev/null +++ b/src/sheep/api/individualOrder.ts @@ -0,0 +1,13 @@ +import request from "@/sheep/utils/request" + +export default { + page: (params: any) => + request({ + url: "/hard/hard-order/app/mch-page-join", + method: "GET", + params, + custom: { + showLoading: false, + }, + }), +} From 2a2ba187e890c6c6932514b37dfbe03f1c22f692 Mon Sep 17 00:00:00 2001 From: weiwei Date: Mon, 24 Mar 2025 16:26:24 +0800 Subject: [PATCH 07/12] =?UTF-8?q?=E6=B5=81=E6=B0=B4=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E8=AF=B7=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/pay/scanPay.vue | 2 +- src/pages/tabbar/flowStatistics.vue | 66 ++++++++------- src/pages/tabbar/order.vue | 15 ++-- src/sheep/hooks/use-unit.ts | 124 ++++++++++++++-------------- 4 files changed, 105 insertions(+), 102 deletions(-) diff --git a/src/pages/pay/scanPay.vue b/src/pages/pay/scanPay.vue index f672cd1..ffc974f 100644 --- a/src/pages/pay/scanPay.vue +++ b/src/pages/pay/scanPay.vue @@ -149,7 +149,7 @@ const handlePay = () => { }) } -// handle pay +// 支付 const pay = async () => { try { uni.showLoading({ title: "支付中...", mask: true }) diff --git a/src/pages/tabbar/flowStatistics.vue b/src/pages/tabbar/flowStatistics.vue index fbfa4ed..84e619a 100644 --- a/src/pages/tabbar/flowStatistics.vue +++ b/src/pages/tabbar/flowStatistics.vue @@ -17,7 +17,7 @@ 流水统计 - {{ state.formatVal }} + {{ formatVal }} - - {{ "2022-01-01" }} + + + + {{ v.merchantName }} + + {{ v.day }} - - - - 流水金额 - ¥{{ 1145 }} + + + + 流水金额 + ¥ {{ hooks.useMoney(v.totalPayPrice) }} - - 流水次数 - {{ 1145 }} + + 流水次数 + {{ v.totalPayCount }} - - - 退款金额 - ¥{{ 1145 }} + + + 盈利金额 + ¥ {{ hooks.useMoney(v.totalProfitPrice) }} - - 退款次数 - {{ 1145 }} + + 盈利次数 + {{ v.totalProfitCount }} - - 盈利金额 - ¥{{ 1145 }} + + 退款金额 + ¥ {{ hooks.useMoney(v.totalRefundPrice) }} - - 盈利次数 - {{ 1145 }} + + 退款次数 + {{ v.totalRefundCount || 0 }} @@ -92,9 +96,10 @@ diff --git a/src/pages/tabbar/order.vue b/src/pages/tabbar/order.vue index 1e700f8..70f0b79 100644 --- a/src/pages/tabbar/order.vue +++ b/src/pages/tabbar/order.vue @@ -1,5 +1,5 @@ diff --git a/src/sheep/api/individualOrder.ts b/src/sheep/api/individualOrder.ts index db28c53..a03969b 100644 --- a/src/sheep/api/individualOrder.ts +++ b/src/sheep/api/individualOrder.ts @@ -10,4 +10,21 @@ export default { showLoading: false, }, }), + refuseRefund: (data: { id: string; auditReason: string }) => + request({ + url: "/hard/hard-after-sale/app/mch-disagree", + method: "POST", + data, + custom: { + showLoading: false, + }, + }), + agreeRefund: (params: { id: string }) => + request({ + url: `/hard/hard-after-sale/app/mch-agree?id=${params.id}`, + method: "POST", + custom: { + showLoading: false, + }, + }), } From f70a8ce90071b20ee77ae244e6ffc200d616d2c4 Mon Sep 17 00:00:00 2001 From: weiwei Date: Tue, 25 Mar 2025 11:30:19 +0800 Subject: [PATCH 10/12] =?UTF-8?q?=E8=B7=AF=E7=94=B1=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 4 +-- src/pages.json | 94 +++++++++++++++++++++++++++++++++++--------------- 2 files changed, 69 insertions(+), 29 deletions(-) diff --git a/src/App.vue b/src/App.vue index 6353446..c422304 100644 --- a/src/App.vue +++ b/src/App.vue @@ -51,14 +51,14 @@ export default { methods: { _initTabbar() { tabbar.forEach(({ pagePath, text, iconPath, selectedIconPath }, index) => { - if (index === 2) { + if (index === 2 || index === 3) { uni.setTabBarItem({ index: index, pagePath, text, iconPath, selectedIconPath, - visible: true, + visible: false, }) } else { uni.setTabBarItem({ diff --git a/src/pages.json b/src/pages.json index dca0775..6c5ab70 100644 --- a/src/pages.json +++ b/src/pages.json @@ -295,40 +295,80 @@ "list": [ { "pagePath": "pages/tabbar/home", - "text": "首页", - "iconPath": "static/tabbar/home.png", - "selectedIconPath": "static/tabbar/home-select.png" + "text": "", + "iconPath": "", + "selectedIconPath": "" }, // { // "pagePath": "pages/tabbar/shop", + // "text": "", + // "iconPath": "", + // "selectedIconPath": "" + // }, + { + "pagePath": "pages/tabbar/order", + "text": "", + "iconPath": "", + "selectedIconPath": "" + }, + { + "pagePath": "pages/tabbar/flowStatistics", + "text": "", + "iconPath": "", + "selectedIconPath": "" + }, + { + "pagePath": "pages/tabbar/individualOrder", + "text": "", + "iconPath": "", + "selectedIconPath": "" + }, + { + "pagePath": "pages/tabbar/my", + "text": "", + "iconPath": "", + "selectedIconPath": "" + } + + // { + // "pagePath": "pages/tabbar/home", + // "text": "首页", + // "iconPath": "static/tabbar/home.png", + // "selectedIconPath": "static/tabbar/home-select.png" + // }, + // { + // "pagePath": "pages/tabbar/shop", // "text": "超市", // "iconPath": "static/tabbar/shop.png", // "selectedIconPath": "static/tabbar/shop-select.png" // }, - { - "pagePath": "pages/tabbar/order", - "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": "我的", - "iconPath": "static/tabbar/my.png", - "selectedIconPath": "static/tabbar/my-select.png" - } + // { + // "pagePath": "pages/tabbar/order", + // "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": "我的", + // "iconPath": "static/tabbar/my.png", + // "selectedIconPath": "static/tabbar/my-select.png" + // }, ] } } From a0155981eb64f5afc9bc23b479dc7ad4b3e84b08 Mon Sep 17 00:00:00 2001 From: weiwei Date: Tue, 25 Mar 2025 11:31:57 +0800 Subject: [PATCH 11/12] 1 --- .env | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.env b/.env index b162418..bc55261 100644 --- a/.env +++ b/.env @@ -26,9 +26,9 @@ VITE_OAUTH2_APP_CLIENT='mini:mini' VITE_IMAGE_BASE_PATH = http://59.202.170.152:81/api # 信创线上 # ******************** start 开发环境 start ******************** -# VITE_APP_DEV_SERVICE = http://59.202.170.152:81/api # 信创线上 +VITE_APP_DEV_SERVICE = http://59.202.170.152:81/api # 信创线上 # VITE_APP_DEV_SERVICE = https://stgl.pj.gov.cn/app-api -VITE_APP_DEV_SERVICE = http://192.168.101.64:9999 # 邓-本地 +# VITE_APP_DEV_SERVICE = http://192.168.101.64:9999 # 邓-本地 # VITE_APP_DEV_SERVICE = http://127.0.0.1:9999 # VITE_APP_DEV_SERVICE = http://123.156.230.15:8089/api/ # 线上 # VITE_APP_DEV_SERVICE = http://220.191.229.171:8090/api # 线上 From ed79db43ab758a46dcba2c92b8ed2252440a2970 Mon Sep 17 00:00:00 2001 From: weiwei Date: Tue, 25 Mar 2025 13:28:49 +0800 Subject: [PATCH 12/12] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 83 +++++++++++++++------ src/pages.json | 14 ++-- src/pages/tabbar/{home.vue => canteen.vue} | 0 src/sheep/utils/request.ts | 2 + src/static/tabbar/canteen-select.png | Bin 0 -> 1797 bytes src/static/tabbar/canteen.png | Bin 0 -> 1731 bytes 6 files changed, 69 insertions(+), 30 deletions(-) rename src/pages/tabbar/{home.vue => canteen.vue} (100%) create mode 100644 src/static/tabbar/canteen-select.png create mode 100644 src/static/tabbar/canteen.png diff --git a/src/App.vue b/src/App.vue index c422304..b89e1e9 100644 --- a/src/App.vue +++ b/src/App.vue @@ -4,12 +4,14 @@ // onShow(() => {}) // onHide(() => {}) +// zhezhengding:浙政钉 | shihua:诗画 const tabbar = [ { - pagePath: "pages/tabbar/home", - text: "首页", - iconPath: "/static/tabbar/home.png", - selectedIconPath: "/static/tabbar/home-select.png", + pagePath: "pages/tabbar/canteen", + text: "食堂", + iconPath: "/static/tabbar/canteen.png", + selectedIconPath: "/static/tabbar/canteen-select.png", + auth: ["zhezhengding", "shihua"], }, // { // "pagePath": "pages/tabbar/shop", @@ -22,24 +24,28 @@ const tabbar = [ text: "订单", iconPath: "/static/tabbar/order.png", selectedIconPath: "/static/tabbar/order-select.png", + auth: ["zhezhengding"], }, { pagePath: "pages/tabbar/flowStatistics", text: "流水统计", iconPath: "/static/tabbar/order.png", selectedIconPath: "/static/tabbar/order-select.png", + auth: ["shihua"], }, { pagePath: "pages/tabbar/individualOrder", text: "订单", iconPath: "/static/tabbar/order.png", selectedIconPath: "/static/tabbar/order-select.png", + auth: ["shihua"], }, { pagePath: "pages/tabbar/my", text: "我的", iconPath: "/static/tabbar/my.png", selectedIconPath: "/static/tabbar/my-select.png", + auth: ["zhezhengding", "shihua"], }, ] @@ -50,27 +56,58 @@ export default { methods: { _initTabbar() { - tabbar.forEach(({ pagePath, text, iconPath, selectedIconPath }, index) => { - if (index === 2 || index === 3) { - uni.setTabBarItem({ - index: index, - pagePath, - text, - iconPath, - selectedIconPath, - visible: false, + console.log("环境判断") + + let appEnv = 1 // 1:浙政钉 2:诗画 + + switch (appEnv) { + case 1: + tabbar.forEach(({ pagePath, text, iconPath, selectedIconPath, auth }, index) => { + if (auth.includes("zhezhengding")) { + uni.setTabBarItem({ + index, + pagePath, + text, + iconPath, + selectedIconPath, + visible: true, + }) + } else { + uni.setTabBarItem({ + index, + pagePath, + text, + iconPath, + selectedIconPath, + visible: false, + }) + } }) - } else { - uni.setTabBarItem({ - index: index, - pagePath, - text, - iconPath, - selectedIconPath, - visible: true, + break + case 2: + tabbar.forEach(({ pagePath, text, iconPath, selectedIconPath, auth }, index) => { + if (auth.includes("shihua")) { + uni.setTabBarItem({ + index, + pagePath, + text, + iconPath, + selectedIconPath, + visible: true, + }) + } else { + uni.setTabBarItem({ + index, + pagePath, + text, + iconPath, + selectedIconPath, + visible: false, + }) + } }) - } - }) + break + } }, }, } diff --git a/src/pages.json b/src/pages.json index 6c5ab70..26907c7 100644 --- a/src/pages.json +++ b/src/pages.json @@ -10,9 +10,9 @@ }, "pages": [ { - "path": "pages/tabbar/home", + "path": "pages/tabbar/canteen", "style": { - "navigationBarTitleText": "首页", + "navigationBarTitleText": "食堂", "disableScroll": true } }, @@ -294,7 +294,7 @@ "tabBar": { "list": [ { - "pagePath": "pages/tabbar/home", + "pagePath": "pages/tabbar/canteen", "text": "", "iconPath": "", "selectedIconPath": "" @@ -331,10 +331,10 @@ } // { - // "pagePath": "pages/tabbar/home", - // "text": "首页", - // "iconPath": "static/tabbar/home.png", - // "selectedIconPath": "static/tabbar/home-select.png" + // "pagePath": "pages/tabbar/canteen", + // "text": "食堂", + // "iconPath": "static/tabbar/canteen.png", + // "selectedIconPath": "static/tabbar/canteen-select.png" // }, // { // "pagePath": "pages/tabbar/shop", diff --git a/src/pages/tabbar/home.vue b/src/pages/tabbar/canteen.vue similarity index 100% rename from src/pages/tabbar/home.vue rename to src/pages/tabbar/canteen.vue diff --git a/src/sheep/utils/request.ts b/src/sheep/utils/request.ts index 3d07e3a..bba1f5c 100644 --- a/src/sheep/utils/request.ts +++ b/src/sheep/utils/request.ts @@ -113,6 +113,8 @@ const checkAndRefreshToken = async (tokenStorage: any) => { // 请求拦截器 http.interceptors.request.use(async (config) => { + console.log("请求之前") + const tokenStorage = uni.getStorageSync(TOKEN_KEY) const config_header: any = config?.header || {} diff --git a/src/static/tabbar/canteen-select.png b/src/static/tabbar/canteen-select.png new file mode 100644 index 0000000000000000000000000000000000000000..7887b99c3e95cbc5897eaf5af9ea52f1df85b336 GIT binary patch literal 1797 zcmV+g2m1JlP)Px*zez+vRA@uhSq+R_RTcied*6gotrW7l^QHk~!DuTQZHR_QsEvU@&_J*jEYUWB z7As0HwDV@srrRjn_g;%lQxUC3Y5@sgFd%JEFhvt28u>BCkdUPzO?Td4WfLK#-R^tu z=zTM9c4l^V-t4k%cTO_NOFHBfbEQ52I!rDT+&=2>Z-uw?;Ck@ zu7qqS`aXakG&|0h15YhWcp|h*@eTlAC$N9+02mZ2e_S3X zI`H&OhIi3-erQ{eOQRu$9EfbE3qKz|)IhXwI#Q2ZBS2+5BF_$a`|0xX^a@Q(sd-&t_NYX$smQ)LJbh(5NqvTec9cKEvn z(0`X)tRmS0$jTN)FM`<9csh1UMgM?&iLtD2-7W#V37}yYGV2E$E3Uq$lfJG1^p{R7 zR+4)Lz~TmFZ5_{-qRkY39^m@GC4*^nZmHFJ*JYGAx zm2b~z4djc_77~N$WP#jJ@vKLah!w;8gj`th^w(wzrro?`qX^>zAkMFi?+ZM=X4(My z9r>g}{1*W4uhrQ^LsgPnAkn%+DfQ0-m%qpYVLM_@=K-a|og>@kz1B(IE=IS5sF$cn zytU%z>Va&X+qQ%XrD(4RQsi&wlWOUaojjgSZkK_=ozkarSa`(caH|p9iJu1Ia{&Z_ zXI7`SFo&+H8$kjxAV508T6=j!6-FA$e6aLkV3vf?b zYN>p+Es*6xK2>pbQ?GB=<{8<*vy#&{@5nVo{M1DGsv9aElk&~XfQc^1Z&phL4+pMZ zo#niVzF5)zsvMsPJUuii3!7wFu$?bW;!mx-!VKeyqjZLptHvF#qmK>ZAs+uYsC+Ss!WrpjFIypsqfkfnyif`Rm2Vnm6(mEj2 zx62;yZ3a+^h9DT|fegH(Ew$vx-5hBG&_iW3>3&e}FY-?KEWt0%=`2vL4_wPUyG*na z>A!qQ)>7j8=Pm&GbKqIaTm5V5@N6e~2tZfe=jjGYiLWgC$*|ltL3A++rLhFmXnCprR{EV zP1|TY&ul0B4ZyFQ39nO|!gxi+&2_v`b$-}#qEP_mHQ}_AK-N?|%RD)Dq|CQbyA=Nu zA{S>Vn$2+`ZmYQZC*A1G1Yne$u3MV`!(hBFt85y9bp^moFrWNMY-ss%(oK-Mkr@MI zuPD8_vW;y&WK5-`YXGT&f)lP5sI`Dx(T!&rGDj)cD^T|bKF!T=+B9tdsRg?f4+H#nla57K%>PEZ5;cQQtEn8olnqw5>0>q1z^6?90ugD nP+kaQ{q%o)zB6NwTPFSwE%%crhI$YG00000NkvXXu0mjf9#Cvz literal 0 HcmV?d00001 diff --git a/src/static/tabbar/canteen.png b/src/static/tabbar/canteen.png new file mode 100644 index 0000000000000000000000000000000000000000..75f82447fd15e721c2edc4024afe9ef684587bfb GIT binary patch literal 1731 zcmV;!20ZzRP)Px*eMv+?RA@uhS`CO*RS=#zZ)GX^u`t4-A|pz(sE9%eEy6G=iZU~!68GIR=UF_; zEQwlN>4z{&w07S;XV<=rbD9Vb6AWS5R3QH3h-d)$! zeFG1d^D}3@nK^T2=8Dh))ZN`Zxvj13K>)Z40Ok-V6XD{4tTNTZ!nz zmH^t^PKDJ2sTxiJmET6+NitOS5_lENe6EUoq1HDhDVg?!(?7ZLAE$@LWxoh@U` zjJ>_RE13C4L|i{+?m$;pSKGvi6JG&>LvSthJW_ zz|#P5bVB$o0FWo5jWXt(Tg=RIna5TAA93vg2jHB0h?$q9T;_Qqx0|vxJD2|E~a?b7um;@c=M^nI}XC?qKHdr$!lnjE#RE<0N@^GJ|V?x2LSwth?~ph@()U>@3^8;060}Cbuu$gLc~e+ z03+g~TI)M}-@g(OUrl-jBEHq%-#@=tEN-i(fe`~Jl}b}{x!h7_o}FU!r38uO>)6Z` z&biB(S*OD#0Q{bcLc(S-5k1n3--rP8^z=+pO1&!@Ofah}xV5&Ena@W=O+-I6I=l%G z5GyLB=H&DFud@6y6F?NkL_3Ga%$T{;7!&$zlB~67Gjk~#+hmL>)LAo6G)+X3D#+tB zyP_C*0}hJT4j|$jt@Z0!!pnRn0Bh}UNz*d(ZN`{YjhHvHfCw8$7DVhMqIZOkJYyP+VdI_N!nXO5@LyHQ=Re9CDZQcoaX=9^jx zK)GB#Y2m_!(zOU(=$1+m{&))k*g`}nRWEU=R618F6~3Y^LN5~0+$sS1qs8vQtwhva z1Hd`=pk#|JV1Zph5KJx<3cu6-rAk!* z&bj%OUeA+b7{EuBM(>QYd^H)KwN`4<5oMqI8z?hhVvLcFT@BR$=hnh7SY~MEskXr`4PgS@q%z!N+G7Cm3BK>ok`6N>UN(x3hWu}n zjY_FEJkOIp)Tn9H0Fo#6^z@v8h*vA6q^m5SS>xXy03cs!;@_ujZEYJmIy!cZTH@5k Ze*iERuj1Z?;+g;e002ovPDHLkV1frpH