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 {} }) }, //积分