修改失败没有回调问题

This commit is contained in:
zhanghongnian3 2024-01-29 20:12:49 +08:00
parent a486b36cee
commit 189f21be0f
1 changed files with 10 additions and 0 deletions

View File

@ -545,6 +545,16 @@ export class RequestOption {
loadError = (err:BusinessError|string)=>{
LogUtil.log("loadError:" + err);
//失败回调
if(this.requestListeners != undefined) {
for (let i = 0;i < this.requestListeners.length; i++) {
let requestListener = this.requestListeners[i];
let boolInterception = requestListener.callback(err.toString(), new ImageKnifeData());
if (boolInterception) {
break;
}
}
}
// 失败占位图展示规则
if (this.retryholderFunc) {
// 重试图层优先于加载失败展示