You need to sign in or sign up before continuing.
提交 493d8c7f 编写于 作者: D DCloud_LXH

feat: 升级中心@0.9.4

上级 a5c1fb9e
## 0.9.4(2024-12-28)
- 修复 腾讯云在使用扩展存储时报错的 Bug
## 0.9.3(2024-12-23) ## 0.9.3(2024-12-23)
- 修复 升级中心在大屏上的显示效果 - 修复 升级中心在大屏上的显示效果
## 0.9.2(2024-11-06) ## 0.9.2(2024-11-06)
......
{ {
"id": "uni-upgrade-center-app", "id": "uni-upgrade-center-app",
"displayName": "升级中心 uni-upgrade-center - App", "displayName": "升级中心 uni-upgrade-center - App",
"version": "0.9.3", "version": "0.9.4",
"description": "uni升级中心 - 客户端检查更新", "description": "uni升级中心 - 客户端检查更新",
"keywords": [ "keywords": [
"uniCloud", "uniCloud",
......
...@@ -20,9 +20,11 @@ export default function () : Promise<UniUpgradeCenterResult> { ...@@ -20,9 +20,11 @@ export default function () : Promise<UniUpgradeCenterResult> {
const url = uniUpgradeCenterResult.url // 安装包下载地址 const url = uniUpgradeCenterResult.url // 安装包下载地址
// 此处逻辑仅为示例,可自行编写 // 此处逻辑仅为示例,可自行编写
if (code > 0) { if (code > 0) {
// 腾讯云和阿里云下载链接不同,需要处理一下,阿里云会原样返回 // 腾讯云获取下载链接
const tcbRes = await uniCloud.getTempFileURL({ fileList: [url] }); if (/^cloud:\/\//.test(url)) {
if (typeof tcbRes.fileList[0].tempFileURL !== 'undefined') uniUpgradeCenterResult.url = tcbRes.fileList[0].tempFileURL; const tcbRes = await uniCloud.getTempFileURL({ fileList: [url] });
if (typeof tcbRes.fileList[0].tempFileURL !== 'undefined') uniUpgradeCenterResult.url = tcbRes.fileList[0].tempFileURL;
}
/** /**
* 提示升级一 * 提示升级一
...@@ -52,7 +54,7 @@ export default function () : Promise<UniUpgradeCenterResult> { ...@@ -52,7 +54,7 @@ export default function () : Promise<UniUpgradeCenterResult> {
* 提示升级二 * 提示升级二
* 官方适配的升级弹窗,可自行替换资源适配UI风格 * 官方适配的升级弹窗,可自行替换资源适配UI风格
*/ */
// #ifndef UNI-APP-X // #ifndef UNI-APP-X
// #ifdef APP-PLUS // #ifdef APP-PLUS
uni.setStorageSync(PACKAGE_INFO_KEY, uniUpgradeCenterResult) uni.setStorageSync(PACKAGE_INFO_KEY, uniUpgradeCenterResult)
uni.navigateTo({ uni.navigateTo({
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册