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
0027a4a4
Commit
0027a4a4
authored
Apr 21, 2021
by
Morson
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://git.banshouhui.com/lijundan/self-support
parents
ca8f2f7e
b664afdf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
3 deletions
+34
-3
App.vue
src/App.vue
+34
-3
No files found.
src/App.vue
View file @
0027a4a4
...
@@ -8,8 +8,8 @@ export default {
...
@@ -8,8 +8,8 @@ export default {
uniEnv
:
process
.
uniEnv
,
uniEnv
:
process
.
uniEnv
,
// 登录凭证
// 登录凭证
token
:
""
,
token
:
""
,
// 微信小程序平台编号,空--家维广场,1--自营平台
// 微信小程序平台编号,空--家维广场,1--自营平台
wxAppNo
:
1
,
wxAppNo
:
1
,
//授权提示 图标
//授权提示 图标
icon_auth_notice
:
"https://qn-static.banshouhui.com/auth_notice.png"
,
icon_auth_notice
:
"https://qn-static.banshouhui.com/auth_notice.png"
,
...
@@ -53,10 +53,13 @@ export default {
...
@@ -53,10 +53,13 @@ export default {
onLaunch
:
function
()
{
onLaunch
:
function
()
{
// 应用初始化(全局只触发一次)
// 应用初始化(全局只触发一次)
AnalysysAgent
.
registerSuperProperty
(
"platform"
,
"self-support"
);
AnalysysAgent
.
registerSuperProperty
(
"platform"
,
"self-support"
);
// 版本更新
this
.
updateApp
();
},
},
onShow
:
function
()
{
onShow
:
function
()
{
// 应用启动,或从后台进入前台显示
// 应用启动,或从后台进入前台显示
this
.
autoLogin
()
this
.
autoLogin
()
;
},
},
onHide
:
function
()
{
onHide
:
function
()
{
// 应用从前台进入后台
// 应用从前台进入后台
...
@@ -133,6 +136,34 @@ export default {
...
@@ -133,6 +136,34 @@ export default {
}
}
},
},
/* 版本更新 */
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 ------------------------------ */
/* ------------------------- 数据埋点begin ------------------------------ */
track
(
event
,
properties
)
{
track
(
event
,
properties
)
{
if
(
AnalysysAgent
)
{
if
(
AnalysysAgent
)
{
...
...
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