修改ImageKnife跳过网络,从内存中获取图片 cacheType参数未使用bug

Signed-off-by: ‘面条侠’ <‘wangxinxin51@h-partners.com’>
This commit is contained in:
‘面条侠’ 2024-04-10 16:22:07 +08:00
parent 99e251c6bd
commit b5aef4c48c
2 changed files with 4 additions and 5 deletions

View File

@ -343,19 +343,19 @@ export class ImageKnife {
resolve(imageKnifeData);
}
let loadError = (err ?: BusinessError | string) => {
if (request.cacheType == CacheType.Default) {
if (cacheType == CacheType.Default) {
this.loadMemoryDiskIsUrl(request, loadComplete, loadError);
}
reject(err);
}
if (request.cacheType == CacheType.Cache) {
if (cacheType == CacheType.Cache) {
this.loadMemoryCacheIsUrl(request, loadComplete, loadError);
} else if (request.cacheType == CacheType.Disk) {
} else if (cacheType == CacheType.Disk) {
this.loadMemoryDiskIsUrl(request, loadComplete, loadError);
}
else if (request.cacheType == CacheType.Default) {
else if (cacheType == CacheType.Default) {
this.loadMemoryCacheIsUrl(request, loadComplete, loadError);
}
})

View File

@ -95,7 +95,6 @@ export class RequestOption {
addHeaderMap(map: Map<string, Object>) {
this.headers = map;
}
cacheType: CacheType = CacheType.Disk;
// 优先级
priority: Priority = Priority.MEDIUM;