Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
basic-uniapp-v3
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Basic
basic-uniapp-v3
Commits
432a3fe4
提交
432a3fe4
authored
10月 07, 2023
作者:
方治民
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: 修复版本更新插件的异常问题
上级
3a54e42d
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
15 行增加
和
17 行删除
+15
-17
changelog.md
src/uni_modules/uni-upgrade-center-app/changelog.md
+2
-0
package.json
src/uni_modules/uni-upgrade-center-app/package.json
+1
-1
upgrade-popup.vue
...ni_modules/uni-upgrade-center-app/pages/upgrade-popup.vue
+12
-10
call-check-version.js
...odules/uni-upgrade-center-app/utils/call-check-version.js
+0
-6
没有找到文件。
src/uni_modules/uni-upgrade-center-app/changelog.md
浏览文件 @
432a3fe4
## 0.6.4(2023-09-01)
chore: 优化代码结构
## 0.6.3(2023-08-30)
-
修复 下载 wgt 时如果后缀名不正确,重命名后安装
## 0.6.2(2022-11-21)
...
...
src/uni_modules/uni-upgrade-center-app/package.json
浏览文件 @
432a3fe4
{
"displayName"
:
"升级中心 uni-upgrade-center - App"
,
"version"
:
"0.6.
3
"
,
"version"
:
"0.6.
4
"
,
"description"
:
"uni升级中心 - 客户端检查更新"
,
"keywords"
:
[
"uniCloud"
,
...
...
src/uni_modules/uni-upgrade-center-app/pages/upgrade-popup.vue
浏览文件 @
432a3fe4
...
...
@@ -281,16 +281,17 @@
if
(
res
.
statusCode
==
200
)
{
this
.
downloadSuccess
=
true
;
// fix: wgt 文件下载完成后后缀不是 wgt
if
(
this
.
isWGT
&&
res
.
tempFilePath
.
split
(
'.'
).
slice
(
-
1
)
!==
'wgt'
)
{
if
(
this
.
isWGT
&&
!
res
.
tempFilePath
.
endsWith
(
'.wgt'
)
)
{
const
failCallback
=
(
e
)
=>
{
console
.
log
(
'[FILE RENAME FAIL]:'
,
JSON
.
stringify
(
e
));
}
plus
.
io
.
resolveLocalFileSystemURL
(
res
.
tempFilePath
,
function
(
entry
)
{
plus
.
io
.
resolveLocalFileSystemURL
(
res
.
tempFilePath
,
(
entry
)
=>
{
const
originName
=
entry
.
name
entry
.
getParent
((
parent
)
=>
{
const
newName
=
`new_wgt_
${
Date
.
now
()}
.wgt`
entry
.
copyTo
(
parent
,
newName
,
(
res
)
=>
{
this
.
tempFilePath
=
res
.
fullPath
this
.
downLoadComplete
()
entry
.
copyTo
(
parent
,
newName
,
(
res
ult
)
=>
{
this
.
tempFilePath
=
res
.
tempFilePath
.
replace
(
originName
,
newName
)
this
.
downLoadComplete
()
},
failCallback
)
},
failCallback
)
},
failCallback
);
...
...
@@ -310,11 +311,11 @@
},
downLoadComplete
()
{
this
.
downloading
=
false
;
this
.
downLoadPercent
=
0
this
.
downloadedSize
=
0
this
.
packageFileSize
=
0
downloadTask
=
null
;
// 强制更新,直接安装
...
...
@@ -328,6 +329,7 @@
if
(
this
.
isWGT
)
{
this
.
installing
=
true
;
}
plus
.
runtime
.
install
(
this
.
tempFilePath
,
{
force
:
false
},
async
res
=>
{
...
...
@@ -451,7 +453,8 @@
background-color
:
#fff
;
box-sizing
:
border-box
;
padding
:
0
50
rpx
;
font-family
:
Source
Han
Sans
CN
;
font-family
:
-apple-system-font
,
BlinkMacSystemFont
,
'Droid Sans'
,
'Noto Sans'
,
'PingFang SC'
,
'Heiti SC'
,
'Helvetica Neue'
,
Helvetica
,
Arial
,
'Microsoft YaHei'
,
SimSun
,
sans-serif
;
}
.text
{
...
...
@@ -551,4 +554,4 @@
flex-direction
:
column
;
align-items
:
center
;
}
</
style
>
\ No newline at end of file
</
style
>
src/uni_modules/uni-upgrade-center-app/utils/call-check-version.js
浏览文件 @
432a3fe4
...
...
@@ -8,12 +8,6 @@ export default function() {
appVersion
:
plus
.
runtime
.
version
,
wgtVersion
:
widgetInfo
.
version
}
data
=
{
"action"
:
"checkVersion"
,
"appid"
:
"__UNI__TEST__"
,
"appVersion"
:
"1.0"
,
"wgtVersion"
:
"1.0"
}
uniCloud
.
callFunction
({
name
:
'uni-upgrade-center'
,
data
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论