diff --git a/src/assets/api.js b/src/assets/api.js index 92b0eedf..ffa1f9e7 100644 --- a/src/assets/api.js +++ b/src/assets/api.js @@ -994,4 +994,9 @@ export const queryConfig = (data) => { return req("get", baseurl + "/voucher/queryConfig", data) } +/* 重试领取 */ +export const receiveRetry = (data) => { + return req("post", baseurl + "/voucher/receiveRetry", data) +} + export { req } diff --git a/src/pages/order/list/list.js b/src/pages/order/list/list.js index 816c0225..57ba54c1 100644 --- a/src/pages/order/list/list.js +++ b/src/pages/order/list/list.js @@ -6,7 +6,8 @@ import { putOrderCancel, putOrderSuccess, refund, - resendCardCode + resendCardCode, + receiveRetry } from "@/assets/api.js" import "@/assets/comm.css" import { nowDay, nowMonth } from "@/assets/comm.js" @@ -506,6 +507,19 @@ export default class orderList extends React.Component { }) } + /* 重试领取 */ + handlerReceiveRetry(order_number) { + receiveRetry({ order_number }).then(({ code, message }) => { + Notify.clear() + if (code === 200) { + Notify.success(message) + this.getOrderFn() + } else { + Notify.error(message) + } + }) + } + // 监听组件内部状态的变化: componentDidUpdate(prevProps, prevState) { // 参数分别为改变之前的数据状态对象 @@ -783,6 +797,16 @@ export default class orderList extends React.Component { ) : null} + {rowData.type === 2 && + rowData.status === 2 && + rowData.received_num !== rowData.num ? ( + this.handlerReceiveRetry(rowData.order_number)} + > + 重试领取 + + ) : null} {rowData.type == 1 && rowData.product_type == 2 && rowData.product.card_show == 1 &&