feat: 球局状态操作done

This commit is contained in:
2025-09-17 18:34:36 +08:00
parent 9f4e026687
commit 9c56fd3f0e
10 changed files with 315 additions and 32 deletions

View File

@@ -326,6 +326,17 @@
justify-content: center;
gap: 8px;
}
.orderNo {
display: flex;
justify-content: flex-end;
align-items: center;
gap: 8px;
.copy {
color: #007AFF;
}
}
}
}
}
@@ -503,3 +514,15 @@
border-radius: 0;
}
}
.cancelTip {
padding: 12px 15px;
color: rgba(60, 60, 67, 0.60);
text-align: center;
font-feature-settings: 'liga' off, 'clig' off;
font-family: "PingFang SC";
font-size: 16px;
font-style: normal;
font-weight: 400;
line-height: 24px;
}

View File

@@ -3,6 +3,7 @@ import { View, Text, Button, Image } from "@tarojs/components";
import { Dialog } from "@nutui/nutui-react-taro";
import Taro, { useDidShow, useRouter } from "@tarojs/taro";
import dayjs from "dayjs";
import "dayjs/locale/zh-cn";
import classnames from "classnames";
import orderService, {
CancelType,
@@ -64,11 +65,13 @@ function genGameNotice(order_status, start_time) {
} else if (leftHour < 2) {
key = "pendinging";
}
return gameNoticeMap.get(key) || {};
}
function GameInfo(props) {
const { detail, currentLocation, orderDetail } = props;
console.log(orderDetail, "orderDetail");
const { order_status, refund_status } = orderDetail;
const { latitude, longitude, location, location_name, start_time, end_time } =
detail || {};
@@ -142,7 +145,11 @@ function GameInfo(props) {
};
Dialog.open("detailCancelOrder", {
title: "确定删除订单吗?",
content: "删除订单后,您将无法恢复订单。请确认是否继续取消?",
content: (
<View className={styles.cancelTip}>
<Text></Text>
</View>
),
footer: (
<View className={styles.dialogFooter}>
<Button className={styles.cancel} onClick={onCancel}>
@@ -188,7 +195,11 @@ function GameInfo(props) {
};
Dialog.open("detailCancelOrder", {
title: "确定取消订单吗?",
content: "取消订单后,您将无法恢复订单。请确认是否继续取消?",
content: (
<View className={styles.cancelTip}>
<Text></Text>
</View>
),
footer: (
<View className={styles.dialogFooter}>
<Button className={styles.cancel} onClick={onCancel}>
@@ -314,6 +325,12 @@ function GameInfo(props) {
);
}
function handleCopy(msg) {
Taro.setClipboardData({
data: msg,
});
}
function OrderMsg(props) {
const { detail, orderDetail, checkOrderInfo } = props;
const {
@@ -367,7 +384,17 @@ function OrderMsg(props) {
? [
{
title: "订单号",
content: order_no,
content: (
<View className={styles.orderNo}>
<Text>{order_no}</Text>
<Text
className={styles.copy}
onClick={handleCopy.bind(null, order_no)}
>
</Text>
</View>
),
},
]
: []),
@@ -519,6 +546,11 @@ const OrderCheck = () => {
title: error.message,
icon: "none",
});
if (!id) {
Taro.redirectTo({
url: `/order_pages/orderDetail/index?id=${payment_params.order_id}`,
});
}
}
};
if (!id && !gameId) {

View File

@@ -354,3 +354,15 @@
border-radius: 0;
}
}
.cancelTip {
padding: 12px 15px;
color: rgba(60, 60, 67, 0.60);
text-align: center;
font-feature-settings: 'liga' off, 'clig' off;
font-family: "PingFang SC";
font-size: 16px;
font-style: normal;
font-weight: 400;
line-height: 24px;
}

View File

@@ -3,6 +3,7 @@ import { View, Text, Button, Image, ScrollView } from "@tarojs/components";
import Taro, { useDidShow } from "@tarojs/taro";
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 { withAuth, RefundPopup } from "@/components";
@@ -150,7 +151,11 @@ const OrderList = () => {
};
Dialog.open("cancelOrder", {
title: "确定删除订单吗?",
content: "删除订单后,您将无法恢复订单。请确认是否继续取消?",
content: (
<View className={styles.cancelTip}>
<Text></Text>
</View>
),
footer: (
<View className={styles.dialogFooter}>
<Button className={styles.cancel} onClick={onCancel}>
@@ -196,7 +201,11 @@ const OrderList = () => {
};
Dialog.open("cancelOrder", {
title: "确定取消订单吗?",
content: "取消订单后,您将无法恢复订单。请确认是否继续取消?",
content: (
<View className={styles.cancelTip}>
<Text></Text>
</View>
),
footer: (
<View className={styles.dialogFooter}>
<Button className={styles.cancel} onClick={onCancel}>