From 28272d7936bcfdbfae8db8ef999524140099fa2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=9D=B0?= Date: Thu, 18 Sep 2025 17:16:24 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=87=8D=E6=96=B0=E5=8F=91=E5=B8=83=20?= =?UTF-8?q?&=20=E7=BC=96=E8=BE=91=E7=90=83=E5=B1=80=E8=B7=B3=E8=BD=AC?= =?UTF-8?q?=E6=9B=B4=E6=94=B9=E3=80=81=E8=AE=A2=E5=8D=95=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/GameManagePopup/index.tsx | 9 +++++++-- src/order_pages/orderDetail/index.tsx | 8 +------- src/order_pages/orderList/index.tsx | 4 ++-- src/services/orderService.ts | 6 ++++++ 4 files changed, 16 insertions(+), 11 deletions(-) diff --git a/src/components/GameManagePopup/index.tsx b/src/components/GameManagePopup/index.tsx index d321287..46ad70b 100644 --- a/src/components/GameManagePopup/index.tsx +++ b/src/components/GameManagePopup/index.tsx @@ -123,12 +123,17 @@ export default forwardRef(function GameManagePopup(props, ref) { function handleEditGame() { Taro.navigateTo({ - url: `/publish_pages/publishBall/index?gameId=${detail.id}`, + url: `/publish_pages/publishBall/index?gameId=${detail.id}&republish=0`, }); onClose(); } - const handleRepubGame = handleEditGame; + function handleRepubGame () { + Taro.navigateTo({ + url: `/publish_pages/publishBall/index?gameId=${detail.id}&republish=1`, + }); + onClose(); + } async function handleCancelGame() { cancelRef.current.show(async (result) => { diff --git a/src/order_pages/orderDetail/index.tsx b/src/order_pages/orderDetail/index.tsx index 716d386..1962064 100644 --- a/src/order_pages/orderDetail/index.tsx +++ b/src/order_pages/orderDetail/index.tsx @@ -9,7 +9,7 @@ import orderService, { CancelType, GameOrderRes, OrderStatus, - RefundStatus, + refundTextMap, } from "@/services/orderService"; import { payOrder, @@ -27,12 +27,6 @@ import styles from "./index.module.scss"; dayjs.locale("zh-cn"); -const refundTextMap = new Map([ - [RefundStatus.NONE, "已支付"], - [RefundStatus.PENDING, "退款中"], - [RefundStatus.SUCCESS, "已退款"], -]); - const gameNoticeMap = new Map([ [ "pending", diff --git a/src/order_pages/orderList/index.tsx b/src/order_pages/orderList/index.tsx index 71a027f..cd0ff1a 100644 --- a/src/order_pages/orderList/index.tsx +++ b/src/order_pages/orderList/index.tsx @@ -5,7 +5,7 @@ import { Avatar, Dialog } from "@nutui/nutui-react-taro"; import dayjs from "dayjs"; import "dayjs/locale/zh-cn"; import classnames from "classnames"; -import orderService, { OrderStatus, CancelType } from "@/services/orderService"; +import orderService, { OrderStatus, CancelType, refundTextMap } from "@/services/orderService"; import { withAuth, RefundPopup } from "@/components"; import { payOrder, generateOrderActions } from "@/utils"; import emptyContent from "@/static/emptyStatus/publish-empty.png"; @@ -285,7 +285,7 @@ const OrderList = () => { styles[unPay ? "pending" : "paid"] )} > - {unPay ? "待支付" : "已支付"} ¥{" "} + {unPay ? "待支付" : refundTextMap.get(item.refund_status)} ¥{" "} {item.amount} diff --git a/src/services/orderService.ts b/src/services/orderService.ts index 787267e..7d3dd1e 100644 --- a/src/services/orderService.ts +++ b/src/services/orderService.ts @@ -28,6 +28,12 @@ export enum RefundStatus { SUCCESS, // 已退款 } +export const refundTextMap = new Map([ + [RefundStatus.NONE, "已支付"], + [RefundStatus.PENDING, "退款中"], + [RefundStatus.SUCCESS, "已退款"], +]); + export interface PayMentParams { order_id: number; order_no: string;