This commit is contained in:
cansnow
2026-02-13 08:12:56 +08:00
parent 6720c15e30
commit 7c6656d1fc
8 changed files with 135 additions and 33 deletions
+23 -14
View File
@@ -2,20 +2,25 @@
<view class="page_container">
<custom-nav-bar title="个人资料" />
<view class="info_wrap">
<info-item :loading="loadingState.faceURL" @click="updateAvatar" title="头像">
<my-avatar :src="selfInfo.faceURL" :desc="selfInfo.nickname" size="30" slot="value" />
</info-item>
<info-item @click="updateNickname" title="姓名" :content="selfInfo.nickname" />
<info-item :loading="loadingState.gender" @click="updateGender" title="性别" :content="getGender" />
<info-item :loading="loadingState.birth" @click="() => (showDatePicker = true)" title="生日"
:content="getBirth" />
</view>
<uni-list class="info_wrap">
<uni-list-item :loading="loadingState.faceURL" @click="updateAvatar" title="头像" clickable showArrow >
<my-avatar :src="selfInfo.faceURL" :desc="selfInfo.nickname" size="30" slot="footer" />
</uni-list-item>
<uni-list-item @click="updateNickname" title="姓名" :rightText="selfInfo.nickname" clickable showArrow />
<uni-list-item :loading="loadingState.gender" @click="updateGender" title="性别" :rightText="getGender" clickable showArrow />
<uni-list-item :loading="loadingState.birth" @click="() => (showDatePicker = true)" title="生日"
:rightText="getBirth" clickable showArrow />
</uni-list>
<view class="info_wrap">
<info-item :showArrow="false" title="手机号码" :content="selfInfo.mobile || '-'" />
<info-item :showArrow="false" title="邮箱" :content="selfInfo.email || '-'" />
</view>
<uni-list class="info_wrap">
<uni-list-item title="手机号码" :rightText="selfInfo.mobile || '-'"/>
<uni-list-item title="邮箱" :rightText="selfInfo.email || '-'" />
</uni-list>
<uni-list class="info_wrap">
<uni-list-item title="个性签名" @click="changeBio" clickable showArrow>
<u--text slot="footer" color="#999" :text="selfInfo.bio" :lines="2" wordWrap="anywhere"></u--text>
</uni-list-item>
</uni-list>
<u-datetime-picker :minDate="0" :maxDate="nowDate" :show="showDatePicker" @confirm="confirmDate"
@cancel="() => (showDatePicker = false)" v-model="selfInfo.birth" mode="date" />
@@ -169,10 +174,14 @@
},
confirmDate({value}) {
this.loadingState.birth = true;
console.log(this.$store.getters.storeSelfInfo.faceURL);
this.updateSelfInfo({birth: value,},"birth",);
this.showDatePicker = false;
},
changeBio(){
uni.navigateTo({
url: `/pages/user/selfInfo/change_bio`,
});
}
},
};
</script>