Commit 038a744f by zhangzhen

添加订单取消支付后进行取消订单

parent 391d9995
......@@ -63,3 +63,8 @@ export const noLoginGetOrderInfo=(orderNo)=>{
let url=`/openInterface/order/info?orderNo=${orderNo}`
return http.get(url)
}
export const orderCancelPay=(data)=>{
let url=`/order/cancelPay`
return http.post(url,data)
}
\ No newline at end of file
......@@ -358,7 +358,8 @@
import {
orderCreate,
computePrice,
getOrderInfoByNo
getOrderInfoByNo,
orderCancelPay
} from "@/api/order"
export default {
......@@ -1287,12 +1288,19 @@
})
},
"fail": (resp) => {
console.log(resp,"支付失败")
// 取消支付或支付失败
uni.showToast({
title: "取消支付"
})
orderCancelPay({
orderNo:res.data.data.orderNo
}).then(res=>{
console.log(res)
})
},
"complete": (resp) => {
console.log(resp,"支付完成")
// 接口调用结束的回调函数(调用成功、失败都会执行)
}
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment