1
This commit is contained in:
@@ -140,9 +140,13 @@ class HttpService {
|
||||
this.hideLoadingTimer = null
|
||||
}
|
||||
|
||||
// 延时300ms后隐藏loading,避免频繁切换
|
||||
// 延时 800ms 后隐藏 loading,避免频繁切换;捕获 hideLoading 失败(如 toast 已被关闭)避免报错打断流程
|
||||
this.hideLoadingTimer = setTimeout(() => {
|
||||
Taro.hideLoading()
|
||||
try {
|
||||
Taro.hideLoading()
|
||||
} catch (e) {
|
||||
// 忽略 "toast can't be found" 等,避免发布后分享等流程报错
|
||||
}
|
||||
this.currentLoadingText = ''
|
||||
this.hideLoadingTimer = null
|
||||
}, 800)
|
||||
|
||||
Reference in New Issue
Block a user