| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126 |
- <template>
- <view class="flex-common-css bgc-f">
- <Nav title="个人资料" titleColor="#333" bgckgroundBox='#fff'></Nav>
- <scroll-view :scroll-y="true" class="scroll-view-css">
- <view class="user-img-box">
- <image class="user-img" :src="userInfoData.head_img" mode=""></image>
- <image @click="goToUrl(0)" class="set-iimg" src="@/static/img/my/pen.png" mode=""></image>
- </view>
- <view class="item-info-box box-border-box">
- <view class="item-box mb-32 flex-justify-space box-border-box">
- <view class="item-left fs-32 fc-3">
- 昵称
- </view>
- <view class="item-right align-items-center" @click="goToUrl(1)">
- <view class="fc-9198A2 fs-28 mr-6">
- {{userInfoData.nickname||''}}
- </view>
- <uni-icons color="#9198A2" type="right" size="20"></uni-icons>
- </view>
- </view>
- <view class="item-box mb-32 flex-justify-space box-border-box">
- <view class="item-left fs-32 fc-3">
- 性别
- </view>
- <view class="item-right align-items-center" @click="goToUrl(2)">
- <view v-if="userInfoData.sex == 0" class="fc-9198A2 fs-28 mr-6">保密</view>
- <view v-else-if="userInfoData.sex == 1" class="fc-9198A2 fs-28 mr-6">男</view>
- <view v-else class="fc-9198A2 fs-28 mr-6">女</view>
- <uni-icons color="#9198A2" type="right" size="20"></uni-icons>
- </view>
- </view>
- <view class="item-box mb-32 flex-justify-space box-border-box">
- <view class="item-left fs-32 fc-3">
- 更换手机号
- </view>
- <view class="item-right align-items-center" @click="goToUrl(3)">
- <view class="fc-9198A2 fs-28 mr-6">
- {{userInfoData.phone}}
- </view>
- <uni-icons color="#9198A2" type="right" size="20"></uni-icons>
- </view>
- </view>
- </view>
- </scroll-view>
- </view>
- </template>
- <script>
- import {userInfo} from '@/api/member.js'
- import tools from '@/service/tools';
- export default {
- data() {
- return {
- userInfoData:{
- nickname:'',
- head_img:'',
- phone:'',
- sex:'',
- msg_count:'',
- },
- };
- },
- onShow() {
- this.getUserInfo();
- },
- methods: {
- getUserInfo(){
- userInfo().then((res)=>{
- if(res.code === 1){
- this.userInfoData = res.data;
- }
- })
- },
-
- goToUrl(type) {
- if (type === 1) {
- // 昵称
- uni.navigateTo({
- url: '/pages-my/set-user-name'
- })
- } else if (type === 2) {
- // 性别
- uni.navigateTo({
- url: '/pages-my/set-user-sex'
- })
- } else {
- // 更换手机号
- uni.navigateTo({
- url: '/pages-my/set-user-phone'
- })
- }
- },
- },
- }
- </script>
- <style lang="scss" scoped>
- .user-img-box {
- width: 144rpx;
- height: 144rpx;
- position: relative;
- margin: 98rpx auto 80rpx;
- }
- .user-img {
- width: 100%;
- height: 100%;
- }
- .set-iimg {
- position: absolute;
- right: 10rpx;
- bottom: 2rpx;
- width: 33rpx;
- height: 33rpx;
- }
- .item-info-box {
- padding: 0 0 0 32rpx;
- .item-box {
- padding: 0 32rpx 32rpx 0;
- border-bottom: 1rpx solid #EEEEEE;
- }
- }
- </style>
|