This commit is contained in:
yanran200730
2022-11-15 14:36:28 +08:00
parent 90a06e91b6
commit 3daebc279e
2 changed files with 24 additions and 6 deletions

View File

@@ -61,8 +61,16 @@ export default {
},
onLoad () {
this.$loading()
this.getList()
if (this.token) {
this.$loading()
this.getUserInfo()
this.getList()
} else {
this.autoLogin().then(() => {
this.$loading()
this.getList()
})
}
this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight
},
methods: {
@@ -165,7 +173,8 @@ export default {
params: {
current: this.current,
size: 10,
listType: 1
listType: 1,
openId: this.user.openId
}
}).then(res => {
if (res.code === 0) {

View File

@@ -66,8 +66,16 @@
},
onLoad () {
this.$loading()
this.getList()
if (this.token) {
this.$loading()
this.getUserInfo()
this.getList()
} else {
this.autoLogin().then(() => {
this.$loading()
this.getList()
})
}
this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight
},
methods: {
@@ -177,7 +185,8 @@
params: {
current: this.current,
size: 10,
listType: 0
listType: 0,
openId: this.user.openId
}
}).then(res => {
if (res.code === 0) {