Commit 1e7a1aa7 authored by 罗超's avatar 罗超

1

parent 5a0b338c
......@@ -78,8 +78,7 @@
</picker>
<!-- <u-icon style="flex-grow: 4;" name="arrow-right"></u-icon> -->
</view>
<view class="subpicker" v-if="item1.subType==3" @click="showabc">
<!-- @click="addressShow = true" -->
<view class="subpicker" v-if="item1.subType==3" @click="addressShow = true">
<Text :style="{'color':address!=''? '#303133':'#9D9C9B'}">{{address!=''? address :'请选择'}}</Text>
<pickerAddress v-model="addressShow" @confirm="addresspick" />
</view>
......@@ -101,9 +100,12 @@
</template>
<script>
import pickerAddress from '../address/liudx-pickerAddress/index.vue'
import AddressParse from '../address/zh-address-parse.min.js'
import pickerAddress from './liudx-pickerAddress/index.vue'
import AddressParse from './liudx-pickerAddress/zh-address-parse.min.js'
export default{
components:{
pickerAddress
},
data(){
return{
UserId:0,
......@@ -355,12 +357,17 @@
},
addresspick(obj) {
console.log(obj)
this.data.PName=obj.province.Name
this.data.Province=obj.province.ID
this.data.CName=obj.city.Name
this.data.City=obj.city.ID
this.data.DName=obj.area.Name
this.data.District=obj.area.ID
this.address=obj.province.Name+','+obj.city.Name+','+obj.area.Name
},
chooseImg(index,key) {
let that = this
uni.chooseImage({
count: 1, //默认9
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
......@@ -415,18 +422,7 @@
}else{
msg.Age=parseInt(msg.Age)
}
if(msg.nativePlace&&msg.nativePlace.length>0){
let newPlace=msg.nativePlace.split(",")
msg.PName=newPlace[0]
msg.CName=newPlace[1]
msg.DName=newPlace[2]
}
if(this.data.addCode&&this.data.addCode.length>0){
console.log(this.data.addCode)
msg.Province=parseInt(this.data.addCode[0])
msg.City=parseInt(this.data.addCode[1])
msg.District=parseInt(this.data.addCode[2])
}
delete msg.nativePlace
delete msg.addCode
......@@ -552,11 +548,6 @@
}
);
},
showabc(){
this.addressShow = true
console.log(1111,this.addressShow)
},
//获取个人资料
getInfo(){
this.request2(
......@@ -568,25 +559,19 @@
if(res.resultCode==1){
this.data=res.data
if(res.data.PName&&res.data.DName&&res.data.CName){
// this.data.nativePlace=[res.data.PName,res.data.DName,res.data.CName]
this.data.nativePlace=JSON.parse(JSON.stringify([res.data.PName,res.data.DName,res.data.CName])) .split(",")
}else{
this.data.nativePlace=""
}
this.data.addCode=""
if(res.data.Sex==1){
this.data.Sex="男"
}else if(res.data.Sex==2){
this.data.Sex="女"
this.address=res.data.PName+','+res.data.CName+','+res.data.DName
}else{
this.data.Sex=""
this.address=""
}
if(res.data.AlbumList){
res.data.AlbumList.map((item,index)=>{
this.AlbumListShow[`img${index+1}`]=true
})
}
if(this.data.AlbumList==null){
this.data.AlbumList=[]
}
}
......@@ -600,7 +585,10 @@
},
},
onLoad(options) {
this.UserId=options.UserId
if(options && options.UserId){
this.UserId=options.UserId;
this.getInfo();
}
},
created() {
this.mainColor = this.$uiConfig.mainColor;
......@@ -610,7 +598,6 @@
mounted() {
this.getEnumList();
this.getMarriage();
this.getInfo();
uni.getStorage({
key: 'basedata',
success: (res) =>{
......
......@@ -248,7 +248,7 @@
<view class="pd-title">其他资料</view>
<view class="pd-bubble">
<view class="bubble" v-if="dataList.HuKou">户口:{{dataList.HuKou}}</view>
<view class="bubble" v-if="dataList.PName&&dataList.CName&&dataList.DName">籍贯:{{dataList.PName,dataList.CName,dataList.DName}}</view>
<view class="bubble" v-if="dataList.PName&&dataList.CName&&dataList.DName">籍贯:{{dataList.PName}},{{dataList.CName}},{{dataList.DName}}</view>
<view class="bubble" v-if="dataList.SchoolInfo">学校:{{dataList.SchoolInfo}}</view>
<view class="bubble" v-if="dataList.EducationType">学历:{{dataList.EducationTypeStr}}</view>
<view class="bubble" v-if="dataList.Job">职位:{{dataList.Job}}</view>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment