diff --git a/pages/index/userAgreement.vue b/pages/index/userAgreement.vue new file mode 100644 index 0000000..4047fb8 --- /dev/null +++ b/pages/index/userAgreement.vue @@ -0,0 +1,130 @@ + + + + + \ No newline at end of file diff --git a/pagesCoin/beerCoin.vue b/pagesCoin/beerCoin.vue index 61b8a1b..30962f3 100644 --- a/pagesCoin/beerCoin.vue +++ b/pagesCoin/beerCoin.vue @@ -158,6 +158,16 @@ }, // 门店啤酒币余额 getStoreCoinBalanceFun() { + // 检查登录状态 + const token = uni.getStorageSync('token') + if (!token) { + // 未登录状态,重置数据 + this.coinList = [] + this.totalCoin = 0 + this.commonCoin = 0 + return + } + getStoreCoinBalance().then(res => { console.log(res) // 累加balance @@ -170,8 +180,18 @@ if(common && common.length > 0) { this.commonCoin = common[0].balance } + } else { + // 没有数据时重置 + this.coinList = [] + this.totalCoin = 0 + this.commonCoin = 0 } - + }).catch(err => { + console.error('获取啤酒币余额失败:', err) + // 请求失败时重置数据 + this.coinList = [] + this.totalCoin = 0 + this.commonCoin = 0 }) }, diff --git a/pagesMy/addAiad.vue b/pagesMy/addAiad.vue index f1cbb7c..7e82821 100644 --- a/pagesMy/addAiad.vue +++ b/pagesMy/addAiad.vue @@ -44,7 +44,7 @@ export default { data() { return { - qrcode: '/static/img/qrcode.png' + qrcode: '/static/contact_me_qr.png' } } } diff --git a/static/contact_me_qr.png b/static/contact_me_qr.png new file mode 100644 index 0000000..86bac10 Binary files /dev/null and b/static/contact_me_qr.png differ