|
@@ -12,7 +12,7 @@
|
|
|
</view>
|
|
|
<view class="one" @click="toCommon('/pagesMy/account/bindPhone')">
|
|
|
<view class="other">
|
|
|
- <view class="title">{{phone.name}} <text>已绑定{{phone.phone}}</text> </view>
|
|
|
+ <view class="title">{{phone.name}} <text>{{phone.phone?`已绑定${phone.phone}`:'未绑定'}}</text> </view>
|
|
|
<view class="titles">{{phone.content}}</view>
|
|
|
</view>
|
|
|
<view class="btn">
|
|
@@ -21,7 +21,7 @@
|
|
|
</view>
|
|
|
<view class="one" @click="toCommon('/pagesMy/account/bindEmail')">
|
|
|
<view class="other">
|
|
|
- <view class="title">{{email.name}}</view>
|
|
|
+ <view class="title">{{email.name}}<text>{{email.email?`已绑定${email.email}`:'未绑定'}}</text></view>
|
|
|
<view class="titles">{{email.content}}</view>
|
|
|
</view>
|
|
|
<view class="btn">
|
|
@@ -59,7 +59,8 @@
|
|
|
},
|
|
|
email: {
|
|
|
name: '绑定邮箱',
|
|
|
- content: '未绑定邮箱,请及时绑定'
|
|
|
+ content: '未绑定邮箱,请及时绑定',
|
|
|
+ email: ''
|
|
|
},
|
|
|
info: {
|
|
|
name: '修改个人信息',
|
|
@@ -82,15 +83,18 @@
|
|
|
if (user) {
|
|
|
const arr = await that.$api(`/user/${user.id}`, 'GET');
|
|
|
if (arr.errcode == '0') {
|
|
|
- if (arr.data && arr.data.phone) {
|
|
|
- var phone = arr.data.phone.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2');
|
|
|
+ let data=arr.data;
|
|
|
+ if (data && data.phone) {
|
|
|
+ var phone = data.phone.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2');
|
|
|
that.$set(that.phone, `phone`, phone)
|
|
|
}
|
|
|
+ if (data && data.email) {
|
|
|
+ that.$set(that.email, `email`, arr.data.email)
|
|
|
+ }
|
|
|
} else {
|
|
|
uni.showToast({
|
|
|
title: arr.errmsg,
|
|
|
- icon: 'error',
|
|
|
- duration: 2000
|
|
|
+ icon: 'none',
|
|
|
});
|
|
|
}
|
|
|
}
|