feat: 订单显示问题修复、修复球局开局后可加入的问题
This commit is contained in:
@@ -793,13 +793,16 @@ function Participants(props) {
|
||||
participant_count,
|
||||
max_participants,
|
||||
user_action_status = {},
|
||||
start_time,
|
||||
} = detail;
|
||||
const { can_join, can_pay, can_substitute, is_substituting, waiting_start } =
|
||||
user_action_status;
|
||||
const showApplicationEntry =
|
||||
[can_pay, can_substitute, is_substituting, waiting_start].every(
|
||||
(item) => !item
|
||||
) && can_join;
|
||||
) &&
|
||||
can_join &&
|
||||
dayjs(start_time).isAfter(dayjs());
|
||||
const leftCount = max_participants - participant_count;
|
||||
return (
|
||||
<View className="detail-page-content-participants">
|
||||
|
||||
@@ -276,6 +276,7 @@ const OrderList = () => {
|
||||
const unPay =
|
||||
item.order_status === OrderStatus.PENDING &&
|
||||
item.cancel_type === CancelType.NONE;
|
||||
const timeout = item.cancel_type === CancelType.TIMEOUT;
|
||||
const { game_info } = item;
|
||||
|
||||
const {
|
||||
@@ -297,17 +298,21 @@ const OrderList = () => {
|
||||
>
|
||||
<View className={styles.gameTitle}>
|
||||
<View className={styles.title}>{item?.game_info?.title}</View>
|
||||
<View
|
||||
className={classnames(
|
||||
styles.payNum,
|
||||
styles[unPay ? "pending" : "paid"]
|
||||
)}
|
||||
>
|
||||
<Text>
|
||||
{unPay ? "待支付" : refundTextMap.get(item.refund_status)}
|
||||
</Text>{" "}
|
||||
¥ <Text>{item.amount}</Text>
|
||||
</View>
|
||||
{!timeout && (
|
||||
<View
|
||||
className={classnames(
|
||||
styles.payNum,
|
||||
styles[unPay ? "pending" : "paid"]
|
||||
)}
|
||||
>
|
||||
<Text>
|
||||
{unPay
|
||||
? "待支付"
|
||||
: refundTextMap.get(item.refund_status)}
|
||||
</Text>{" "}
|
||||
¥ <Text>{item.amount}</Text>
|
||||
</View>
|
||||
)}
|
||||
</View>
|
||||
<View className={styles.gameTime}>
|
||||
{generateTimeMsg(item.game_info || {})}
|
||||
|
||||
@@ -5,13 +5,13 @@ export function getOrderStatus(orderData) {
|
||||
if (!order_no) {
|
||||
return 'none'
|
||||
}
|
||||
const unPay = order_status === OrderStatus.PENDING && cancel_type === CancelType.NONE;
|
||||
const unPay = order_status === OrderStatus.PENDING && ([CancelType.NONE].includes(cancel_type));
|
||||
const refund = [RefundStatus.PENDING, RefundStatus.SUCCESS].includes(refund_status);
|
||||
const expired =
|
||||
order_status === OrderStatus.FINISHED ||
|
||||
[CancelType.TIMEOUT, CancelType.USER].includes(cancel_type);
|
||||
|
||||
return unPay ? 'unpay' : refund ? 'refund' : expired ? 'expired' : 'progress'
|
||||
return unPay ? 'unpay' : refund ? 'refund' : expired ? cancel_type === CancelType.TIMEOUT ? 'timeout' : 'expired' : 'progress'
|
||||
}
|
||||
|
||||
// scene: list、detail
|
||||
@@ -54,6 +54,7 @@ export function generateOrderActions(orderData, actions, scene) {
|
||||
|
||||
if (scene === 'list') {
|
||||
const actionMap = new Map([
|
||||
['timeout', [deleteOrder, gameDetail]],
|
||||
['expired', [deleteOrder, gameDetail]],
|
||||
['progress', [quitGame, gameDetail]],
|
||||
['refund', [deleteOrder, gameDetail]],
|
||||
@@ -64,6 +65,7 @@ export function generateOrderActions(orderData, actions, scene) {
|
||||
|
||||
if (scene === 'detail') {
|
||||
const actionMap = new Map([
|
||||
['timeout', [deleteOrder, gameDetail]],
|
||||
['expired', [gameDetail, deleteOrder]],
|
||||
['progress', [gameDetail, quitGame]],
|
||||
['refund', [deleteOrder, gameDetail]],
|
||||
|
||||
Reference in New Issue
Block a user