fix: 修复退出活动弹窗文案展示

This commit is contained in:
2026-02-26 20:34:13 +08:00
parent 2656c59475
commit 0a0203e36d
2 changed files with 20 additions and 19 deletions

View File

@@ -10,6 +10,7 @@ import orderService, {
GameOrderRes,
OrderStatus,
refundTextMap,
RefundStatus,
} from "@/services/orderService";
import { debounce } from "@tarojs/runtime";
import {
@@ -76,7 +77,7 @@ function genGameNotice(order_status, start_time) {
function GameInfo(props) {
const { detail, currentLocation, orderDetail, init } = props;
const { order_status, refund_status, amount } = orderDetail;
const { order_status, refund_status, amount, refund_amount } = orderDetail;
const {
latitude,
longitude,
@@ -111,7 +112,7 @@ function GameInfo(props) {
const startTime = dayjs(start_time);
const endTime = dayjs(end_time);
const game_length = Number(
(endTime.diff(startTime, "minutes") / 60).toFixed()
(endTime.diff(startTime, "minutes") / 60).toFixed(),
);
const startMonth = startTime.format("M");
@@ -244,7 +245,10 @@ function GameInfo(props) {
<View className={styles.gameInfoContainer}>
{["refund", "progress", "expired"].includes(orderStatus) && (
<View className={styles.paidInfo}>
{refundTextMap.get(refund_status)} ¥ {amount}
{refundTextMap.get(refund_status)} ¥{" "}
{[RefundStatus.PENDING, RefundStatus.SUCCESS].includes(refund_status)
? refund_amount
: amount}
</View>
)}
{["progress", "expired"].includes(orderStatus) &&
@@ -344,7 +348,7 @@ function GameInfo(props) {
handlePayNow: () => {},
handleViewGame,
},
"detail"
"detail",
)?.map((obj) => (
<View className={classnames(styles.button, styles[obj.className])}>
<Text className={styles.buttonText}>{obj.text}</Text>
@@ -504,7 +508,7 @@ function RefundPolicy(props) {
const theTimeObj = dayjs(
isLast
? refund_policy.at(-2).deadline_formatted
: item.deadline_formatted
: item.deadline_formatted,
);
const year = theTimeObj.format("YYYY");
const month = theTimeObj.format("M");
@@ -531,7 +535,7 @@ function RefundPolicy(props) {
className={classnames(
styles.policyItem,
targetIndex > index && index !== 0 ? styles.pastItem : "",
targetIndex === index ? styles.currentItem : ""
targetIndex === index ? styles.currentItem : "",
)}
>
<View className={styles.time}>