doum
14 小时以前 fc6c966c9491eeffc5d2c177cd8f8aa93f91186b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
<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>