修复结算页报错返回上一层

This commit is contained in:
maqian
2021-11-23 16:10:14 +08:00
parent 7dc6faae35
commit 7a3150b8bf
2 changed files with 6 additions and 18 deletions

View File

@@ -238,10 +238,10 @@ class App extends Component {
'pages/member/qrcode'
],
plugins: {
"live-player-plugin": {
"version": "1.3.0", // 填写该直播组件版本号
"provider": "wx2b03c6e691cd7370" // 必须填该直播组件appid
}
// "live-player-plugin": {
// "version": "1.3.0", // 填写该直播组件版本号
// "provider": "wx2b03c6e691cd7370" // 必须填该直播组件appid
// }
// "meiqia": {
// "version": "1.1.0",
// "provider": "wx2d2cd5fd79396601"

View File

@@ -683,19 +683,6 @@ export default class CartCheckout extends Component {
data = await api.cart.total(params)
} catch (e) {
this.resolvePayError(e)
// let pages = pages = Taro.getCurrentPages()
// let currentPage = pages[pages.length - 2]
// let option = currentPage.options
// console.log(pages, 'page', currentPage.route, currentPage.options)
// let arr = []
// Object.keys(option).forEach((key) => {
// arr.push(key+ '=' + option[key])
// })
// console.log(arr, 'att', currentPage.route + '?' + arr.join('&'))
// Taro.redirectTo({
// url: currentPage.route + '?' + arr.join('&')
// })
if (init) Taro.navigateBack()
}
if (!data) return
@@ -1006,7 +993,6 @@ export default class CartCheckout extends Component {
}
resolvePayError(e) {
console.log("===resolvePayError",e)
const { payType, disabledPayment, defalutPaytype } = this.state
if (payType === 'point' || payType === 'deposit') {
const disabledPaymentMes = {}
@@ -1069,6 +1055,8 @@ export default class CartCheckout extends Component {
}
}
})
} else if (e.res.status_code === 422) {
Taro.navigateBack()
}
}