Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
singleStore
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Max
singleStore
Commits
5fbbf2c4
Commit
5fbbf2c4
authored
Jun 15, 2021
by
June
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feature: appjs
parent
af43e5d9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
32 deletions
+32
-32
App.vue
App.vue
+32
-32
No files found.
App.vue
View file @
5fbbf2c4
<
script
>
<
script
>
import
{
mapActions
}
from
'
vuex
'
import
{
checkLoginStatus
}
from
'
@/apis/user.js
'
import
{
login_wx
}
from
'
@/utils/modules/login.js
'
...
...
@@ -20,37 +20,37 @@ export default {
}
})
.
catch
(
err
=>
console
.
log
(
err
))
},
methods
:
{
},
methods
:
{
...
mapActions
(
'
systemInfo
'
,
[
'
setSystemInfo
'
,
'
setMenuButtonInfo
'
]),
...
mapActions
(
'
user
'
,
[
'
setLocation
'
,
'
setLoginStatus
'
]),
...
mapActions
(
'
cart
'
,
[
'
setCount
'
]),
// 检查更新
...
mapActions
(
'
cart
'
,
[
'
setCount
'
]),
// 检查更新
checkUpdate
()
{
if
(
wx
.
canIUse
(
'
getUpdateManager
'
))
{
const
updateManager
=
uni
.
getUpdateManager
()
// 请求完新版本信息的回调
// updateManager.onCheckForUpdate(res => {
// console.log(res.hasUpdate)
// })
updateManager
.
onUpdateReady
(()
=>
{
uni
.
showModal
({
title
:
'
是否更新
'
,
content
:
'
新版本已经准备好,是否重启应用?
'
,
success
:
res
=>
{
if
(
res
.
confirm
)
updateManager
.
applyUpdate
()
}
})
})
// updateManager.applyUpdate()
updateManager
.
onUpdateFailed
(()
=>
{
this
.
$toast
({
title
:
"
更新失败,请检查您的网络是否正常
"
})
if
(
wx
.
canIUse
(
'
getUpdateManager
'
))
{
const
updateManager
=
uni
.
getUpdateManager
()
// 请求完新版本信息的回调
// updateManager.onCheckForUpdate(res => {
// console.log(res.hasUpdate)
// })
updateManager
.
onUpdateReady
(()
=>
{
uni
.
showModal
({
title
:
'
是否更新
'
,
content
:
'
新版本已经准备好,是否重启应用?
'
,
success
:
res
=>
{
if
(
res
.
confirm
)
updateManager
.
applyUpdate
()
}
})
})
// updateManager.applyUpdate()
updateManager
.
onUpdateFailed
(()
=>
{
this
.
$toast
({
title
:
"
更新失败,请检查您的网络是否正常
"
})
})
}
}
}
}
}
}
</
script
>
...
...
@@ -59,10 +59,10 @@ export default {
@import
url("@/styles/layout.css")
;
/* 隐藏scrollbar 滚动条 */
::-webkit-scrollbar
{
display
:
none
;
width
:
0
;
height
:
0
;
color
:
transparent
;
::-webkit-scrollbar
{
display
:
none
;
width
:
0
;
height
:
0
;
color
:
transparent
;
}
</
style
>
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