From 2aef1e445db4469b57dd7e49b511151730d6ee5d Mon Sep 17 00:00:00 2001 From: weiwei Date: Mon, 24 Mar 2025 11:45:47 +0800 Subject: [PATCH] =?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, + }, + }), +}