Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
study
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
Damon
study
Commits
7a1c11dc
Commit
7a1c11dc
authored
Jul 27, 2021
by
linwenqing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor:我的设置-版本更新
parent
21f7c778
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
setting.vue
src/pages/mine/setting.vue
+22
-0
No files found.
src/pages/mine/setting.vue
View file @
7a1c11dc
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
title=
"版本更新"
title=
"版本更新"
value=
"当前版本v1.1.0"
value=
"当前版本v1.1.0"
:border-bottom=
"false"
:border-bottom=
"false"
@
tap=
"upgrade"
></u-cell-item>
></u-cell-item>
</u-cell-group>
</u-cell-group>
<view
class=
"logout"
@
tap=
"logout"
>
退出登录
</view>
<view
class=
"logout"
@
tap=
"logout"
>
退出登录
</view>
...
@@ -19,6 +20,27 @@ export default {
...
@@ -19,6 +20,27 @@ export default {
computed
:
{},
computed
:
{},
onLoad
()
{},
onLoad
()
{},
methods
:
{
methods
:
{
upgrade
:
function
()
{
wx
.
showToast
({
title
:
'正在更新版本...'
,
icon
:
'loading'
,
})
const
um
=
wx
.
getUpdateManager
()
um
.
onCheckForUpdate
(
function
(
res
)
{
if
(
res
.
hasUpdate
)
{
um
.
onUpdateReady
(
function
()
{
um
.
applyUpdate
()
wx
.
showToast
({
title
:
'更新完成'
,
})
})
}
else
{
wx
.
showToast
({
title
:
'已是最新版本'
,
})
}
})
},
logout
()
{
logout
()
{
this
.
$u
.
vuex
(
'vuex_token'
,
''
)
this
.
$u
.
vuex
(
'vuex_token'
,
''
)
this
.
$u
.
vuex
(
'openId'
,
''
)
this
.
$u
.
vuex
(
'openId'
,
''
)
...
...
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