From 4334223264d49f826d502af595150b3bdf9dc3f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E8=BE=89?= <814457906@qq.com> Date: Fri, 17 Mar 2023 15:57:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/integral/integral.vue | 33 ++++++++++++++------------------- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/pages/integral/integral.vue b/pages/integral/integral.vue index a9a1fa2..11b8d6d 100644 --- a/pages/integral/integral.vue +++ b/pages/integral/integral.vue @@ -249,19 +249,9 @@ loginFlag: false, }; }, - onLoad(options) { - this.baseurl = baseurl - this.integral = options.integral - var that = this - const value = uni.getStorageSync('patientId'); - if (value) { - that.patientId = value - that.updata.patientId = value - that.user(); - that.selectPatientSignInifo(); - } - }, + onLoad(options) {}, onShow() { + this.baseurl = baseurl this.pageNum = 1 this.selectExchangeGoodsinfo(); this.baseurl = baseurl @@ -269,6 +259,9 @@ var that = this const value = uni.getStorageSync('patientId'); if (value) { + that.patientId = value + that.updata.patientId = value + that.selectPatientSignInifo(); AppIdentification(value).then(res => { if (res.code == 200) { if (res.data.loginFlag) { @@ -276,7 +269,6 @@ } } }) - that.updata.patientId = value goodPatientInfo(value).then(res => { if (res.code == 200) { if (res.data.length > 0) { @@ -530,12 +522,15 @@ selectExchangeGoodsinfo() { this.pageNum = 1 selectExchangeGoods(this.pageNum, this.pageSize).then(res => { - res.rows.forEach(e => { - e.goodsPictureUrl = baseurl + e.goodsPictureUrl - e.attributePitureUrl = baseurl + e.attributePitureUrl - }) - this.goodslist = res.rows - this.goodstotal = res.total + if (res.code == 200) { + this.user(); + res.rows.forEach(e => { + e.goodsPictureUrl = baseurl + e.goodsPictureUrl + e.attributePitureUrl = baseurl + e.attributePitureUrl + }) + this.goodslist = res.rows + this.goodstotal = res.total + } else {} }) }, //积分