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

1

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