Commit 038a744f by zhangzhen

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

parent 391d9995
...@@ -62,4 +62,9 @@ export const noLoginOpenDoor=(orderNo)=>{ ...@@ -62,4 +62,9 @@ export const noLoginOpenDoor=(orderNo)=>{
export const noLoginGetOrderInfo=(orderNo)=>{ export const noLoginGetOrderInfo=(orderNo)=>{
let url=`/openInterface/order/info?orderNo=${orderNo}` let url=`/openInterface/order/info?orderNo=${orderNo}`
return http.get(url) 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 @@ ...@@ -358,7 +358,8 @@
import { import {
orderCreate, orderCreate,
computePrice, computePrice,
getOrderInfoByNo getOrderInfoByNo,
orderCancelPay
} from "@/api/order" } from "@/api/order"
export default { export default {
...@@ -1287,12 +1288,19 @@ ...@@ -1287,12 +1288,19 @@
}) })
}, },
"fail": (resp) => { "fail": (resp) => {
console.log(resp,"支付失败")
// 取消支付或支付失败 // 取消支付或支付失败
uni.showToast({ uni.showToast({
title: "取消支付" title: "取消支付"
}) })
orderCancelPay({
orderNo:res.data.data.orderNo
}).then(res=>{
console.log(res)
})
}, },
"complete": (resp) => { "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