diff --git a/api/order.js b/api/order.js index db2860b..193cb14 100644 --- a/api/order.js +++ b/api/order.js @@ -17,7 +17,7 @@ export const orderDetailApi = (data) => { //重新发起支付 export const rePaymentApi = (data) => { - return request.post('/order/order/Repayment', data); + return request.post('/order/order/pay', data); } //订单数量统计 diff --git a/pagesOrder/order/component/good.vue b/pagesOrder/order/component/good.vue index 1979db3..63356a3 100644 --- a/pagesOrder/order/component/good.vue +++ b/pagesOrder/order/component/good.vue @@ -62,13 +62,25 @@ datas: { type: Object, default: () => {} + }, + status: { + type: String, + default: '' } }) const navTo = () => { - uni.navigateTo({ - url: `/pagesOrder/detail/detail?type=${props.datas.paid}&id=${props.datas.id}` - }) + console.log(status); + if (status == 4) { + console.log(props.datas.id); + uni.navigateTo({ + url: "/pages/afterSales/afterSalesOrderDetail?id=" + props.datas.id + }) + } else { + uni.navigateTo({ + url: `/pagesOrder/detail/detail?type=${props.datas.paid}&id=${props.datas.id}` + }) + } } const emit = defineEmits(['cancleOrder', 'rePay', 'takeOrder', 'purchaseAgain']); diff --git a/pagesOrder/order/order.vue b/pagesOrder/order/order.vue index e438f0f..5250f58 100644 --- a/pagesOrder/order/order.vue +++ b/pagesOrder/order/order.vue @@ -46,7 +46,7 @@ - + 选择商品 @@ -153,7 +153,7 @@ if (swiperCurrent.value == 1 && orderList.value[1].length == 0) getOrderList(1, '', 0); //代付款 if (swiperCurrent.value == 2 && orderList.value[2].length == 0) getOrderList(2, 1, 1); //待核销 if (swiperCurrent.value == 3 && orderList.value[3].length == 0) getOrderList(3, 2, 1); //已核销 - if (swiperCurrent.value == 4 && orderList.value[4].length == 0) getOrderList(2, -1, 1); //退款 + if (swiperCurrent.value == 4 && orderList.value[4].length == 0) getOrderList(4, -1, 1); //退款 } // 取消订单 @@ -163,7 +163,7 @@ showCancel.value = false; cancelOrderApi({ order_id: cancelId, - value: e.value + value: e.name }).then(res => { uni.showToast({ title: '取消成功', @@ -220,7 +220,7 @@ const applyAfterSales = (item) => { refundShow.value = true; goodsList.value = item.goods_list; - orderId.value = item.order_id; + orderId.value = item.id; } // 跳转到申请售后 @@ -359,7 +359,7 @@ if (swiperCurrent.value == 1) getOrderList(1, '', 0); //代付款 if (swiperCurrent.value == 2) getOrderList(2, 1, 1); //待核销 if (swiperCurrent.value == 3) getOrderList(3, 2, 1); //已核销 - if (swiperCurrent.value == 4) getOrderList(2, -1, 1); //退款 + if (swiperCurrent.value == 4) getOrderList(4, -1, 1); //退款 } // 搜索 @@ -371,7 +371,7 @@ if (swiperCurrent.value == 1) getOrderList(1, '', 0); //代付款 if (swiperCurrent.value == 2) getOrderList(2, 1, 1); //待核销 if (swiperCurrent.value == 3) getOrderList(3, 2, 1); //已核销 - if (swiperCurrent.value == 4) getOrderList(2, -1, 1); //退款 + if (swiperCurrent.value == 4) getOrderList(4, -1, 1); //退款 } let back = 0; @@ -391,7 +391,7 @@ getOrderList(1, '', 0); //代付款 getOrderList(2, 1, 1); //待核销 getOrderList(3, 2, 1); //已核销 - getOrderList(2, -1, 1); //退款 + getOrderList(4, -1, 1); //退款 } onLoad((options) => {