feat: 重新发布 & 编辑球局跳转更改、订单显示问题修复
This commit is contained in:
@@ -123,12 +123,17 @@ export default forwardRef(function GameManagePopup(props, ref) {
|
|||||||
|
|
||||||
function handleEditGame() {
|
function handleEditGame() {
|
||||||
Taro.navigateTo({
|
Taro.navigateTo({
|
||||||
url: `/publish_pages/publishBall/index?gameId=${detail.id}`,
|
url: `/publish_pages/publishBall/index?gameId=${detail.id}&republish=0`,
|
||||||
});
|
});
|
||||||
onClose();
|
onClose();
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleRepubGame = handleEditGame;
|
function handleRepubGame () {
|
||||||
|
Taro.navigateTo({
|
||||||
|
url: `/publish_pages/publishBall/index?gameId=${detail.id}&republish=1`,
|
||||||
|
});
|
||||||
|
onClose();
|
||||||
|
}
|
||||||
|
|
||||||
async function handleCancelGame() {
|
async function handleCancelGame() {
|
||||||
cancelRef.current.show(async (result) => {
|
cancelRef.current.show(async (result) => {
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import orderService, {
|
|||||||
CancelType,
|
CancelType,
|
||||||
GameOrderRes,
|
GameOrderRes,
|
||||||
OrderStatus,
|
OrderStatus,
|
||||||
RefundStatus,
|
refundTextMap,
|
||||||
} from "@/services/orderService";
|
} from "@/services/orderService";
|
||||||
import {
|
import {
|
||||||
payOrder,
|
payOrder,
|
||||||
@@ -27,12 +27,6 @@ import styles from "./index.module.scss";
|
|||||||
|
|
||||||
dayjs.locale("zh-cn");
|
dayjs.locale("zh-cn");
|
||||||
|
|
||||||
const refundTextMap = new Map([
|
|
||||||
[RefundStatus.NONE, "已支付"],
|
|
||||||
[RefundStatus.PENDING, "退款中"],
|
|
||||||
[RefundStatus.SUCCESS, "已退款"],
|
|
||||||
]);
|
|
||||||
|
|
||||||
const gameNoticeMap = new Map([
|
const gameNoticeMap = new Map([
|
||||||
[
|
[
|
||||||
"pending",
|
"pending",
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { Avatar, Dialog } from "@nutui/nutui-react-taro";
|
|||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
import "dayjs/locale/zh-cn";
|
import "dayjs/locale/zh-cn";
|
||||||
import classnames from "classnames";
|
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 { withAuth, RefundPopup } from "@/components";
|
||||||
import { payOrder, generateOrderActions } from "@/utils";
|
import { payOrder, generateOrderActions } from "@/utils";
|
||||||
import emptyContent from "@/static/emptyStatus/publish-empty.png";
|
import emptyContent from "@/static/emptyStatus/publish-empty.png";
|
||||||
@@ -285,7 +285,7 @@ const OrderList = () => {
|
|||||||
styles[unPay ? "pending" : "paid"]
|
styles[unPay ? "pending" : "paid"]
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<Text>{unPay ? "待支付" : "已支付"}</Text> ¥{" "}
|
<Text>{unPay ? "待支付" : refundTextMap.get(item.refund_status)}</Text> ¥{" "}
|
||||||
<Text>{item.amount}</Text>
|
<Text>{item.amount}</Text>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
@@ -28,6 +28,12 @@ export enum RefundStatus {
|
|||||||
SUCCESS, // 已退款
|
SUCCESS, // 已退款
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const refundTextMap = new Map([
|
||||||
|
[RefundStatus.NONE, "已支付"],
|
||||||
|
[RefundStatus.PENDING, "退款中"],
|
||||||
|
[RefundStatus.SUCCESS, "已退款"],
|
||||||
|
]);
|
||||||
|
|
||||||
export interface PayMentParams {
|
export interface PayMentParams {
|
||||||
order_id: number;
|
order_id: number;
|
||||||
order_no: string;
|
order_no: string;
|
||||||
|
|||||||
Reference in New Issue
Block a user