This commit is contained in:
左哥 2025-11-23 22:21:01 +08:00
parent 0dbfaea026
commit 1258138ba9
2 changed files with 16 additions and 9 deletions

View File

@ -95,20 +95,21 @@ export default {
} }
}, },
onLoad() { onLoad() {
this.loadProfile(); this.loadProfile();
}, },
methods: { methods: {
loadProfile() { loadProfile() {
try { try {
const is_personal_information_complete = uni.getStorageSync('is_personal_information_complete'); // const is_personal_information_complete = uni.getStorageSync('is_personal_information_complete');
if (is_personal_information_complete) { // if (is_personal_information_complete) {
request('xcx/get_user_info', 'GET').then(res => { request('xcx/get_user_info', 'GET').then(res => {
this.form = { this.form = {
...this.form, ...this.form,
...res ...res
}; };
}); });
} // }
} catch (error) { } catch (error) {
console.warn('加载个人信息失败', error); console.warn('加载个人信息失败', error);
} }

View File

@ -11,18 +11,19 @@
<view class="profile-info"> <view class="profile-info">
<view class="title-row"> <view class="title-row">
<text class="name">{{ userInfo.username }}</text> <text class="name">{{ userInfo.username }}</text>
</view>
<view class="meta-row">
<text class="meta-item">加入于 2025-01-15</text>
<view class="vip-badge"> <view class="vip-badge">
<text>品鉴会员</text> <text>品鉴会员</text>
</view> </view>
</view> </view>
<view class="meta-row">
<text class="meta-item">加入于 2025-01-15</text>
</view>
<view class="meta-row"> <view class="meta-row">
<text class="meta-item">上海市浦东新区张江高科技园区</text> <text class="meta-item">上海市浦东新区张江高科技园区</text>
</view> </view>
</view> </view>
<view class="edit-btn" @click="navigateTo('/pages/my/editInfo/index')">编辑资料</view> <view class="edit-btn" @click="toEditInfoPage()">编辑资料</view>
</view> </view>
<view class="stats-grid"> <view class="stats-grid">
<view class="stat-card" v-for="item in stats" :key="item.label" <view class="stat-card" v-for="item in stats" :key="item.label"
@ -700,6 +701,11 @@ export default {
if (item.label === '当前积分') { if (item.label === '当前积分') {
this.navigateTo('/pages/pointsLog/index'); this.navigateTo('/pages/pointsLog/index');
} }
},
toEditInfoPage() {
uni.navigateTo({
url: '/pages/my/editInfo/index'
});
} }
} }
}; };
@ -879,7 +885,7 @@ export default {
.signin-btn { .signin-btn {
width: 100%; width: 100%;
padding: 24rpx 0; // padding: 24rpx 0;
border-radius: 999rpx; border-radius: 999rpx;
background: linear-gradient(135deg, #8b40ff 0%, #ff3c8d 100%); background: linear-gradient(135deg, #8b40ff 0%, #ff3c8d 100%);
color: #ffffff; color: #ffffff;
@ -1000,7 +1006,7 @@ export default {
position: absolute; position: absolute;
right: 32rpx; right: 32rpx;
top: 40rpx; top: 40rpx;
padding: 12rpx 28rpx; padding: 10rpx 24rpx;
border-radius: 999rpx; border-radius: 999rpx;
background-color: rgba(255, 255, 255, 0.15); background-color: rgba(255, 255, 255, 0.15);
border: 2rpx solid rgba(255, 255, 255, 0.5); border: 2rpx solid rgba(255, 255, 255, 0.5);