|
@@ -21,12 +21,19 @@
|
|
|
<span style="color: #aaaaaa" v-if="userinfo.name">{{ userinfo.name }}</span>
|
|
<span style="color: #aaaaaa" v-if="userinfo.name">{{ userinfo.name }}</span>
|
|
|
<span style="color: #aaaaaa" v-else>{{ $t('lang98') }}</span>
|
|
<span style="color: #aaaaaa" v-else>{{ $t('lang98') }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
- <div @click="showPopup(2)" class="li">
|
|
|
|
|
|
|
+ <div class="li">
|
|
|
<div class="li_left">
|
|
<div class="li_left">
|
|
|
- <span>{{ $t('lang100') }}</span>
|
|
|
|
|
|
|
+ <span>{{ $t('lang482') }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
<span style="color: #aaaaaa" v-if="userinfo.phone">{{ userinfo.phone }}</span>
|
|
<span style="color: #aaaaaa" v-if="userinfo.phone">{{ userinfo.phone }}</span>
|
|
|
- <span style="color: #aaaaaa" v-else>{{ $t('lang98') }}</span>
|
|
|
|
|
|
|
+ <span style="color: #aaaaaa" @click="showPopup(2)" v-else>{{ $t('lang98') }}</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="li">
|
|
|
|
|
+ <div class="li_left">
|
|
|
|
|
+ <span>{{ $t('lang483') }}</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <span style="color: #aaaaaa" v-if="userinfo.address">{{ userinfo.address.substring(0, 5)+"****"+userinfo.address.substring(userinfo.address.length-5, userinfo.address.length) }}</span>
|
|
|
|
|
+ <span style="color: #aaaaaa" @click="showPopup(4)" v-else>{{ $t('lang98') }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
<div @click="showPopup(3)" class="li">
|
|
<div @click="showPopup(3)" class="li">
|
|
|
<div class="li_left">
|
|
<div class="li_left">
|
|
@@ -65,17 +72,19 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <van-popup v-model="editShow" round style="width: 80%" :close-on-click-overlay="true" @close="editShow = false">
|
|
|
|
|
|
|
+ <van-popup v-model="editShow" round style="width: 80%" :close-on-click-overlay="true" @close="handleColse">
|
|
|
<div class="bind_box">
|
|
<div class="bind_box">
|
|
|
- <van-icon name="cross" class="close" size="20" @click="editShow = false" />
|
|
|
|
|
|
|
+ <van-icon name="cross" class="close" size="20" @click="handleColse" />
|
|
|
<div class="title" v-if="editType == 0">{{ $t('lang105') }}</div>
|
|
<div class="title" v-if="editType == 0">{{ $t('lang105') }}</div>
|
|
|
<div class="title" v-if="editType == 1">{{ $t('lang106') }}</div>
|
|
<div class="title" v-if="editType == 1">{{ $t('lang106') }}</div>
|
|
|
<div class="title" v-if="editType == 2">{{ $t('lang107') }}</div>
|
|
<div class="title" v-if="editType == 2">{{ $t('lang107') }}</div>
|
|
|
<div class="title" v-if="editType == 3">{{ $t('lang231') }}</div>
|
|
<div class="title" v-if="editType == 3">{{ $t('lang231') }}</div>
|
|
|
|
|
+ <div class="title" v-if="editType == 4">{{ $t('lang483') }}</div>
|
|
|
<div class="address_field" v-if="editType != 3">
|
|
<div class="address_field" v-if="editType != 3">
|
|
|
<van-field v-model="inputValue" type="text" rows="1" autosize :placeholder="$t('lang108')" v-if="editType == 0" />
|
|
<van-field v-model="inputValue" type="text" rows="1" autosize :placeholder="$t('lang108')" v-if="editType == 0" />
|
|
|
<van-field v-model="inputValue" type="text" rows="1" autosize :placeholder="$t('lang109')" v-if="editType == 1" />
|
|
<van-field v-model="inputValue" type="text" rows="1" autosize :placeholder="$t('lang109')" v-if="editType == 1" />
|
|
|
<van-field v-model="inputValue" type="text" rows="1" autosize :placeholder="$t('lang110')" v-if="editType == 2" />
|
|
<van-field v-model="inputValue" type="text" rows="1" autosize :placeholder="$t('lang110')" v-if="editType == 2" />
|
|
|
|
|
+ <van-field v-model="inputValue" type="textarea" rows="2" autosize :placeholder="$t('lang484')" v-if="editType == 4" />
|
|
|
</div>
|
|
</div>
|
|
|
<div class="address_field" v-if="editType == 3">
|
|
<div class="address_field" v-if="editType == 3">
|
|
|
<div class="flex-row bt">
|
|
<div class="flex-row bt">
|
|
@@ -178,6 +187,10 @@ export default {
|
|
|
this.getUserInfo();
|
|
this.getUserInfo();
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ handleColse(){
|
|
|
|
|
+ this.editShow = false
|
|
|
|
|
+ this.inputValue = '';
|
|
|
|
|
+ },
|
|
|
editUserInfo() {
|
|
editUserInfo() {
|
|
|
if (this.editType == 0 && !this.inputValue) {
|
|
if (this.editType == 0 && !this.inputValue) {
|
|
|
return this.$toast(this.$t('lang169'));
|
|
return this.$toast(this.$t('lang169'));
|
|
@@ -187,6 +200,8 @@ export default {
|
|
|
return this.$toast(this.$t('lang171'));
|
|
return this.$toast(this.$t('lang171'));
|
|
|
} else if ((this.editType == 3 && !this.addressDetail) || (this.editType == 3 && !this.areaText)) {
|
|
} else if ((this.editType == 3 && !this.addressDetail) || (this.editType == 3 && !this.areaText)) {
|
|
|
return this.$toast(this.$t('lang238'));
|
|
return this.$toast(this.$t('lang238'));
|
|
|
|
|
+ } else if ((this.editType == 4 && !this.inputValue)) {
|
|
|
|
|
+ return this.$toast(this.$t('lang484'));
|
|
|
}
|
|
}
|
|
|
let params = {};
|
|
let params = {};
|
|
|
if (this.editType == 0) {
|
|
if (this.editType == 0) {
|
|
@@ -198,6 +213,8 @@ export default {
|
|
|
} else if (this.editType == 3) {
|
|
} else if (this.editType == 3) {
|
|
|
params.address = this.areaText.replace(/\//g, ' ') + ' ' + this.addressDetail;
|
|
params.address = this.areaText.replace(/\//g, ' ') + ' ' + this.addressDetail;
|
|
|
params.area_code = this.area_code;
|
|
params.area_code = this.area_code;
|
|
|
|
|
+ } else if (this.editType == 4) {
|
|
|
|
|
+ params.address = this.inputValue;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
homeApi.setUserInfo(params).then(res => {
|
|
homeApi.setUserInfo(params).then(res => {
|
|
@@ -209,6 +226,8 @@ export default {
|
|
|
this.area_code = '';
|
|
this.area_code = '';
|
|
|
this.getUserInfo();
|
|
this.getUserInfo();
|
|
|
Notify({ type: 'success', message: this.$t('lang172') });
|
|
Notify({ type: 'success', message: this.$t('lang172') });
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$toast(res.msg);
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|