修改ImageKnife跳过网络,从内存中获取图片 cacheType参数未使用bug
Signed-off-by: ‘面条侠’ <‘wangxinxin51@h-partners.com’>
This commit is contained in:
parent
99e251c6bd
commit
b5aef4c48c
|
@ -343,19 +343,19 @@ export class ImageKnife {
|
||||||
resolve(imageKnifeData);
|
resolve(imageKnifeData);
|
||||||
}
|
}
|
||||||
let loadError = (err ?: BusinessError | string) => {
|
let loadError = (err ?: BusinessError | string) => {
|
||||||
if (request.cacheType == CacheType.Default) {
|
if (cacheType == CacheType.Default) {
|
||||||
this.loadMemoryDiskIsUrl(request, loadComplete, loadError);
|
this.loadMemoryDiskIsUrl(request, loadComplete, loadError);
|
||||||
}
|
}
|
||||||
reject(err);
|
reject(err);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (request.cacheType == CacheType.Cache) {
|
if (cacheType == CacheType.Cache) {
|
||||||
this.loadMemoryCacheIsUrl(request, loadComplete, loadError);
|
this.loadMemoryCacheIsUrl(request, loadComplete, loadError);
|
||||||
|
|
||||||
} else if (request.cacheType == CacheType.Disk) {
|
} else if (cacheType == CacheType.Disk) {
|
||||||
this.loadMemoryDiskIsUrl(request, loadComplete, loadError);
|
this.loadMemoryDiskIsUrl(request, loadComplete, loadError);
|
||||||
}
|
}
|
||||||
else if (request.cacheType == CacheType.Default) {
|
else if (cacheType == CacheType.Default) {
|
||||||
this.loadMemoryCacheIsUrl(request, loadComplete, loadError);
|
this.loadMemoryCacheIsUrl(request, loadComplete, loadError);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -95,7 +95,6 @@ export class RequestOption {
|
||||||
addHeaderMap(map: Map<string, Object>) {
|
addHeaderMap(map: Map<string, Object>) {
|
||||||
this.headers = map;
|
this.headers = map;
|
||||||
}
|
}
|
||||||
cacheType: CacheType = CacheType.Disk;
|
|
||||||
|
|
||||||
// 优先级
|
// 优先级
|
||||||
priority: Priority = Priority.MEDIUM;
|
priority: Priority = Priority.MEDIUM;
|
||||||
|
|
Loading…
Reference in New Issue