Commit 86ebf894 by xuebiao

个人资料展示

parent 88b46689
...@@ -48,17 +48,19 @@ ...@@ -48,17 +48,19 @@
:ske-h="66" :ske-h="66"
:ske-w="66" :ske-w="66"
:border-r="[50,50,50,50]" :border-r="[50,50,50,50]"
:src=userAvatar
> >
</yun-img> </yun-img>
<yun-icon <yun-icon
:style="{marginLeft:commonReturnFlexedLength(15)}" :style="{marginLeft:commonReturnFlexedLength(15)}"
name="left_arrow" name="left_arrow"
v-tap="dataChange"
></yun-icon> ></yun-icon>
</yun-div> </yun-div>
<!--修改信息弹出框--> <!--修改信息弹出框-->
<yun-dialog <yun-dialog
v-if="false" v-if="this.change"
title="添加备注" title="修改"
:value="true" :value="true"
:btns="slotDialog.btns" :btns="slotDialog.btns"
> >
...@@ -85,6 +87,7 @@ ...@@ -85,6 +87,7 @@
<script> <script>
import commonMixin from "./commonMixin"; import commonMixin from "./commonMixin";
import config from '../../action/config'
export default { export default {
mixins:[commonMixin], mixins:[commonMixin],
name: "dataCard", name: "dataCard",
...@@ -94,7 +97,32 @@ ...@@ -94,7 +97,32 @@
type:Number//1:字,2:头像,3:我的消息专用 type:Number//1:字,2:头像,3:我的消息专用
}, },
title:String, title:String,
right:String right:String,
userAvatar:String
},
data(){
return{
change:false,
slotDialog: {
open: true,
btns: [
{
text: '取消',
},
{
text: '确认',
handler: this.dataPostRemarks,
},
],
},
}
},
methods:{
dataChange(){
this.change=true;
}
} }
} }
......
...@@ -6,34 +6,34 @@ ...@@ -6,34 +6,34 @@
:margin-v="[0,'auto']" :margin-v="[0,'auto']"
:border-v="[1,'solid','#EFEFEF','bottom']"></yun-div> :border-v="[1,'solid','#EFEFEF','bottom']"></yun-div>
<yun-div> <yun-div>
<user-info :cardType="2" title="头像"></user-info> <user-info :cardType="2" title="头像" :user-avatar=userAvatar></user-info>
<user-info title="昵称" right="GodLike"></user-info> <user-info title="昵称" :right=nickName></user-info>
<user-info title="性别" right="男"></user-info> <user-info title="性别" :right=gender></user-info>
<user-info title="生日"></user-info> <user-info title="生日" :right=birthday></user-info>
</yun-div> </yun-div>
<yun-div <yun-div
:margin-v="[15,0,15,0]" :margin-v="[15,0,15,0]"
> >
<user-info title="签名" right="武汉加油"></user-info> <user-info title="签名" :right=signature></user-info>
</yun-div> </yun-div>
<yun-div> <yun-div>
<user-info title="微信"></user-info> <user-info title="微信" :right=wxNumber></user-info>
<user-info title="QQ号" right="1032945421"></user-info> <user-info title="QQ号" :right=qqNumber></user-info>
<user-info title="手机号"></user-info> <user-info title="手机号" :right=mobile></user-info>
</yun-div> </yun-div>
<yun-div <yun-div
:margin-v="[15,0,0,0]" :margin-v="[15,0,0,0]"
> >
<user-info title="手机号"></user-info> <user-info title="手机号" :right=mobile></user-info>
<user-info title="邮箱号"></user-info> <user-info title="邮箱号" :right=email></user-info>
<user-info title="微信号"></user-info> <user-info title="微信号" :right=wxNumber></user-info>
<user-info title="QQ号"></user-info> <user-info title="QQ号" :right=qqNumber></user-info>
<user-info title="钉钉号"></user-info> <user-info title="钉钉号"></user-info>
</yun-div> </yun-div>
<yun-div <yun-div
:margin-v="[15,0,15,0]" :margin-v="[15,0,15,0]"
> >
<user-info title="修改密码"></user-info> <user-info title="密码" right="去修改"></user-info>
</yun-div> </yun-div>
<yun-dialog <yun-dialog
v-if="false" v-if="false"
...@@ -63,6 +63,7 @@ ...@@ -63,6 +63,7 @@
import userInfo from "../../components/moblie/dataCard"; import userInfo from "../../components/moblie/dataCard";
import pageConfig from '../../action/page-config' import pageConfig from '../../action/page-config'
import FansCard from "../../components/moblie/fansCard"; import FansCard from "../../components/moblie/fansCard";
import config from '../../action/config';
export default { export default {
components: {FansCard, userInfo}, components: {FansCard, userInfo},
data(){ data(){
...@@ -79,12 +80,66 @@ ...@@ -79,12 +80,66 @@
}, },
], ],
}, },
gender:'',
mobile:'',
email:'',
signature:'',
nickName:null,
qqNumber:null,
wxNumber:null,
birthday:'',
addFile:null,
} }
}, },
created(){
this.getDataUserInfo();
},
methods:{ methods:{
dataPostRemarks(){ dataPostRemarks(){},
getDataUserInfo(){
this.$axios.$get(config.api.get.User.myInfo).then((response) => {
console.log(response);
if(response.code===0){
let data = response.data;
this.nickName=data.nickName;
this.gender= data.gender;
this.birthday = data.birthday;
this.signature = data.signature;
this.userAvatar = data.userAvatar;
this.mobile = data.mobile;
this.email=data.email;
this.qqNumber = data.qqNumber;
this.wxNumber = data.wxNumber;
this.nickCanModify = data.nickCanModify;
if(this.gender===1){
this.gender="男"
}else if(this.gender===2){
this.gender="女"
}else{
this.gender="保密"
}
if(this.mobile===null){
this.mobile="未公开"
}
if(this.qqNumber===null){
this.qqNumber='未填写'
}
if(this.wxNumber===null){
this.wxNumber="未填写"
}
if(this.email===null){
this.email="未填写"
} }
if(this.signature===null){
this.signature="您还没有个性签名哦"
}
}
})
},
} }
} }
......
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