使用 async 和 await 是代码块同步执行:
async handleTurnBack(){
await financeTurnBack(this.turnBackParam).then((res) => {
const {data } = res
if (‘success’== data) {
this.show= false
this.KaTeX parse error: Expected 'EOF', got '}' at position 30: …退回成功') }̲ else { …message.error(‘失败,请联系管理员!’)
}
})
await this.doSearch()
},