This commit is contained in:
2026-04-10 15:47:09 +08:00
parent b251c899ca
commit a2fadc57b8
7 changed files with 622 additions and 255 deletions

View File

@ -14,12 +14,18 @@
{{ userInfo.userID && userInfo.username ? userInfo.username : '嗨,你好呀' }}
</view>
</view>
<view class="userPhone" v-if="userInfo.phone">
{{ userInfo.phone }}
</view>
<!-- <view class="vipWrapper">
<image class="lableImg" :src="`${imgPrefix}home-vipLabel.png`" mode=""></image>
v{{ userInfo.vipLevel || 1 }}会员
</view> -->
</view>
</view>
<view class="logoutBtn" @click="showLogoutModal = true">
退出登录
</view>
<!-- <view class="userRight">
<view class="userRgihtItemView" @click="jumpTo('/pages/client/recharge/index?tab=points')">
<view class="num">
@ -300,6 +306,10 @@ components: {
logout() {
loginOut();
this.showLogoutModal = false;
// 清除Vuex中的用户状态
this.$store.dispatch('user/deleteToken');
this.$store.dispatch('user/clearUserInfo');
// 清除本地缓存
uni.clearStorageSync();
uni.reLaunch({
url: "/pages/client/auth/index",
@ -390,6 +400,21 @@ title: '请添加客服号',
font-size: 28rpx;
font-weight: 500;
}
.userPhone {
font-size: 24rpx;
color: #999;
margin-top: 8rpx;
}
}
.logoutBtn {
background: linear-gradient(270deg, #FF19A0 0%, #FF6BB3 100%);
color: #fff;
padding: 16rpx 32rpx;
border-radius: 50rpx;
font-size: 24rpx;
font-weight: 500;
}
.userRight {