<template>
|
<view class="box">
|
<view class="box-tx">
|
<view class="box-tx-image">
|
<image :src="form.imgFullUrl" mode="widthFix"></image>
|
</view>
|
<button open-type="chooseAvatar" @chooseavatar="getAvatar">更换头像</button>
|
</view>
|
<view class="list">
|
<view class="list-item">
|
<view class="list-item-label">昵称</view>
|
<view class="list-item-val">
|
<input type="nickname" v-model="form.nickname" placeholder="请输入" />
|
</view>
|
</view>
|
<view class="list-item">
|
<view class="list-item-label">真实姓名</view>
|
<view class="list-item-val">
|
<input type="text" v-model="form.name" placeholder="请输入" />
|
</view>
|
</view>
|
<view class="list-item">
|
<view class="list-item-label">绑定手机</view>
|
<view class="list-item-val" @click="show = true">
|
<text>{{form.phone}}</text>
|
<image src="/static/icon/ar_next@2x.png" mode="widthFix"></image>
|
</view>
|
</view>
|
<view class="list-item" @click="jumpAddr">
|
<view class="list-item-label">收货地址</view>
|
<view class="list-item-val">
|
<image src="/static/icon/ar_next@2x.png" mode="widthFix"></image>
|
</view>
|
</view>
|
<view class="list-item">
|
<view class="list-item-label">协议与说明</view>
|
<view class="list-item-val">
|
<image src="/static/icon/ar_next@2x.png" mode="widthFix"></image>
|
</view>
|
</view>
|
</view>
|
<view class="loginOut">退出登录</view>
|
<!-- 更换手机号 -->
|
<u-popup :show="show" round="15" :safeAreaInsetBottom="false" mode="center">
|
<view class="tc">
|
<view class="tc-contemt">
|
<view class="tc-contemt-title">更换绑定手机号?</view>
|
<view class="tc-contemt-nr">
|
更换后现手机号130****9696将不能用于登录,180天内只可更换一次
|
</view>
|
</view>
|
<view class="tc-btn">
|
<view class="tc-btn-item" @click="show = false">我再想想</view>
|
<view class="tc-btn-item" style="color: #004096;">确认更换</view>
|
</view>
|
</view>
|
</u-popup>
|
</view>
|
</template>
|
|
<script>
|
import { mapState } from 'vuex'
|
export default {
|
computed: {
|
...mapState(['userInfo'])
|
},
|
data() {
|
return {
|
show: false,
|
form: {
|
nickname: '',
|
name: '',
|
phone: '',
|
imgFullUrl: '',
|
imgurl: ''
|
}
|
};
|
},
|
onLoad() {
|
this.form.nickname = this.userInfo.nickname
|
this.form.name = this.userInfo.name
|
this.form.phone = this.userInfo.phone
|
this.form.imgFullUrl = this.userInfo.imgFullUrl
|
this.form.imgurl = this.userInfo.imgurl
|
},
|
methods: {
|
getAvatar(e) {
|
console.log(e)
|
},
|
}
|
}
|
</script>
|
|
<style lang="scss" scoped>
|
.box {
|
width: 100%;
|
padding-top: 40rpx;
|
box-sizing: border-box;
|
.tc {
|
width: calc(100vw - 148rpx);
|
.tc-btn {
|
width: 100%;
|
height: 102rpx;
|
display: flex;
|
align-items: center;
|
justify-content: space-between;
|
border-top: 1rpx solid #EEEEEE;
|
.tc-btn-item {
|
flex: 1;
|
height: 100%;
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
font-weight: 400;
|
font-size: 32rpx;
|
color: #666666;
|
border-right: 1rpx solid #EEEEEE;
|
&:last-child {
|
border: none !important;
|
}
|
}
|
}
|
.tc-contemt {
|
width: 100%;
|
padding: 40rpx 0;
|
box-sizing: border-box;
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
flex-direction: column;
|
.tc-contemt-title {
|
width: 100%;
|
text-align: center;
|
font-weight: 600;
|
font-size: 32rpx;
|
color: #111111;
|
}
|
.tc-contemt-nr {
|
width: 472rpx;
|
text-align: center;
|
font-weight: 400;
|
font-size: 28rpx;
|
color: #333333;
|
margin-top: 40rpx;
|
}
|
}
|
}
|
.loginOut {
|
position: fixed;
|
left: 50%;
|
bottom: calc(40rpx + env(safe-area-inset-bottom));
|
transform: translate(-50%, 0);
|
width: 200rpx;
|
height: 72rpx;
|
line-height: 72rpx;
|
text-align: center;
|
border-radius: 36rpx;
|
font-weight: 400;
|
font-size: 28rpx;
|
color: #333333;
|
border: 1rpx solid #999999;
|
}
|
.box-tx {
|
width: 100%;
|
display: flex;
|
align-items: center;
|
flex-direction: column;
|
justify-content: center;
|
.box-tx-image {
|
width: 160rpx;
|
height: 160rpx;
|
border-radius: 50%;
|
overflow: hidden;
|
image {
|
width: 100%;
|
}
|
}
|
button {
|
width: 136rpx;
|
padding: 0;
|
height: 48rpx;
|
line-height: 48rpx;
|
text-align: center;
|
border-radius: 32rpx;
|
border: 1rpx solid #004096;
|
font-weight: 400;
|
font-size: 24rpx;
|
color: #004096;
|
margin-top: 24rpx;
|
}
|
}
|
.list {
|
width: 100%;
|
padding: 0 30rpx;
|
box-sizing: border-box;
|
display: flex;
|
flex-direction: column;
|
margin-top: 60rpx;
|
.list-item {
|
width: 100%;
|
height: 98rpx;
|
display: flex;
|
align-items: center;
|
justify-content: space-between;
|
border-bottom: 1rpx solid #E5E5E5;
|
.list-item-label {
|
flex-shrink: 0;
|
font-weight: 400;
|
font-size: 30rpx;
|
color: #111111;
|
width: 200rpx;
|
}
|
.list-item-val {
|
flex: 1;
|
display: flex;
|
align-items: center;
|
justify-content: flex-end;
|
text {
|
font-weight: 400;
|
font-size: 28rpx;
|
color: #333333;
|
}
|
input {
|
width: 100%;
|
text-align: right;
|
font-weight: 400;
|
font-size: 28rpx;
|
color: #111111;
|
}
|
image {
|
width: 40rpx;
|
height: 40rpx;
|
}
|
}
|
}
|
}
|
}
|
</style>
|