Commit 3228b9d5 by 张立顺

代码上线

1 parent d0294a53
...@@ -167,7 +167,7 @@ Page({ ...@@ -167,7 +167,7 @@ Page({
// wx.switchTab({ // wx.switchTab({
// url: '/pages/tab/index/index' // url: '/pages/tab/index/index'
// }) // })
console.log(error); console.log(error)
wx.showToast({ wx.showToast({
title: '支付失败', title: '支付失败',
icon: 'error' icon: 'error'
...@@ -211,7 +211,6 @@ Page({ ...@@ -211,7 +211,6 @@ Page({
//util.showLoading('加载中...') //util.showLoading('加载中...')
console.log(op) console.log(op)
this.getOrderDetail(op) this.getOrderDetail(op)
} }
} }
} }
...@@ -219,12 +218,12 @@ Page({ ...@@ -219,12 +218,12 @@ Page({
} }
}, },
getOrderDetail(item) { getOrderDetail(item) {
console.log(item,'item'); console.log(item, 'item')
let { orderCode } = item let { orderCode } = item
api.getOrderDetail({orderCode}).then(res=>{ api.getOrderDetail({ orderCode }).then(res => {
console.log(res,'res') console.log(res, 'res')
let { code, data,errId } = res let { code, data, errId } = res
// console.log(data, 'data') // console.log(data, 'data')
// console.log(data.sceneType == 1); // console.log(data.sceneType == 1);
// debugger // debugger
...@@ -233,31 +232,30 @@ Page({ ...@@ -233,31 +232,30 @@ Page({
sceneType: data.sceneType == 1 sceneType: data.sceneType == 1
}) })
// 必须要订单 为待支付才能发起支付 // 必须要订单 为待支付才能发起支付
if (data?.payOrder == null ||data.payOrder.payStatus == 1) { if (data?.payOrder == null || data.payOrder.payStatus == 1) {
this.getInfo(item) this.getInfo(item)
}else{ } else {
wx.showToast({ wx.showToast({
title: '非待支付订单', title: '非待支付订单',
icon: 'error' icon: 'error'
}) })
} }
}else if(errId == '-5003') { } else if (errId == '-5003') {
wx.showToast({ wx.showToast({
title: '订单已失效', title: '订单已失效',
icon: 'error' icon: 'error'
}) })
}else{ } else {
wx.showToast({ wx.showToast({
title: '请求失败', title: '请求失败',
icon: 'error' icon: 'error'
}) })
} }
}) })
// , // ,
// res => { // res => {
// // else { // // else {
// // util.showToast('系统异常') // // util.showToast('系统异常')
// // } // // }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!