优化错误提示
This commit is contained in:
@@ -46,11 +46,16 @@ export const handlePayResult = (orderId: string | undefined, e: any, { onSuccess
|
||||
});
|
||||
}
|
||||
} else {
|
||||
getApp().globalData?.logger?.error('pay failure :', orderId, resultObj);
|
||||
if(onFailure) {
|
||||
onFailure(resultObj);
|
||||
getApp().globalData?.logger?.error('pay failure :', orderId, str, resultObj);
|
||||
let msg = '支付失败';
|
||||
if(resultObj) {
|
||||
msg = resultObj?.error_message || '支付失败';
|
||||
} else {
|
||||
msg = JSON.parse(str)?.error_message || '支付失败';
|
||||
}
|
||||
if(onFailure) {
|
||||
onFailure(msg);
|
||||
} else {
|
||||
const msg = resultObj?.error_message || '支付失败';
|
||||
showToast(msg, {
|
||||
complete: () => {
|
||||
setTimeout(() => {
|
||||
|
Reference in New Issue
Block a user