diff --git a/my/setting/index.vue b/my/setting/index.vue index 8ada63b..f8b7c9a 100644 --- a/my/setting/index.vue +++ b/my/setting/index.vue @@ -74,6 +74,8 @@ uni.removeStorageSync('unionId') uni.removeStorageSync('openId') uni.removeStorageSync('isVIP') + uni.removeStorageSync('artificerId') + uni.showToast({ title: '退出成功!', icon: 'none' diff --git a/pages/my/index.vue b/pages/my/index.vue index 1234a77..6ea9abb 100644 --- a/pages/my/index.vue +++ b/pages/my/index.vue @@ -343,6 +343,7 @@ } }, onLoad() { + this.getMyPageNum(); this.XCXIsSelect = this.$queue.getData("XCXIsSelect"); this.shopSel = this.$queue.getData('shopSel'); }, @@ -416,8 +417,10 @@ }, getMyPageNum() { let artificerId = uni.getStorageSync("artificerId"); + console.log("artificerId--->",artificerId); if (artificerId) { this.$Request.getXZX("/app/artificer/integral/home/?artificerId=" + artificerId, ).then((res) => { + console.log("res>",res); if (res && res.code == 0) { this.dailyEarnings = res?.data?.dailyEarnings; this.earnings = res?.data?.earnings; @@ -425,6 +428,11 @@ this.currentEndDate = res?.data?.currentEndDate.split(" ")[0]; } }) + }else{ + this.dailyEarnings = 0; + this.earnings =0; + this.currentMonthsIncome = 0; + this.currentEndDate = ""; } }, getJqqd() { diff --git a/pages/public/loginphone.vue b/pages/public/loginphone.vue index 4afcd79..03e9f01 100644 --- a/pages/public/loginphone.vue +++ b/pages/public/loginphone.vue @@ -97,6 +97,7 @@ this.$queue.setData("invitationCode", res.user.invitationCode); this.$queue.setData("inviterCode", res.user.inviterCode); this.$queue.setData("onlineStatus", res.user?.status); + this.$queue.setData("artificerId", res.user?.artificerId); this.getIsVip() uni.hideLoading(); uni.switchTab({