weui.confirm里面基本弹不出来weui.alert,偶尔会成功,概率非常小
解决办法: 使用setTimeout
async orderCancel () {
this.weuijsDialog = this.$weuijs.confirm(
`<p class="left fs16">若体检时间不合适,可以联系客服<span class="color_main3">${this.orgTel}</span>修改体检时间。</p>`,
{
title: '取消订单?',
isAndroid: false,
buttons: [
{
label: '确认取消',
type: 'default',
onClick: () => {
this.$http2
.post('medical/orderCancel', {
orderId: this.orderId
})
.then(() => {
setTimeout( ()=>{
this.$weuijs.alert(
'取消成功,如有退费将在0-15个工作日内退回支付账户',
()=>{
location.reload()
})
},300);
})
}
},
{
label: '暂不取消',
type: 'primary',
onClick: () => {
}
}
]
}
)
}
网友评论