|
@@ -15,7 +15,7 @@
|
|
|
</view>
|
|
</view>
|
|
|
<view class="form">
|
|
<view class="form">
|
|
|
<u-form :model="form" ref="uForm">
|
|
<u-form :model="form" ref="uForm">
|
|
|
- <u-form-item label="姓名" prop="realname"><u-input :disabled="form.certified === 1" v-model="userInfo.realname" /></u-form-item>
|
|
|
|
|
|
|
+ <u-form-item label="姓名" prop="realname"><u-input :disabled="form.certified === 1" v-model="form.realname" /></u-form-item>
|
|
|
<u-form-item label="手机号码" prop="telphone" :label-width="auto"><u-input :disabled="form.certified === 1" v-model="form.telphone" /></u-form-item>
|
|
<u-form-item label="手机号码" prop="telphone" :label-width="auto"><u-input :disabled="form.certified === 1" v-model="form.telphone" /></u-form-item>
|
|
|
<u-form-item label="身份证号" prop="idCard" :label-width="auto"><u-input :disabled="form.certified === 1" v-model="form.idCard" /></u-form-item>
|
|
<u-form-item label="身份证号" prop="idCard" :label-width="auto"><u-input :disabled="form.certified === 1" v-model="form.idCard" /></u-form-item>
|
|
|
<u-form-item label="性别" prop="sex">
|
|
<u-form-item label="性别" prop="sex">
|
|
@@ -36,8 +36,8 @@
|
|
|
</pick-regions>
|
|
</pick-regions>
|
|
|
</u-form-item>
|
|
</u-form-item>
|
|
|
<u-form-item label="婚姻状况" prop="marry" :label-width="auto">
|
|
<u-form-item label="婚姻状况" prop="marry" :label-width="auto">
|
|
|
- <picker @change="bindPickerChangeMarry" :value="form.marry" :range="array_marry">
|
|
|
|
|
- <view class="picker">{{ array_marry[form.marry] }}</view>
|
|
|
|
|
|
|
+ <picker @change="bindPickerChangeMarry" :value="index_marry" :range="array_marry">
|
|
|
|
|
+ <view class="picker">{{ array_marry[index_marry] }}</view>
|
|
|
</picker>
|
|
</picker>
|
|
|
</u-form-item>
|
|
</u-form-item>
|
|
|
<u-form-item label="所在城市" :label-width="auto">
|
|
<u-form-item label="所在城市" :label-width="auto">
|
|
@@ -46,13 +46,14 @@
|
|
|
</pick-regions>
|
|
</pick-regions>
|
|
|
</u-form-item>
|
|
</u-form-item>
|
|
|
<u-form-item label="政治面貌" :label-width="auto" prop="politic">
|
|
<u-form-item label="政治面貌" :label-width="auto" prop="politic">
|
|
|
- <picker @change="bindPickerChangePolitic" :value="form.politic" :range="array_politic">
|
|
|
|
|
- <view class="picker">{{ array_politic[form.politic] }}</view>
|
|
|
|
|
|
|
+ <picker @change="bindPickerChangePolitic" :value="index_politic" :range="array_politic">
|
|
|
|
|
+ <view class="picker">{{ array_politic[index_politic] }}</view>
|
|
|
</picker>
|
|
</picker>
|
|
|
</u-form-item>
|
|
</u-form-item>
|
|
|
<u-form-item label="一寸头像" prop="fileList" :label-width="auto" label-position="top">
|
|
<u-form-item label="一寸头像" prop="fileList" :label-width="auto" label-position="top">
|
|
|
<u-upload
|
|
<u-upload
|
|
|
:auto-upload="false"
|
|
:auto-upload="false"
|
|
|
|
|
+ :show-progress="false"
|
|
|
custom-btn="true"
|
|
custom-btn="true"
|
|
|
:action="action"
|
|
:action="action"
|
|
|
:file-list="fileList"
|
|
:file-list="fileList"
|
|
@@ -108,7 +109,6 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
-import {mapGetters} from 'vuex';
|
|
|
|
|
export default {
|
|
export default {
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
@@ -118,13 +118,7 @@ export default {
|
|
|
fileList: [],
|
|
fileList: [],
|
|
|
defaultRegionCode: '440112',
|
|
defaultRegionCode: '440112',
|
|
|
form: {
|
|
form: {
|
|
|
- realname: '',
|
|
|
|
|
- telphone: '',
|
|
|
|
|
- idCard: '',
|
|
|
|
|
- email: '',
|
|
|
|
|
sex: 0,
|
|
sex: 0,
|
|
|
- marry: 0,
|
|
|
|
|
- politic: 0,
|
|
|
|
|
userBirth: '1990-01-01',
|
|
userBirth: '1990-01-01',
|
|
|
houseProvince: '', //户籍省
|
|
houseProvince: '', //户籍省
|
|
|
houseCity: '', //户籍市
|
|
houseCity: '', //户籍市
|
|
@@ -132,20 +126,19 @@ export default {
|
|
|
province: '', //城市省
|
|
province: '', //城市省
|
|
|
city: '', //市
|
|
city: '', //市
|
|
|
district: '', //区
|
|
district: '', //区
|
|
|
- // region1: ['广东省', '广州市', '天河区'],
|
|
|
|
|
- // region2: ['广东省', '广州市', '天河区'],
|
|
|
|
|
oneInchPhotos: ''
|
|
oneInchPhotos: ''
|
|
|
},
|
|
},
|
|
|
- // index_sex: 0,
|
|
|
|
|
array_sex: ['男', '女'],
|
|
array_sex: ['男', '女'],
|
|
|
- array_marry: ['未婚', '已婚'],
|
|
|
|
|
- array_politic: ['群众', '团员', '党员'],
|
|
|
|
|
|
|
+ index_marry: 0,
|
|
|
|
|
+ array_marry: [],
|
|
|
|
|
+ index_politic: 0,
|
|
|
|
|
+ array_politic: [],
|
|
|
rules: {
|
|
rules: {
|
|
|
realname: [
|
|
realname: [
|
|
|
{
|
|
{
|
|
|
required: true,
|
|
required: true,
|
|
|
message: '请输入姓名',
|
|
message: '请输入姓名',
|
|
|
- trigger: ['blur', 'change']
|
|
|
|
|
|
|
+ trigger: 'blur'
|
|
|
}
|
|
}
|
|
|
],
|
|
],
|
|
|
telphone: [
|
|
telphone: [
|
|
@@ -189,17 +182,30 @@ export default {
|
|
|
if(this.form.district === ''){
|
|
if(this.form.district === ''){
|
|
|
this.form.district = '天河区'
|
|
this.form.district = '天河区'
|
|
|
}
|
|
}
|
|
|
|
|
+ if(this.form.marry !== null && this.form.marry != 'undefined' && this.form.marry !== ''){
|
|
|
|
|
+ this.index_marry = this.array_marry.indexOf(this.form.marry)
|
|
|
|
|
+ }
|
|
|
|
|
+ if(this.form.politic !== null && this.form.politic != 'undefined' && this.form.politic !== ''){
|
|
|
|
|
+ this.index_politic = this.array_politic.indexOf(this.form.politic)
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
onLoad(option) {
|
|
onLoad(option) {
|
|
|
|
|
+ this.getUserInfos()
|
|
|
const Verify = require('@/wxcomponents/verify_mpsdk/main.js');
|
|
const Verify = require('@/wxcomponents/verify_mpsdk/main.js');
|
|
|
Verify.init();
|
|
Verify.init();
|
|
|
|
|
+ this.array_marry = this.$store.state.dictObj['marry_status']
|
|
|
|
|
+ this.array_politic = this.$store.state.dictObj['politic_status']
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- // getUserInfos() {
|
|
|
|
|
- // this.$api.getInfo().then(res => {
|
|
|
|
|
- // this.form = res.data.data;
|
|
|
|
|
- // });
|
|
|
|
|
- // },
|
|
|
|
|
|
|
+ getUserInfos(){
|
|
|
|
|
+ var self = this
|
|
|
|
|
+ this.$api.getInfo().then(res => {
|
|
|
|
|
+ this.form = res.data.data
|
|
|
|
|
+ if (this.form.HeadImageUrl !== null) {
|
|
|
|
|
+ self.fileList = [{ url: self.$method.splitImgHost(self.form.oneInchPhotos) }];
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
changePhotoListHeader(lists, name) {
|
|
changePhotoListHeader(lists, name) {
|
|
|
this.fileList = lists;
|
|
this.fileList = lists;
|
|
|
},
|
|
},
|
|
@@ -225,7 +231,7 @@ export default {
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
self.$api.facecertification(self.BizToken).then(faceRec => {
|
|
self.$api.facecertification(self.BizToken).then(faceRec => {
|
|
|
//刷新用户信息
|
|
//刷新用户信息
|
|
|
- self.$api.refreshUserInfo()
|
|
|
|
|
|
|
+ self.getUserInfos()
|
|
|
});
|
|
});
|
|
|
}, 500);
|
|
}, 500);
|
|
|
},
|
|
},
|
|
@@ -287,8 +293,8 @@ export default {
|
|
|
sex: this.form.sex, //性别
|
|
sex: this.form.sex, //性别
|
|
|
telphone: this.form.telphone, //手机号
|
|
telphone: this.form.telphone, //手机号
|
|
|
userBirth: this.form.userBirth, //出生日期
|
|
userBirth: this.form.userBirth, //出生日期
|
|
|
- marry: this.form.marry, //结婚状态
|
|
|
|
|
- politic: this.form.politic, //政治面貌
|
|
|
|
|
|
|
+ marry: this.array_marry[this.form.marry], //结婚状态
|
|
|
|
|
+ politic: this.array_politic[this.form.politic], //政治面貌
|
|
|
oneInchPhotos: this.form.oneInchPhotos //一寸照
|
|
oneInchPhotos: this.form.oneInchPhotos //一寸照
|
|
|
};
|
|
};
|
|
|
this.$api.appuserInfo(data).then(res => {
|
|
this.$api.appuserInfo(data).then(res => {
|
|
@@ -356,6 +362,7 @@ export default {
|
|
|
this.form.politic = e.detail.value;
|
|
this.form.politic = e.detail.value;
|
|
|
},
|
|
},
|
|
|
bindPickerChangeMarry(e) {
|
|
bindPickerChangeMarry(e) {
|
|
|
|
|
+ console.log(e)
|
|
|
this.form.marry = e.detail.value;
|
|
this.form.marry = e.detail.value;
|
|
|
},
|
|
},
|
|
|
//城市
|
|
//城市
|
|
@@ -378,17 +385,12 @@ export default {
|
|
|
// var month = this.userBirth.substr(5, 2);
|
|
// var month = this.userBirth.substr(5, 2);
|
|
|
// var day = this.userBirth.substr(8, 2);
|
|
// var day = this.userBirth.substr(8, 2);
|
|
|
},
|
|
},
|
|
|
|
|
+
|
|
|
actionSheetCallback(index) {
|
|
actionSheetCallback(index) {
|
|
|
uni.hideKeyboard();
|
|
uni.hideKeyboard();
|
|
|
this.form.sex_text = this.actionSheetList[index].text;
|
|
this.form.sex_text = this.actionSheetList[index].text;
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- computed: {...mapGetters(['userInfo'])},
|
|
|
|
|
- watch:{
|
|
|
|
|
- userInfo(val, oldVal){
|
|
|
|
|
- this.form = val
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|