Skip to content

Commit e6195b3

Browse files
author
DCloud_LXH
committed
fix: 升级中心测试下载兼容 cloud:// 协议
1 parent 4bb8e42 commit e6195b3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

uni_modules/uni-upgrade-center/pages/mixin/version_add_detail_mixin.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,11 @@ export default {
211211
stable_publish: false
212212
}
213213
},
214-
toUrl(url){
214+
async toUrl(url){
215+
if (/^cloud:\/\//.test(url)) {
216+
const tcbRes = await uniCloud.getTempFileURL({ fileList: [url] });
217+
if (typeof tcbRes.fileList[0].tempFileURL !== 'undefined') url = tcbRes.fileList[0].tempFileURL;
218+
}
215219
// #ifdef H5
216220
window.open(url);
217221
// #endif

0 commit comments

Comments
 (0)