From dafd08de98f823acb0c10743251b92835c5a967c Mon Sep 17 00:00:00 2001 From: hequan_waynaqua <1669738430@qq.com> Date: Thu, 27 Aug 2020 19:35:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E8=AE=A2=E5=8D=95=E6=93=8D?= =?UTF-8?q?=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/order.js | 35 ++++++++++++++++++++++++++++++++++ src/views/order/list/index.vue | 10 +++++----- src/views/order/pay/index.vue | 15 ++++++++++++++- 3 files changed, 54 insertions(+), 6 deletions(-) diff --git a/src/api/order.js b/src/api/order.js index e6dc2c1..43745a8 100644 --- a/src/api/order.js +++ b/src/api/order.js @@ -38,6 +38,13 @@ export function orderH5pay(data) { }) } +export function testPayNotify(orderId) { + return request({ + url: '/order/testPayNotify/' + orderId, + method: 'get' + }) +} + export function orderList(data) { return request({ url: '/order/list', @@ -45,3 +52,31 @@ export function orderList(data) { params: data }) } + +export function orderCancel(orderId) { + return request({ + url: '/order/cancel/' + orderId, + method: 'post' + }) +} + +export function orderRefund(orderId) { + return request({ + url: '/order/refund/' + orderId, + method: 'post' + }) +} + +export function orderDelete(orderId) { + return request({ + url: '/order/delete/' + orderId, + method: 'post' + }) +} + +export function orderConfirm(orderId) { + return request({ + url: '/order/confirm/' + orderId, + method: 'post' + }) +} diff --git a/src/views/order/list/index.vue b/src/views/order/list/index.vue index c34d5be..3d5d130 100644 --- a/src/views/order/list/index.vue +++ b/src/views/order/list/index.vue @@ -139,7 +139,7 @@ export default { this.$dialog .confirm({ message: '确定要删除该订单吗?' }) .then(() => { - orderDelete({ orderId: id }).then(() => { + orderDelete(id).then(() => { this.init() this.$toast('已删除订单') }) @@ -150,7 +150,7 @@ export default { this.$dialog .confirm({ message: '确定要取消该订单吗?' }) .then(() => { - orderCancel({ orderId: id }).then(() => { + orderCancel(id).then(() => { this.init() this.$toast('已取消该订单') }) @@ -161,7 +161,7 @@ export default { this.$dialog .confirm({ message: '确定要申请退款吗?' }) .then(() => { - orderRefund({ orderId: id }).then(() => { + orderRefund(id).then(() => { this.init() this.$toast('已申请订单退款') }) @@ -174,7 +174,7 @@ export default { message: '请确认收到货物, 确认收货后无法撤销!' }) .then(() => { - orderConfirm({ orderId: id }).then(() => { + orderConfirm(id).then(() => { this.init() this.$toast('已确认收货') }) @@ -183,7 +183,7 @@ export default { }, commentOrder(id) {}, toPay(id) { - this.$router.push({ name: 'payment', params: { orderId: id } }) + this.$router.push({ name: 'OrderPay', params: { orderId: id } }) }, handleTabClick() { this.page = 0 diff --git a/src/views/order/pay/index.vue b/src/views/order/pay/index.vue index fd59b59..7e50aa5 100644 --- a/src/views/order/pay/index.vue +++ b/src/views/order/pay/index.vue @@ -36,7 +36,7 @@