1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162 |
- <template>
- <view>
- <u-navbar back-text="编辑资料"></u-navbar>
- <view class="edit-head">
- <u-avatar :src="personal_info.faceImage" size="160" :show-level="true" level-icon="edit-pen-fill" level-bg-color ="#4E8DF6" @click="uploadPhoto"></u-avatar>
- </view>
-
- <view class="edit-form">
- <u-form :model="form" ref="uForm" label-width ="160">
- <u-form-item label="姓名"><u-input :disabled='true' v-model="personal_info.realName" input-align="right" placeholder="周扬青"/></u-form-item>
- <u-form-item label="身份证号"><u-input :disabled='true' v-model="idCard" input-align="right" placeholder="42100***************111"/></u-form-item>
- <u-form-item label="手机号"><u-input :disabled='true' v-model="personal_info.phone" input-align="right" placeholder="1380****9999"/></u-form-item>
- <u-form-item label="性别"><u-input :disabled='true' v-model="form.sex" input-align="right" placeholder="男"/></u-form-item>
- <u-form-item label="年龄"><u-input :disabled='true' v-model="personal_info.age" input-align="right" placeholder="31岁"/></u-form-item>
- <u-form-item label="身高">
- <u-input v-model="form.height" input-align="right" placeholder="172cm" type="select" @click="show_height = true" />
- <u-select v-model="show_height" mode="single-column" :list="height_ranges" @confirm="heightConfirm"></u-select>
- </u-form-item>
- <u-form-item label="体重">
- <u-input v-model="form.weight" input-align="right" placeholder="75kg" type="select" @click="show_weight = true"/>
- <u-select v-model="show_weight" mode="single-column" :list="weight_ranges" @confirm="weightConfirm"></u-select>
- </u-form-item>
-
- <view class="edit-line"></view>
-
- <u-form-item label="出身地"><u-input v-model="personal_info.birthplaceN" input-align="right" placeholder="荆州市沙市区" type="select" @click='birthdayAddressChange'/></u-form-item>
- <u-form-item label="户口所在地"><u-input v-model="personal_info.registeredResidenceN" input-align="right" placeholder="荆州市沙市区" type="select" @click='registeredResidenceAddressChange'/></u-form-item>
- <u-form-item label="工作所在地"><u-input v-model="personal_info.workplaceN" input-align="right" placeholder="荆州市沙市区" type="select" @click='workAddressChange'/></u-form-item>
-
- <view class="edit-line"></view>
-
-
-
- <u-form-item label="学历" >
- <u-input v-model="personal_info.educationN" input-align="right" placeholder="大学本科" type="select" @click="show_education = true"/>
- <u-select v-model="show_education" mode="single-column" :list="base_dictionary.xlList" @confirm="educationConfirm"></u-select>
- </u-form-item>
- <u-form-item label="行业" >
- <u-input v-model="personal_info.industryN" input-align="right" placeholder="IT/互联网" type="select" @click="show_profession = true"/></u-form-item>
- <u-select v-model="show_profession" mode="single-column" :list="base_dictionary.hyList" @confirm="professionConfirm"></u-select>
- <u-form-item label="工作单位">
- <u-input v-model="personal_info.workUnit" input-align="right" placeholder="湖北荆鹏软件开发有限公司" /></u-form-item>
- <u-form-item label="岗位">
- <u-input v-model="personal_info.post" input-align="right" placeholder="软件工程师" /></u-form-item>
-
- <view class="edit-line"></view>
-
- <u-form-item label="月薪" >
- <u-input v-model="personal_info.salaryRangeN" input-align="right" placeholder="请选择" type="select" @click="show_salary = true" />
- <u-select v-model="show_salary" mode="single-column" :list="base_dictionary.yxList" @confirm="salaryConfirm"></u-select>
- </u-form-item>
- <u-form-item label="住房状况">
- <u-input v-model="personal_info.housingSituationN" input-align="right" placeholder="请选择" type="select" @click="show_house = true"/>
- <u-select v-model="show_house" mode="single-column" :list="base_dictionary.zfqkList" @confirm="houseConfirm"></u-select>
- </u-form-item>
- <u-form-item label="婚姻状况">
- <u-input v-model="personal_info.maritalStatusN" input-align="right" placeholder="未婚" type="select" @click="show_marriage = true"/>
- <u-select v-model="show_marriage" mode="single-column" :list="base_dictionary.hyqkList" @confirm="marriageConfirm"></u-select>
- </u-form-item>
- <u-form-item label="子女状况" >
- <u-input v-model="personal_info.childStatusN" input-align="right" placeholder="无" type="select" @click="show_children = true"/>
- <u-select v-model="show_children" mode="single-column" :list="base_dictionary.znqkList" @confirm="childrenConfirm"></u-select>
- </u-form-item>
-
- <view class="edit-line"></view>
- <view class="edit-row">
- <p>兴趣爱好</p>
- <view class="edit-label">
- <span v-for="(item,index) in base_dictionary.hobbyInfoList" :key="index" :class="item.isMemberSelect ? 'active' : ''" @tap="selectInterest(index)">
- {{item.name}}
- </span>
- <!--
- <span class="active">摄影</span>
- <span>烹饪</span>
- <span>健身</span>
- <span>打游戏</span>
- <span>摄影</span>
- <span>烹饪</span>
- <span>健身</span>
- <span>打游戏</span>-->
- </view>
- </view>
-
- <view class="edit-line"></view>
-
- <view class="edit-row" @click="editSelfEvaluation">
- <view class="u-flex u-row-between " >
- <p>自我评价</p>
- <u-icon custom-prefix="custom-icon" name="youjiantou"></u-icon>
- </view>
- <view class="edit-text">
- {{personal_info.selfEvaluation}}
- </view>
- </view>
- <view class="edit-title">择偶标准</view>
-
- <u-form-item label="年龄范围" >
- <u-input v-model="personal_info.taAgeRangeN" input-align="right" placeholder="20~35" type="select" @click="show_ta_age_ranges = true"/>
- <u-select v-model="show_ta_age_ranges" mode="single-column" :list="base_dictionary.nlfwList" @confirm="taAgeRangeConfirm"></u-select>
- </u-form-item>
-
- <u-form-item label="月薪" >
- <u-input v-model="personal_info.taIncomeRangeN" input-align="right" placeholder="不限" type="select" @click="show_ta_salary = true"/>
- <u-select v-model="show_ta_salary" mode="single-column" :list="base_dictionary.yxList" @confirm="taSalaryRangeConfirm"></u-select>
- </u-form-item>
- <u-form-item label="学历" >
- <u-input v-model="personal_info.taEduN" input-align="right" placeholder="不限" type="select" @click="show_ta_education = true"/>
- <u-select v-model="show_ta_education" mode="single-column" :list="base_dictionary.xlList" @confirm="taEducationConfirm"></u-select>
- </u-form-item>
- <u-form-item label="职业">
- <u-input v-model="personal_info.taOccupation" input-align="right" placeholder="不限" /></u-form-item>
- <u-form-item label="所在地">
- <u-input v-model="personal_info.taWorkplaceN" input-align="right" placeholder="请选择" type="select" @click='taWorkAddressChange'/></u-form-item>
- <u-form-item label="其他要求">
- <u-input v-model="personal_info.taOther" input-align="right" placeholder="请选择" /></u-form-item>
- </u-form>
- </view>
-
-
- <view class="personal-btn">
- <u-button type="error" shape="circle" :custom-style="customStyle" @click="formsubmit">
- <span>保存</span>
- </u-button>
- </view>
- <view>
- <!--
- <u-popup :show="showSelfEvaluation" mode="bottom" @close="close" @open="open">
- <view>
- <text>人生若只如初见,何事秋风悲画扇</text>
- </view>
- </u-popup>-->
- <u-popup border-radius="20" v-model="showSelfEvaluation" @close="close" mode="bottom" length="90%" height="570rpx">
- <view style="display: flex; flex-direction: column;">
- <view style="display:flex;flex-direction:row;margin-top: 50rpx;justify-content: space-between; ">
- <view style="margin-left: 50rpx;font-weight: bold!important; font-size:30rpx;margin-bottom: 20rpx;">自我评价</view>
- <view style="font-color:#E5E7EA;margin-right: 50rpx;">{{selfEvaluation.length}}/200</view>
- </view>
- <view style="uni-textarea; margin-left: 50rpx;margin-right: 50rpx;margin-bottom: 20rpx;">
- <textarea style="padding-top: 10rpx;padding-bottom: 10rpx; border-radius:30rpx;padding-left: 20rpx;padding-right: 20rpx; background-color: #E5E7EA;overflow: auto;" :adjust-position="false" placeholder="请填写内容" maxlength="200" name="summary" v-model="selfEvaluation">
-
- </textarea>
- </view>
- <view>
- <button style="border-radius:100rpx;background-color: #FF5E5E;width:75%;color:#FFFFFF" @click="saveSelfEvaluation">保存</button>
- </view>
- </view>
- </u-popup>
- </view>
-
- <mpvue-city-picker themeColor="#007AFF" ref="mpvuebirtydayCityPicker" :pickerValueDefault="cityPickerValueDefault" @onConfirm="onBirthdayCityConfirm"></mpvue-city-picker>
- <mpvue-city-picker themeColor="#007AFF" ref="mpvueRegisteredResidenceCityPicker" :pickerValueDefault="cityPickerValueDefault" @onConfirm="onResidenceRegisteredCityConfirm"></mpvue-city-picker>
- <mpvue-city-picker themeColor="#007AFF" ref="mpvueWorkCityPicker" :pickerValueDefault="cityPickerValueDefault" @onConfirm="onWorkCityConfirm"></mpvue-city-picker>
- <mpvue-city-picker themeColor="#007AFF" ref="mpvueTaWorkCityPicker" :pickerValueDefault="cityPickerValueDefault" @onConfirm="onTaWorkCityConfirm"></mpvue-city-picker>
- <!--
- <u-action-sheet
- :show="show_education"
- :actions="base_dictionary.xlList"
- title="请选择学历"
- description=""
- @close="show_education = false"
- @select="educationSelect"
- >
- </u-action-sheet>
- <u-action-sheet
- :show="show_salary"
- :actions="base_dictionary.yxList"
- title="请选择月薪"
- description=""
- @close="show_salary = false"
- @select="salarySelect"
- >
- </u-action-sheet>
- <u-action-sheet
- :show="show_profession"
- :actions="base_dictionary.hyList"
- title="请选择行业"
- description=""
- @close="show_profession = false"
- @select="professionSelect"
- >
- </u-action-sheet>
- <u-action-sheet
- :show="show_house"
- :actions="base_dictionary.zfqkList"
- title="请选择住房状况"
- description=""
- @close="show_house = false"
- @select="houseSelect"
- >
- </u-action-sheet>
- <u-action-sheet
- :show="show_marriage"
- :actions="base_dictionary.hyList"
- title="请选择婚姻状况"
- description=""
- @close="show_marriage = false"
- @select="marriageSelect"
- >
- </u-action-sheet>
- <u-action-sheet
- :show="show_children"
- :actions="base_dictionary.znqkList"
- title="请选择子女状况"
- description=""
- @close="show_children = false"
- @select="childrenSelect"
- >
- </u-action-sheet>
-
- <u-action-sheet
- :show="show_ta_age_ranges"
- :actions="base_dictionary.nlfwList"
- title="请选择年龄范围"
- description=""
- @close="show_ta_age_ranges = false"
- @select="taAgeRangeSelect"
- >
- </u-action-sheet>
- <u-action-sheet
- :show="show_ta_education"
- :actions="base_dictionary.xlList"
- title="请选择学历"
- description=""
- @close="show_ta_education = false"
- @select="taEducationSelect"
- >
- </u-action-sheet>
- <u-action-sheet
- :show="show_ta_salary"
- :actions="base_dictionary.nlfwList"
- title="请选择月薪"
- description="xxxxxxx"
- @close="show_ta_salary = false"
- @select="taSalarySelect"
- >
- </u-action-sheet>-->
- </view>
- </template>
- <script>
- import * as loginApi from '@/apis/login.js'
- import mpvueCityPicker from "../../pagesB/components/mpvue-citypicker/mpvueCityPicker.vue";
- import {provinceData,setCityData,getCityData} from '../../pagesB/components/mpvue-citypicker/city-data/province.js';
- let _self;
- export default {
- components:{
- mpvueCityPicker
- },
- data() {
- return {
-
- cityPickerValueDefault:[16,6,0],
- customStyle: {
- background: '#FF5E5E'
- },
- form: {
- name: '',
- sex: '',
- height:'',
- weight:'',
-
- address:'',
- registered_residence:'',
- work_address:'',
- work_corporation:'',
- work_post:'',
- education:'',
- profession:'',
- salary_range:'',
- house_status:'',
- marriage_status:'',
- children_status:'',
- self_assess:'',
-
- addressId:'',
- registered_residenceId:'',
- work_addressId:'',
- educationId:'',
- professionId:'',
- salary_rangeId:'',
- house_statusId:'',
- marriage_statusId:'',
- children_statusId:'',
- },
- selfEvaluation:'',
- personal_info:{
- faceImage:' /static/img/sexMan.png'
- },
- height_ranges:[],
- weight_ranges:[],
- showSelfEvaluation:false,
- show_height:false,
- show_weight:false,
-
- show_birthday_address:false,
- show_registered_residence:false,
- show_work_address:false,
- show_salary:false,
- show_profession:false,
- show_education:false,
- show_house:false,
- show_marriage:false,
- show_children:false,
- show_ta_age_ranges:false,
- show_ta_education:false,
- show_ta_salary:false,
- show_ta_work_address:false,
- base_dictionary:{
- zfqkList:[],
- yxList:[],
- znqkList:[],
- qyList:[],
- xlList:[],
- hyList:[],
- nlfwList:[],
- hyqkList:[],
- hobbyInfoList:[],
-
- }
- }
- methods: {
-
- }
- },
- computed:{
-
- idCard(){
- if(this.personal_info.idCard && this.personal_info.idCard.length>=15){
- let prefix = this.personal_info.idCard.substr(0,5);
- let suffix = this.personal_info.idCard.substr(this.personal_info.idCard.length-3,3);
- return prefix + '********'+ suffix;
- }
- return '42100********111'
- }
- },
- onLoad(){
- _self = this;
- //let personalInfoPlus = this.carhelp.getPersonInfoPlus();
- //console.log('personalInfoPlus'+JSON.stringify(personalInfoPlus))
- this.personal_info = this.carhelp.getPersonInfo();
- console.log('个人信息'+JSON.stringify(this.personal_info))
- let subject = {subject:''}
- loginApi.getBaseDictionary(subject).then(function(data){
- //console.log('基础字典'+JSON.stringify(data));
- let personal_info = _self.carhelp.getPersonInfo();
- if(data.data)
- {
- _self.base_dictionary = data.data;
- if(_self.base_dictionary.zfqkList){
-
- for(let i = 0;i< _self.base_dictionary.zfqkList.length;i++)
- {
- _self.base_dictionary.zfqkList[i].label = _self.base_dictionary.zfqkList[i].name;
- }
- if(_self.personal_info.housingSituation!=null && _self.personal_info.housingSituation<= _self.base_dictionary.zfqkList.length)
- {
- _self.personal_info.housingSituationN =_self.base_dictionary.zfqkList[_self.personal_info.housingSituation-1].label
- }
- }
-
- //console.log('住房情况'+JSON.stringify(_self.base_dictionary.zfqkList));
- if(_self.base_dictionary.yxList){
-
- for(let i = 0;i< _self.base_dictionary.yxList.length;i++)
- {
- _self.base_dictionary.yxList[i].label = _self.base_dictionary.yxList[i].name;
- }
- if(_self.personal_info.salaryRange!=null && _self.personal_info.salaryRange<= _self.base_dictionary.yxList.length)
- {
- _self.personal_info.salaryRangeN =_self.base_dictionary.yxList[_self.personal_info.salaryRange-1].label
- }
- if(_self.personal_info.taIncomeRange!=null && _self.personal_info.taIncomeRange<= _self.base_dictionary.yxList.length)
- {
- _self.personal_info.taIncomeRangeN =_self.base_dictionary.yxList[_self.personal_info.taIncomeRange-1].label
- }
- }
-
- //console.log('月薪情况'+JSON.stringify(_self.base_dictionary.yxList));
- if(_self.base_dictionary.znqkList){
-
- for(let i = 0;i< _self.base_dictionary.znqkList.length;i++)
- {
- _self.base_dictionary.znqkList[i].label = _self.base_dictionary.znqkList[i].name;
- }
- if(_self.personal_info.childStatus!=null && _self.personal_info.childStatus<= _self.base_dictionary.znqkList.length)
- {
- _self.personal_info.childStatusN =_self.base_dictionary.znqkList[_self.personal_info.childStatus-1].label
- }
- }
- //console.log('子女情况'+JSON.stringify(_self.base_dictionary.znqkList));
- /*
- if(_self.base_dictionary.qyList){
-
- for(let i = 0;i< _self.base_dictionary.qyList.length;i++)
- {
- _self.base_dictionary.qyList[i].label = _self.base_dictionary.qyList[i].name;
- }
- }
- console.log('区域'+JSON.stringify(_self.base_dictionary.qyList));
- */
- if(_self.base_dictionary.xlList){
-
- for(let i = 0;i< _self.base_dictionary.xlList.length;i++)
- {
- _self.base_dictionary.xlList[i].label = _self.base_dictionary.xlList[i].name;
- }
-
- //console.log('学历'+JSON.stringify(_self.base_dictionary.xlList.length))
- if(_self.personal_info.education!=null && _self.personal_info.education <= _self.base_dictionary.xlList.length)
- {
- //console.log('学历'+JSON.stringify(_self.personal_info.education))
- _self.personal_info.educationN =_self.base_dictionary.xlList[Number(_self.personal_info.education)-1].label
- }
- if(_self.personal_info.taEdu!=null && _self.personal_info.taEdu<= _self.base_dictionary.xlList.length)
- {
- _self.personal_info.taEduN =_self.base_dictionary.xlList[_self.personal_info.taEdu-1].label
- }
- }
- //console.log('学历情况'+JSON.stringify(_self.base_dictionary.xlList));
-
- if(_self.base_dictionary.hyList){
-
- for(let i = 0;i< _self.base_dictionary.hyList.length;i++)
- {
- _self.base_dictionary.hyList[i].label = _self.base_dictionary.hyList[i].name;
- }
- if(_self.personal_info.industry!=null && _self.personal_info.industry<= _self.base_dictionary.hyList.length)
- {
- _self.personal_info.industryN =_self.base_dictionary.hyList[_self.personal_info.industry-1].label
- }
-
- }
- // console.log('行业情况'+JSON.stringify(_self.base_dictionary.hyList));
- if(_self.base_dictionary.nlfwList){
-
- for(let i = 0;i< _self.base_dictionary.nlfwList.length;i++)
- {
- _self.base_dictionary.nlfwList[i].label = _self.base_dictionary.nlfwList[i].name;
- }
- if(_self.personal_info.taAgeRange!=null && _self.personal_info.taAgeRange<= _self.base_dictionary.nlfwList.length)
- {
- _self.personal_info.taAgeRangeN =_self.base_dictionary.nlfwList[_self.personal_info.taAgeRange-1].label
- }
- }
- //console.log('年龄范围'+JSON.stringify(_self.base_dictionary.nlfwList));
- if(_self.base_dictionary.hyqkList){
-
- for(let i = 0;i< _self.base_dictionary.hyqkList.length;i++)
- {
- _self.base_dictionary.hyqkList[i].label = _self.base_dictionary.hyqkList[i].name;
- }
- if(_self.personal_info.maritalStatus!=null && _self.personal_info.maritalStatus<= _self.base_dictionary.hyqkList.length)
- {
- _self.personal_info.maritalStatusN =_self.base_dictionary.hyqkList[_self.personal_info.maritalStatus-1].label
- }
- }
- //console.log('婚姻情况'+JSON.stringify(_self.base_dictionary.hyqkList));
- if(_self.base_dictionary.hobbyInfoList){
-
- for(let i = 0;i< _self.base_dictionary.hobbyInfoList.length;i++)
- {
- _self.base_dictionary.hobbyInfoList[i].isMemberSelect = false;
- _self.base_dictionary.hobbyInfoList[i].label = _self.base_dictionary.hobbyInfoList[i].name;
- if(_self.personal_info.hobby!=null){
- // console.log('hobby'+JSON.stringify(_self.personal_info.hobby))
- if(_self.personal_info.hobby.indexOf(_self.base_dictionary.hobbyInfoList[i].id)>=0)
- {
- _self.base_dictionary.hobbyInfoList[i].isMemberSelect = true;
- console.log('选中'+JSON.stringify(_self.base_dictionary.hobbyInfoList[i]))
- }
- }
- }
- }
- // console.log('兴趣爱好'+JSON.stringify(_self.base_dictionary.hobbyInfoList));
- if(_self.personal_info.birthplace!=null){
- _self.personal_info.birthplaceN = getCityData(Number(_self.personal_info.birthplace));
- // console.log('address'+JSON.stringify(_self.form.addressId))
- }
- if(_self.personal_info.registeredResidence!=null){
- _self.personal_info.registeredResidenceN = getCityData(Number(_self.personal_info.registeredResidence));
- }
- if(_self.personal_info.workplace!=null){
- _self.personal_info.workplaceN = getCityData(Number(_self.personal_info.workplace));
-
- }
- if(_self.personal_info.taWorkplace!=null){
- _self.personal_info.taWorkplaceN = getCityData(Number(_self.personal_info.taWorkplace));
-
- }
- }
- },function(err){
- console.log('获取基础字典错误'+JSON.stringify(err))
- })
-
- for(let i = 130;i<=220;i++)
- {
- let height_range = {value: i, label: i.toString()+"cm"};
- this.height_ranges.push(height_range);
- //this.height_ranges.push(i.toString());
- }
- for(let i = 20;i<=120;i++)
- {
- // this.weight_ranges.push(i.toString());
- let weight_range = {value:i, label:i.toString()+"kg"};
- this.weight_ranges.push(weight_range);
- }
- if(this.personal_info){
- this.form.sex = this.personal_info.gender?'男':'女'
- if(this.personal_info.height)
- {
- this.form.height = this.personal_info.height+'cm'
-
- }
- if(this.personal_info.weight)
- {
- this.form.weight = this.personal_info.weight+'kg'
-
- }
- }
-
- if(provinceData.length<=0){
- loginApi.getCityList().then(function(data){
- // console.log('获取城市成功'+JSON.stringify(data));
- if(data.result && data.data){
- setCityData(data.data);
- //_self.$refs.mpvuebirtydayCityPicker.setCityData(data.data);
- //console.log('province data '+JSON.stringify(provinceData))
- if(_self.personal_info.birthplace!=null){
- _self.personal_info.birthplaceN = getCityData(Number(_self.personal_info.birthplace));
- // console.log('address'+JSON.stringify(_self.form.addressId))
- }
- if(_self.personal_info.registeredResidence!=null){
- _self.personal_info.registeredResidenceN = getCityData(Number(_self.personal_info.registeredResidence));
- }
- if(_self.personal_info.workplace!=null){
- _self.personal_info.workplaceN = getCityData(Number(_self.personal_info.workplace));
-
- }
- if(_self.personal_info.taWorkplace!=null){
- _self.personal_info.taWorkplaceN = getCityData(Number(_self.personal_info.taWorkplace));
-
- }
- }
-
- },function(err){
- console.log('获取城市列表错误'+JSON.stringify(err))
- })
- }
-
-
- // console.log('个人信息'+JSON.stringify(this.personal_info))
- },
- methods:{
- saveSelfEvaluation(){
- this.showSelfEvaluation = false;
- this.personal_info.selfEvaluation = this.selfEvaluation;
- console.log('自我评价'+JSON.stringify(this.selfEvaluation))
- },
- editSelfEvaluation(){
- this.selfEvaluation = this.personal_info.selfEvaluation;
- this.showSelfEvaluation = true
-
- console.log('editSelfEvaluation')
- },
- open() {
- console.log('open');
- },
- close() {
- this.showSelfEvaluation = false
- console.log('close');
- },
- selectInterest(index){
- // let interest = this.interests;
- this.base_dictionary.hobbyInfoList[index].isMemberSelect = !this.base_dictionary.hobbyInfoList[index].isMemberSelect;
- console.log('item'+JSON.stringify(this.base_dictionary.hobbyInfoList[index]))
- },
- birthdayAddressChange(){
- this.$refs.mpvuebirtydayCityPicker.show()
- },
- registeredResidenceAddressChange(){
- this.$refs.mpvueRegisteredResidenceCityPicker.show()
- },
- workAddressChange(){
- this.$refs.mpvueWorkCityPicker.show()
- },
- taWorkAddressChange(){
- this.$refs.mpvueTaWorkCityPicker.show()
- },
- onBirthdayCityConfirm(e) {
- _self.personal_info.birthplaceN = e.label;
- _self.personal_info.birthplace = e.cityCode.toString();
- console.log('地址选择'+JSON.stringify(_self.form.addressId))
- },
- onResidenceRegisteredCityConfirm(e) {
- _self.personal_info.registeredResidenceN= e.label;
- _self.personal_info.registeredResidence = e.cityCode.toString();
- console.log('地址选择'+JSON.stringify(_self.form.registered_residenceId))
- },
- onWorkCityConfirm(e) {
- _self.personal_info.workplaceN = e.label;
- _self.personal_info.workplace = e.cityCode.toString();
- console.log('地址选择'+JSON.stringify(_self.form.work_addressId))
- },
- onTaWorkCityConfirm(e) {
- _self.personal_info.taWorkplaceN = e.label;
- _self.personal_info.taWorkplace = e.cityCode.toString();
- console.log('地址选择'+JSON.stringify(_self.form.work_addressId))
- },
- formsubmit(){
- let personal_info = {type:1,id:this.personal_info.id};
- let _personal_info = this.personal_info;
- if(_personal_info.faceImage)
- {
- personal_info.faceImage = _personal_info.faceImage;
- console.log('faceImage'+personal_info.faceImage)
- }
- personal_info.hobby = ''
- for(let i=0;i<_self.base_dictionary.hobbyInfoList.length;i++)
- {
- if(_self.base_dictionary.hobbyInfoList[i].isMemberSelect)
- {
- if(personal_info.hobby.length>0)
- {
- personal_info.hobby+=','
- }
- personal_info.hobby += _self.base_dictionary.hobbyInfoList[i].id;
- }
- }
- if(_personal_info.selfEvaluation)
- {
- personal_info.selfEvaluation = _personal_info.selfEvaluation;
- console.log('selfEvaluation'+personal_info.selfEvaluation);
- }
- if(_personal_info.weight)
- {
- personal_info.weight = _personal_info.weight;
- console.log('weight'+personal_info.weight)
- }
- if(_personal_info.height)
- {
- personal_info.height = _personal_info.height;
- console.log('height'+personal_info.height)
- }
- if(_personal_info.education)
- {
- personal_info.education = _personal_info.education;
- console.log('education'+personal_info.education)
- }
- /*
- if(_personal_info.educationN)
- {
- personal_info.educationN = _personal_info.educationN;
- console.log('education'+personal_info.educationN)
- } */
- if(_personal_info.workUnit)
- {
- personal_info.workUnit = _personal_info.workUnit;
- console.log('workUnit'+personal_info.workUnit)
- }
- if(_personal_info.post)
- {
- personal_info.post = _personal_info.post;
- console.log('post'+personal_info.post)
- }
-
- if(_personal_info.industry)
- {
- personal_info.industry = _personal_info.industry;
- console.log('industry'+personal_info.industry)
- }
- /*
- if(_personal_info.industryN)
- {
- personal_info.industryN = _personal_info.industryN;
- console.log('industryN'+personal_info.industryN)
- } */
- if(_personal_info.salaryRange)
- {
- personal_info.salaryRange = _personal_info.salaryRange;
- console.log('salaryRange'+personal_info.salaryRange)
- }
- /*
- if(_personal_info.salaryRangeN)
- {
- personal_info.salaryRangeN = _personal_info.salaryRangeN;
- console.log('salaryRangeN'+personal_info.salaryRangeN)
- } */
- if(_personal_info.housingSituation)
- {
- personal_info.housingSituation = _personal_info.housingSituation;
- console.log('housingSituation'+personal_info.housingSituation)
- }
- /*
- if(_personal_info.housingSituationN)
- {
- personal_info.housingSituationN = _personal_info.housingSituationN;
- console.log('housingSituationN'+personal_info.housingSituationN)
- } */
-
- if(_personal_info.maritalStatus)
- {
- personal_info.maritalStatus = _personal_info.maritalStatus;
- console.log('maritalStatus'+personal_info.maritalStatus)
- }
- /*
- if(_personal_info.maritalStatusN)
- {
- personal_info.maritalStatusN = _personal_info.maritalStatusN;
- console.log('maritalStatusN'+personal_info.maritalStatusN)
- } */
- if(_personal_info.childStatus)
- {
- personal_info.childStatus = _personal_info.childStatus;
- console.log('childStatus'+personal_info.childStatus)
- }
- /*
- if(_personal_info.childStatusN)
- {
- personal_info.childStatusN = _personal_info.childStatusN;
- console.log('childStatusN'+personal_info.childStatusN)
- } */
- if(_personal_info.taIncomeRange)
- {
- personal_info.taIncomeRange = _personal_info.taIncomeRange;
- console.log('taIncomeRange'+personal_info.taIncomeRange)
- }
- /*
- if(_personal_info.taIncomeRangeN)
- {
- personal_info.taIncomeRangeN = _personal_info.taIncomeRangeN;
- console.log('taIncomeRangeN'+personal_info.taIncomeRangeN)
- } */
- if(_personal_info.birthplace)
- {
- personal_info.birthplace = _personal_info.birthplace;
- console.log('birthplace'+personal_info.birthplace)
- }
- /*
- if(_personal_info.birthplaceN)
- {
- personal_info.birthplaceN = _personal_info.birthplaceN;
- console.log('birthplaceN'+personal_info.birthplaceN)
- } */
- if(_personal_info.registeredResidence)
- {
- personal_info.registeredResidence = _personal_info.registeredResidence;
- console.log('registeredResidence'+personal_info.registeredResidence)
- }
- /*
- if(_personal_info.registeredResidenceN)
- {
- personal_info.registeredResidenceN = _personal_info.registeredResidenceN;
- console.log('registeredResidenceN'+personal_info.registeredResidenceN)
- } */
- if(_personal_info.workplace)
- {
- personal_info.workplace = _personal_info.workplace;
- console.log('workplace'+personal_info.workplace)
- }
- /*
- if(_personal_info.workplaceN)
- {
- personal_info.workplaceN = _personal_info.workplaceN;
- console.log('workplaceN'+personal_info.workplaceN)
- } */
-
- if(_personal_info.taWorkplace)
- {
- personal_info.taWorkplace = _personal_info.taWorkplace;
- console.log('taWorkplace'+personal_info.taWorkplace)
- }
- /*
- if(_personal_info.taWorkplaceN)
- {
- personal_info.taWorkplaceN = _personal_info.taWorkplaceN;
- console.log('taWorkplaceN'+personal_info.taWorkplaceN)
- } */
- if(_personal_info.taAgeRange)
- {
- personal_info.taAgeRange = _personal_info.taAgeRange;
- console.log('taAgeRange'+personal_info.taAgeRange)
- }
- /*
- if(_personal_info.taAgeRangeN)
- {
- personal_info.taAgeRangeN = _personal_info.taAgeRangeN;
- console.log('taAgeRangeN'+personal_info.taAgeRangeN)
- } */
- if(_personal_info.taEdu)
- {
- personal_info.taEdu = _personal_info.taEdu;
- console.log('taEdu'+personal_info.taEdu)
- }
- /*
- if(_personal_info.taEduN)
- {
- personal_info.taEduN = _personal_info.taEduN;
- console.log('education'+personal_info.taEduN)
- } */
-
- if(_personal_info.taOccupation)
- {
- personal_info.taOccupation = _personal_info.taOccupation;
- console.log('taOccupation'+personal_info.taOccupation)
- }
- /*
- if(_personal_info.taOccupationN)
- {
- personal_info.taOccupationN = _personal_info.taOccupationN;
- console.log('education'+personal_info.taOccupationN)
- } */
- if(_personal_info.taOther)
- {
- personal_info.taOther = _personal_info.taOther;
- console.log('taOther'+personal_info.taOther)
- }
- /*
- if(_personal_info.taOccupationN)
- {
- personal_info.taOccupationN = _personal_info.taOccupationN;
- console.log('education'+personal_info.taOccupationN)
- } */
- console.log('xxxx')
-
- loginApi.save_personal_info(personal_info).then(function(data){
- console.log('保存成功'+JSON.stringify(data));
- if(data.result){
- if(data.data){
- _self.findByOpenId();
- uni.switchTab({
- url:'./index'
- })
-
- }
- }
- //_self.findByOpenId();
- /*uni.navigateTo({
- url:'../user/index'
- })*/
- },function(err){
- console.log('保存失败'+JSON.stringify(personal_info)+ JSON.stringify(err));
- });
- },
- updatePersonInfo(){
-
- },
- updatePersonPlusInfo(){
-
- },
- childrenConfirm(e){
- console.log('e'+JSON.stringify(e))
- this.personal_info.childStatusN = '';
- e.map((val, index) => {
- // this.result += this.result == '' ? val.label : '-' + val.label;
- let result = val.label
- _self.personal_info.childStatus = val.value;
- this.personal_info.childStatusN += result;
- })
- },
- marriageConfirm(e){
- console.log('e'+JSON.stringify(e))
- this.personal_info.maritalStatusN = '';
- e.map((val, index) => {
- // this.result += this.result == '' ? val.label : '-' + val.label;
- let result = val.label
- console.log('val'+JSON.stringify(val))
- _self.personal_info.maritalStatus =val.value;
- this.personal_info.maritalStatusN += result;
- })
- },
- houseConfirm(e){
- console.log('e'+JSON.stringify(e))
- this.personal_info.housingSituationN = '';
- e.map((val, index) => {
- // this.result += this.result == '' ? val.label : '-' + val.label;
- let result = val.label
- _self.personal_info.housingSituation = val.value;
- _self.personal_info.housingSituationN += result;
- })
- },
- educationConfirm(e){
- console.log('e'+JSON.stringify(e))
- this.personal_info.educationN = '';
- e.map((val, index) => {
- // this.result += this.result == '' ? val.label : '-' + val.label;
- let result = val.label
- _self.personal_info.education = val.value;
- _self.personal_info.educationN += result;
- })
- },
- professionConfirm(e){
- console.log('e'+JSON.stringify(e))
- this.personal_info.industryN = '';
- e.map((val, index) => {
- // this.result += this.result == '' ? val.label : '-' + val.label;
- let result = val.label
- _self.personal_info.industry = val.value;
- this.personal_info.industryN += result;
- })
- },
- salaryConfirm(e){
- console.log('e'+JSON.stringify(e))
- this.personal_info.salaryRangeN = '';
- e.map((val, index) => {
- // this.result += this.result == '' ? val.label : '-' + val.label;
- let result = val.label
- _self.personal_info.salaryRange = val.value;
- this.personal_info.salaryRangeN += result;
- })
- },
- taSalaryRangeConfirm(e){
- console.log('e111'+JSON.stringify(e))
- this.personal_info.taIncomeRangeN = '';
- e.map((val, index) => {
- // this.result += this.result == '' ? val.label : '-' + val.label;
- console.log('val'+val + 'index '+index)
- let result = val.label
- _self.personal_info.taIncomeRange = val.value;
- _self.personal_info.taIncomeRangeN += result;
- })
- },
- taAgeRangeConfirm(e){
- console.log('e'+JSON.stringify(e))
- this.personal_info.taAgeRangeN = '';
- e.map((val, index) => {
- console.log('val'+val + 'index '+index)
- // this.result += this.result == '' ? val.label : '-' + val.label;
- let result = val.label
- _self.personal_info.taAgeRange = val.value;
- _self.personal_info.taAgeRangeN += result;
- })
- },
- taEducationConfirm(e){
- console.log('e'+JSON.stringify(e))
- this.personal_info.taEduN = '';
- e.map((val, index) => {
- console.log('val'+val + 'index '+index)
- // this.result += this.result == '' ? val.label : '-' + val.label;
- let result = val.label
- _self.personal_info.taEdu = val.value;
- _self.personal_info.taEduN += result;
- })
- },
- /*
- educationSelect(e) {
- this.personal_info.education = e.value;
- this.personal_info.educationN = e.name;
- //this.$refs.uForm.validateField('personal_info.education')
- },
- salarySelect(e) {
- this.personal_info.salaryRange = e.value;
- this.personal_info.salaryRangeN = e.name;
- //this.$refs.uForm.validateField('personal_info.salaryRange')
- },
- professionSelect(e) {
- this.personal_info.industry = e.value;
- this.personal_info.industryN = e.name;
- //this.$refs.uForm.validateField('personal_info.industry')
- },
- houseSelect(e) {
- this.personal_info.housingSituation = e.value;
- this.personal_info.housingSituationN = e.name;
- //this.$refs.uForm.validateField('personal_info.housingSituation')
- },
- childrenSelect(e) {
- this.personal_info.childStatus = e.value;
- this.personal_info.childStatusN = e.name;
- //this.$refs.uForm.validateField('personal_info.childStatus')
- },
- marriageSelect(e) {
- this.personal_info.maritalStatus = e.value;
- this.personal_info.maritalStatusN = e.name;
- //this.$refs.uForm.validateField('personal_info.maritalStatus')
- },
- taAgeRangeSelect(e) {
- this.personal_info.taAgeRange = e.value;
- this.personal_info.taAgeRangeN = e.name;
- //this.$refs.uForm.validateField('personal_info.taAgeRange')
- },
- taEducationSelect(e) {
- this.personal_info.taEdu = e.value;
- this.personal_info.taEduN = e.name;
- //this.$refs.uForm.validateField('personal_info.taEdu')
- },
- taSalarySelect(e) {
- this.personal_info.taIncomeRange = e.value;
- this.personal_info.taIncomeRangeN = e.name;
- //this.$refs.uForm.validateField('personal_info.taIncomeRange')
- },*/
- heightConfirm(e){
- console.log('e'+JSON.stringify(e))
- this.form.height = '';
- e.map((val, index) => {
- // this.result += this.result == '' ? val.label : '-' + val.label;
- let result = val.label
- _self.personal_info.height = val.value
- this.form.height += result;
- })
- },
- weightConfirm(e){
- console.log('e'+JSON.stringify(e))
- this.form.weight = '';
- e.map((val, index) => {
- // this.result += this.result == '' ? val.label : '-' + val.label;
- let result = val.label
- _self.personal_info.weight = val.value;
- this.form.weight += result;
- })
- },
- uploadPhoto(){
- // 上传图片
- //const ctx = uni.createCanvasContext('myCanvas');
- //console.log('url'+this.uploadUrl)
- //console.log(this.carhelp.getToken())
- let _this = this;
- uni.chooseImage({
- count: 1, //默认9
- // sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
- sourceType: ['album','camera'], //从相册选择
- success:(res)=> {
- let imgFile = res.tempFilePaths;
- console.log(process.car.BASE_URL+"mobile/member/uploadBase64")
- console.log(imgFile)
- console.log(process.car.NODE_ENV)
-
- console.log()
- var token=this.carhelp.getToken()
- for(let i = 0;i < imgFile.length;i++)
- {
-
- wx.uploadFile({
- url:process.car.BASE_URL+"uploadPicture",
-
- // url:process.car.BASE_URL+"mobile/member/uploadBase64",
- name: 'photoFile',
- header: {
-
- // 'appId': process.car.VUE_APP_WXAPPID ,
-
- 'Authorization':token ,
-
- // 'openId': "wxa8954f417fa7c32f" ,
-
-
- 'accept': 'application/json',
- //#ifdef MP-WEIXIN
- "Content-Type": "multipart/form-data",//记得设置
- //#endif
-
- },
- filePath: imgFile[0],
- success: function(result) {
- let imgUrls = JSON.parse(result.data) //百度支持 this.site_url +'/' +
- //let image ={url: imgUrls.data};
- //_self.fileList.push(image); //微信
- _self.personal_info.faceImage = imgUrls.data;
- }
-
-
-
- })
-
-
- }
- },
- });
- },
- findByOpenId(){
- var openId=this.carhelp.getOpenId()
- if(openId==""){
- console.log("------------------")
- setTimeout(()=>{
- this.findByOpenId()
- },1000)
- return
- }
- uni.request({
- method:'get',
- url: process.car.BASE_URL + "/mobile/regUser/findByOpenId",
- data: {
- openId:openId,
- },
- header: {
- 'Content-Type': 'application/x-www-form-urlencoded',
- 'X-Requested-With': 'XMLHttpRequest',
- }
- }).then((response) => {
- // console.log('findByOpenId' +JSON.stringify(response))
- let [error, res] = response;
-
- if (res.data.code == 200&&res.data.result) {
- var token = res ? res.data.data.token : '';
- this.carhelp.setPersonInfo(res.data.data.memberInfo );
- this.carhelp.setToken(token);
- this.carhelp.setPersonInfoPlus(res.data.data);
-
-
- }
- }).catch(error => {
-
- })
- }
- }
- }
- </script>
- <style>
- page{
- background-color: #f4f0f0;
- }
- </style>
- <style lang="scss" scoped>
- .edit-text{
- margin-top: 10px;
- color:#999;
- }
- .edit-row{
- padding: 12px 0;
- .edit-label{
- display: flex;
- margin-top: 10px;
- flex-wrap: wrap;
- span{
- margin-right: 8px;
- background-color: #E5E7EA ;
- padding: 4px 10px;
- border-radius: 4px;
- font-size: 12px;
- margin-bottom: 10px;
- }
- .active{
- background-color: #FFC1BC;
- }
- }
- }
- .edit-line{
- height: 12px;
- background-color:#f4f0f0 ;
- margin-left: -15px;
- margin-right: -15px;
- }
- .edit-title{
- padding:12px 0;
- padding-left: 15px;
- background-color:#f4f0f0 ;
- margin-left: -15px;
- margin-right: -15px;
- }
- .edit-head{
- display: flex;
- padding: 20px 0;
- justify-content: center;
- }
- .personal-btn{
- padding: 15px 50px;
- }
- .edit-form{
- padding: 0 15px;
- background-color: #fff;
- }
- </style>
|