forked from floraachy/ImageKnife
ddd #1
|
@ -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