diff --git a/src/pages/merchant/coupon-list.vue b/src/pages/merchant/coupon-list.vue index f160672..817b38b 100644 --- a/src/pages/merchant/coupon-list.vue +++ b/src/pages/merchant/coupon-list.vue @@ -15,32 +15,30 @@ @scroll="pageHook.scroll" > {{ getActStatus(item.actStatus)?.name }} - ID {{ item.id }} - + ID {{ item.id }} + 限时领取 - 2025-09-21 + 2025-09-21~2025-12-20 - 店内消费额外支付1元可领取价值89元的速干T恤1件 - 限量领取 先领先得 - 领取时间 {{ item.createTime }} - 核销时间 {{ item.receiverTime }} + 店内核销将会自动扣费1元并领取价值89元的速干T恤1件 + 限量领取 先领先得 + 领取时间 {{ item.receiverTime }} + 核销时间 {{ item.cancelTime }} - - @@ -54,13 +52,12 @@ import { hooks } from "@/sheep" const tabs = [ { id: null, name: "全部", disabled: false, color: "#7f7f7f77" }, { id: 1, name: "未核销", disabled: false, color: "#1879ff77" }, - { id: 2, name: "已核销", disabled: false, color: "#03DC6C77" }, + { id: 2, name: "已核销", disabled: false, color: "#25944577" }, { id: 3, name: "已过期", disabled: false, color: "#FF672B77" }, ] const params = reactive({ actStatus: tabs[0].id, }) -const couponList = ref([]) const pageRef = ref(null) const pageHook = hooks.usePage(pageRef, actCancel.appMchPage, null, "data.records") diff --git a/src/pages/merchant/merchant-activity.vue b/src/pages/merchant/merchant-activity.vue index 0f3ef33..d8a8854 100644 --- a/src/pages/merchant/merchant-activity.vue +++ b/src/pages/merchant/merchant-activity.vue @@ -3,12 +3,12 @@ 兑换券 - + 限时领取 - 2025-09-21 + 2025-09-21~2025-12-20 - 店内消费额外支付1元可领取价值89元的速干T恤1件 - 限量领取 先领先得 + 店内核销将会自动扣费1元并领取价值89元的速干T恤1件 + 限量领取 先领先得 已 领 取 立 即 领 取 diff --git a/src/pages/tabbar/my.vue b/src/pages/tabbar/my.vue index 7cf7d25..9a82b73 100644 --- a/src/pages/tabbar/my.vue +++ b/src/pages/tabbar/my.vue @@ -51,12 +51,12 @@ - 是否确认核销该活动兑换券? - 确认核销将会对用户的消费钱包扣除 1元 钱 + 是否核销该活动兑换券? + 确认核销将会对用户的 消费钱包 扣除 1元 钱 @@ -272,11 +272,18 @@ const actModalShow = (v) => { } // 确认核销 const actModalConfirm = async () => { - const { code, msg }: any = await actCancel.appCreateActOrder(state.actVal) - if (code != 0) return uni.showToast({ title: msg || "核销失败", icon: "none" }) - uni.showToast({ title: "核销成功", icon: "success" }) - state.actModalShow = false - state.actVal = {} + try { + uni.showLoading({ title: "核销中...", mask: true }) + const { code, msg }: any = await actCancel.appCreateActOrder(state.actVal) + if (code != 0) return uni.showToast({ title: msg || "核销失败", icon: "none" }) + uni.showToast({ title: "核销成功", icon: "success" }) + state.actModalShow = false + state.actVal = {} + } catch (error) { + uni.showToast({ title: "核销失败", icon: "none" }) + } finally { + uni.hideLoading() + } } // 取消核销 const actModalCancel = () => { diff --git a/src/sheep/hooks/use-scan-code.ts b/src/sheep/hooks/use-scan-code.ts index 6fdbed8..eedd178 100644 --- a/src/sheep/hooks/use-scan-code.ts +++ b/src/sheep/hooks/use-scan-code.ts @@ -15,7 +15,8 @@ export function useScanCode(actModalShow) { // const testQrCode = "http://192.168.101.45:8889/h5/#/pages/pay/scanPay?id=1905816751043452930&name=测试新县府超市" // 邓本地-测试环境-新县府超市收款二维码 // const testQrCode = "http://192.168.101.45:8889/h5/#/pages/pay/scanPay?hardDoorId=1913157080418295809&cabinetNo=1" // 测试智能柜柜门二维码 // const testQrCode = "eyJhY3RJZCI6IjE5NjkyNTAwOTg1MTM4MDUzMTQiLCJ0b3RhbFByaWNlIjoxfQ==" // 测试商户活动核销 - const testQrCode = "eyJhY3RJZCI6IjE5NjkzMjQwNjMwNTk4Nzc4OTAiLCJ0b3RhbFByaWNlIjoxfQ==" // 测试商户活动核销 + // const testQrCode = "eyJhY3RJZCI6IjE5NjkzMjQwNjMwNTk4Nzc4OTAiLCJ0b3RhbFByaWNlIjoxfQ==" // 测试商户活动核销 + const testQrCode = "eyJhY3RJZCI6IjE5NjkzMjU3NDQxNDUzMDk2OTciLCJ0b3RhbFByaWNlIjoxfQ==" // 测试商户活动核销 uni.showModal({ content: "开发环境不是浙政钉和诗画环境,扫码仅供测试" }) return Promise.resolve(testQrCode) }