提交 f6059117 作者: 方治民

chore: 更新 uni_modules

上级 9431d8c9
## 1.0.16(2023-04-25)
- 新增maxTokenLength配置,用于限制数据库用户记录token数组的最大长度
## 1.0.15(2023-04-06)
- 修复部分语言国际化出错的Bug
## 1.0.14(2023-03-07) ## 1.0.14(2023-03-07)
- 修复 admin用户包含其他角色时未包含在token的Bug - 修复 admin用户包含其他角色时未包含在token的Bug
## 1.0.13(2022-07-21) ## 1.0.13(2022-07-21)
......
{ {
"displayName": "uni-id-common", "displayName": "uni-id-common",
"version": "1.0.14", "version": "1.0.16",
"description": "包含uni-id token生成、校验、刷新功能的云函数公共模块", "description": "包含uni-id token生成、校验、刷新功能的云函数公共模块",
"keywords": [ "keywords": [
"uni-id-common", "uni-id-common",
......
{ {
"name": "uni-id-common", "name": "uni-id-common",
"version": "1.0.14", "version": "1.0.16",
"description": "uni-id token生成、校验、刷新", "description": "uni-id token生成、校验、刷新",
"homepage": "https://uniapp.dcloud.io/uniCloud/uni-id-common.html", "homepage": "https://uniapp.dcloud.io/uniCloud/uni-id-common.html",
"repository": { "repository": {
......
## 0.6.3(2023-08-30)
- 修复 下载 wgt 时如果后缀名不正确,重命名后安装
## 0.6.2(2022-11-21)
- 处理 cloudfunctions 目录
## 0.6.1(2022-08-17) ## 0.6.1(2022-08-17)
- 修复 后台添加应用市场,但都没有启用的情况下报错的Bug (需要 uni-admin 1.9.3+) - 修复 后台添加应用市场,但都没有启用的情况下报错的Bug (需要 uni-admin 1.9.3+)
## 0.6.0(2022-07-19) ## 0.6.0(2022-07-19)
......
{ {
"displayName": "升级中心 uni-upgrade-center - App", "displayName": "升级中心 uni-upgrade-center - App",
"version": "0.6.1", "version": "0.6.3",
"description": "uni升级中心 - 客户端检查更新", "description": "uni升级中心 - 客户端检查更新",
"keywords": [ "keywords": [
"uniCloud", "uniCloud",
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
], ],
"repository": "https://gitee.com/dcloud/uni-upgrade-center/tree/master/uni_modules/uni-upgrade-center-app", "repository": "https://gitee.com/dcloud/uni-upgrade-center/tree/master/uni_modules/uni-upgrade-center-app",
"engines": { "engines": {
"HBuilderX": "^3.1.0" "HBuilderX": "^3.2.14"
}, },
"dcloudext": { "dcloudext": {
"sale": { "sale": {
......
...@@ -28,22 +28,20 @@ ...@@ -28,22 +28,20 @@
<template v-else> <template v-else>
<template v-if="!downloadSuccess"> <template v-if="!downloadSuccess">
<view class="progress-box flex-column" v-if="downloading"> <view class="progress-box flex-column" v-if="downloading">
<progress class="progress" border-radius="35" :percent="downLoadPercent" <progress class="progress" border-radius="35" :percent="downLoadPercent" activeColor="#3DA7FF" show-info
activeColor="#3DA7FF" show-info stroke-width="10" /> stroke-width="10" />
<view style="width:100%;font-size: 28rpx;display: flex;justify-content: space-around;"> <view style="width:100%;font-size: 28rpx;display: flex;justify-content: space-around;">
<text>{{downLoadingText}}</text> <text>{{downLoadingText}}</text>
<text>({{downloadedSize}}/{{packageFileSize}}M)</text> <text>({{downloadedSize}}/{{packageFileSize}}M)</text>
</view> </view>
</view> </view>
<button v-else class="content-button" style="border: none;color: #fff;" plain <button v-else class="content-button" style="border: none;color: #fff;" plain @click="updateApp">
@click="updateApp">
{{downLoadBtnText}} {{downLoadBtnText}}
</button> </button>
</template> </template>
<button v-else-if="downloadSuccess && !installed" class="content-button" <button v-else-if="downloadSuccess && !installed" class="content-button" style="border: none;color: #fff;"
style="border: none;color: #fff;" plain :loading="installing" :disabled="installing" plain :loading="installing" :disabled="installing" @click="installPackage">
@click="installPackage">
{{installing ? '正在安装……' : '下载完成,立即安装'}} {{installing ? '正在安装……' : '下载完成,立即安装'}}
</button> </button>
...@@ -55,8 +53,8 @@ ...@@ -55,8 +53,8 @@
</view> </view>
</view> </view>
<image v-if="!is_mandatory" class="close-img" src="../images/app_update_close.png" <image v-if="!is_mandatory" class="close-img" src="../images/app_update_close.png" @click.stop="closeUpdate">
@click.stop="closeUpdate"></image> </image>
</view> </view>
</view> </view>
</template> </template>
...@@ -282,22 +280,25 @@ ...@@ -282,22 +280,25 @@
success: res => { success: res => {
if (res.statusCode == 200) { if (res.statusCode == 200) {
this.downloadSuccess = true; this.downloadSuccess = true;
this.tempFilePath = res.tempFilePath // fix: wgt 文件下载完成后后缀不是 wgt
if (this.isWGT && res.tempFilePath.split('.').slice(-1) !== 'wgt') {
// 强制更新,直接安装 const failCallback = (e) => {
if (this.is_mandatory) { console.log('[FILE RENAME FAIL]:', JSON.stringify(e));
this.installPackage(); }
plus.io.resolveLocalFileSystemURL(res.tempFilePath, function(entry) {
entry.getParent((parent) => {
const newName = `new_wgt_${Date.now()}.wgt`
entry.copyTo(parent, newName, (res) => {
this.tempFilePath = res.fullPath
this.downLoadComplete()
}, failCallback)
}, failCallback)
}, failCallback);
} else {
this.tempFilePath = res.tempFilePath
this.downLoadComplete()
} }
} }
},
complete: () => {
this.downloading = false;
this.downLoadPercent = 0
this.downloadedSize = 0
this.packageFileSize = 0
downloadTask = null;
} }
}); });
...@@ -307,6 +308,20 @@ ...@@ -307,6 +308,20 @@
this.packageFileSize = (res.totalBytesExpectedToWrite / Math.pow(1024, 2)).toFixed(2); this.packageFileSize = (res.totalBytesExpectedToWrite / Math.pow(1024, 2)).toFixed(2);
}); });
}, },
downLoadComplete() {
this.downloading = false;
this.downLoadPercent = 0
this.downloadedSize = 0
this.packageFileSize = 0
downloadTask = null;
// 强制更新,直接安装
if (this.is_mandatory) {
this.installPackage();
}
},
installPackage() { installPackage() {
// #ifdef APP-PLUS // #ifdef APP-PLUS
// wgt资源包安装 // wgt资源包安装
...@@ -436,7 +451,7 @@ ...@@ -436,7 +451,7 @@
background-color: #fff; background-color: #fff;
box-sizing: border-box; box-sizing: border-box;
padding: 0 50rpx; padding: 0 50rpx;
font-family: -apple-system-font, 'Helvetica Neue', Helvetica, sans-serif; font-family: Source Han Sans CN;
} }
.text { .text {
...@@ -536,4 +551,4 @@ ...@@ -536,4 +551,4 @@
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
} }
</style> </style>
\ No newline at end of file
...@@ -2,13 +2,18 @@ export default function() { ...@@ -2,13 +2,18 @@ export default function() {
// #ifdef APP-PLUS // #ifdef APP-PLUS
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
plus.runtime.getProperty(plus.runtime.appid, function(widgetInfo) { plus.runtime.getProperty(plus.runtime.appid, function(widgetInfo) {
const data = { let data = {
action: 'checkVersion', action: 'checkVersion',
appid: plus.runtime.appid, appid: plus.runtime.appid,
appVersion: plus.runtime.version, appVersion: plus.runtime.version,
wgtVersion: widgetInfo.version wgtVersion: widgetInfo.version
} }
console.log("data: ",data); data = {
"action": "checkVersion",
"appid": "__UNI__TEST__",
"appVersion": "1.0",
"wgtVersion": "1.0"
}
uniCloud.callFunction({ uniCloud.callFunction({
name: 'uni-upgrade-center', name: 'uni-upgrade-center',
data, data,
......
...@@ -64,7 +64,7 @@ export default function() { ...@@ -64,7 +64,7 @@ export default function() {
uni.removeStorageSync(PACKAGE_INFO_KEY) uni.removeStorageSync(PACKAGE_INFO_KEY)
} }
}) })
return return
} else if (code < 0) { } else if (code < 0) {
// TODO 云函数报错处理 // TODO 云函数报错处理
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论