修改失败没有回调问题
This commit is contained in:
parent
a486b36cee
commit
189f21be0f
|
@ -545,6 +545,16 @@ export class RequestOption {
|
||||||
|
|
||||||
loadError = (err:BusinessError|string)=>{
|
loadError = (err:BusinessError|string)=>{
|
||||||
LogUtil.log("loadError:" + err);
|
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) {
|
if (this.retryholderFunc) {
|
||||||
// 重试图层优先于加载失败展示
|
// 重试图层优先于加载失败展示
|
||||||
|
|
Loading…
Reference in New Issue