Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
self-support
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李俊赕
self-support
Commits
b664afdf
Commit
b664afdf
authored
4 years ago
by
Facius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
版本更新
parent
a84cfc73
master
dev
dev-1.3.1
dev-1.4.0
dev-1.4.1
dev-1.4.3
dev-1.4.4
dev-1.4.5
dev-1.4.6
dev-1.5.0
dev-1.5.1
dev-1.5.3
dev-1.5.4
dev-1.5.5
dev-1.5.7
dev-bills-1.4.4
dev-damon
dev-fix-auth
dev-zypt-v1.5.2
hotfix
test
tmp-test
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
0 deletions
+32
-0
App.vue
src/App.vue
+32
-0
No files found.
src/App.vue
View file @
b664afdf
...
...
@@ -56,6 +56,9 @@ export default {
AnalysysAgent
.
registerSuperProperty
(
"platform"
,
"self-support"
);
// 应用启动,或从后台进入前台显示
that
.
autoLogin
();
// 版本更新
this
.
updateApp
()
},
onShow
:
function
()
{
// 应用启动,或从后台进入前台显示
...
...
@@ -138,6 +141,35 @@ export default {
this
.
$u
.
vuex
(
"vuex_token"
,
""
);
}
},
/* 版本更新 */
updateApp
()
{
// 版本更新
const
updateManager
=
uni
.
getUpdateManager
();
updateManager
.
onCheckForUpdate
(
function
(
res
)
{
// 请求完新版本信息的回调
console
.
log
(
res
.
hasUpdate
);
});
updateManager
.
onUpdateReady
(
function
(
res
)
{
uni
.
showModal
({
title
:
'更新提示'
,
content
:
'新版本已经准备好,是否重启应用?'
,
success
(
res
)
{
if
(
res
.
confirm
)
{
// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
updateManager
.
applyUpdate
();
}
}
});
});
updateManager
.
onUpdateFailed
(
function
(
res
)
{
// 新的版本下载失败
});
},
/* ------------------------- 数据埋点begin ------------------------------ */
track
(
event
,
properties
)
{
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment