Commit b4920b63 authored by 罗超's avatar 罗超

1

parent f2a89817
<template>
<view class="page">
<view class="header">
<!-- <view class="header" style="padding-top: 44px;">
<view class="arrow" @click="redirectPrev">
<u-icon name="arrow-left" size="48" color="#111"></u-icon>
</view>
<text>
编辑个人主页
</text>
</view>
</view> -->
<view class="dataBox">
<view v-for="(item,index) in dataList" :key="index">
<view class="itemBox">
......@@ -96,7 +99,7 @@
data(){
return{
UserId:0,
pageTitle:"",
pageTitle:"编辑个人主页",
mainColor: "",
dataList:[{
name:"相册",
......@@ -109,7 +112,7 @@
//subType:1输入框,2选择框
childDataList:[{
name:"昵称",
field:"nickname",
field:"Name",
placehloder:"请填写昵称",
subType:1
},{
......@@ -278,7 +281,7 @@
],
photoDemo:"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/camera.png",//占位图片
data:{
nickname:"",
Name:"",
Sex:"",
Birthday:"",
Height:"",
......@@ -336,9 +339,9 @@
}else if(mode=="date"){
this.data[e]=arg.detail.value
}else if(mode=="region"){
this.data[e]=arg.detail.value
this.data.nativePlace=arg.detail.value
this.data.addCode=arg.detail.code
console.log(this.data.addCode)
console.log(this.data.nativePlace)
}
},
chooseImg(index,key) {
......@@ -513,11 +516,35 @@
},
res => {
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]
}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{
this.data.Sex=""
}
res.data.AlbumList.map((item,index)=>{
this.AlbumListShow[`img${index+1}`]=true
})
}
}
);
}
},
redirectPrev() {
uni.navigateBack({
delta: 1,
});
},
},
onLoad(options) {
this.UserId=options.UserId
......@@ -535,17 +562,22 @@
key: 'basedata',
success: (res) =>{
let data= res.data.user_info
this.data.nickname=data.nickname
this.data.Name=data.nickname
if(data.Sex==1){
this.data.Sex="男"
}else if(data.Sex==2){
this.data.Sex="女"
}else{
this.data.Sex=""
}
},
fail:(err)=> {
// console.log(err);
}
});
uni.setNavigationBarTitle({
title: this.pageTitle
});
}
}
</script>
......@@ -561,6 +593,13 @@
font-size: 32rpx;
font-weight: 800;
color: #111111;
position: relative;
.arrow{
position: absolute;
top: 50%;
transform: translateY(-50%);
left: 30rpx;
}
}
.dataBox{
.img2Box{
......
......@@ -423,8 +423,8 @@
},
goedit(){
uni.navigateTo({
// url: '/pages/blindDate/personal/editmaterial?UserId='+this.UserId
url: '/pages/blindDate/editData?UserId='+this.UserId
url: '/pages/blindDate/personal/editmaterial?UserId='+this.UserId
// url: '/pages/blindDate/editData?UserId='+this.UserId
});
},
dianjiguanzhu(x){//关注操作
......@@ -452,7 +452,8 @@
},
gorenz(){//去认证
uni.navigateTo({
url: '/pages/blindDate/basicdata'
// url: '/pages/blindDate/basicdata'
url: '/pages/blindDate/editData?UserId='+this.UserId
})
},
}
......
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