From 3daebc279e32d2ce7af9f462d3042004927d7340 Mon Sep 17 00:00:00 2001 From: yanran200730 Date: Tue, 15 Nov 2022 14:36:28 +0800 Subject: [PATCH] bug --- src/project/tianfuxing/AppHome/Culture.vue | 15 ++++++++++++--- src/project/tianfuxing/AppHome/PhotoReport.vue | 15 ++++++++++++--- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/src/project/tianfuxing/AppHome/Culture.vue b/src/project/tianfuxing/AppHome/Culture.vue index 6f0ef17..9a762aa 100644 --- a/src/project/tianfuxing/AppHome/Culture.vue +++ b/src/project/tianfuxing/AppHome/Culture.vue @@ -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) { diff --git a/src/project/tianfuxing/AppHome/PhotoReport.vue b/src/project/tianfuxing/AppHome/PhotoReport.vue index 7bb86c7..548e14f 100644 --- a/src/project/tianfuxing/AppHome/PhotoReport.vue +++ b/src/project/tianfuxing/AppHome/PhotoReport.vue @@ -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) {