配置文件修改 增加支持后端购物车批量下单
This commit is contained in:
@@ -60,15 +60,25 @@ export default {
|
||||
})
|
||||
console.log('handleSuccess', res)
|
||||
|
||||
await uni.showToast({
|
||||
icon: 'none',
|
||||
title: 'The credit card was added successfully.'
|
||||
})
|
||||
// const eventChannel = this.getOpenerEventChannel();
|
||||
// const id = res.data
|
||||
// eventChannel.emit('acceptDataFromOpenedPage', {...params, id});
|
||||
setTimeout(uni.navigateBack, 1000)
|
||||
const code = res?.data?.code ?? res?.code
|
||||
const msg = res?.data?.msg ?? res?.msg
|
||||
if (code === 200) {
|
||||
await uni.showToast({
|
||||
icon: 'none',
|
||||
title: 'The credit card was added successfully.'
|
||||
})
|
||||
setTimeout(uni.navigateBack, 1000)
|
||||
} else {
|
||||
await uni.showToast({
|
||||
icon: 'none',
|
||||
title: msg || 'Add credit card failed'
|
||||
})
|
||||
}
|
||||
} catch (e) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: e?.message || e?.data?.msg || 'Add credit card failed'
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user