Commit b4920b63 authored by 罗超's avatar 罗超

1

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