1,
2,在export default里面
data(){
return{
newNickName:’’,
id:’’
}
},
3,调用后台controller里面的方法进行查询
//进来就加载
created(){
getUserNickName(“f6f40c299686498c99f0908b9e2b38e2”).then(res=>{
console.log(res)
if(res.flag ===0){
console.log(res)
this.newNickName=res.object.nickName;
this.id=res.object.id;
}
})
},
4,切记在这里面进行一下打印打印出来后台查询出来的数据
console.log(res)另外注意字段名一定要相同!!!!!!