<div id="student-info" class="header-info clear-both">
<div class="header-box clear-both">
<!-- -->
<a class="img_href" href="-sharp">
<img class="my-head" v-bind:src="imgUrl" />
</a>
<!-- -->
<div class="my-info clear-both">
<div class="top-info clear-both">
<span class="nickname" v-if="name">{{name}}</span>
<span id="student_age" class="age">{{age}}</span>
<span class="gender">
<img class="gender_img" v-if="gender == "1"" src="/Public/images/icons/gender_male.png" />
<img class="gender_img" v-if="gender == "2"" src="/Public/images/icons/gender_male.png" />
</span>
</div>
<div class="user-id-info text-line-height clear-both">
ID: S{{identifier}}
</div>
<div class="user-status text-line-height clear-both">
<i class="fa fa-envelope"></i>
<span class="user-tips-text">{{statusText}}</span>
</div>
<div class="user_address text-line-height clear-both">
<i class="fa fa-map-marker"></i>
<span class="user-tips-text">{{address}}</span>
</div>
</div>
<!-- -->
<div class="settings">
<img src="/Public/img/icons/settings.png" />
<span>SETTINGS</span>
</div>
</div>
</div>
studentInfo:function(){
var student_Info = new Vue({
el:"-sharpstudent-info",
data:{
name:"",
gender:"",
identifier:"",
dob:"",
age:"",
status:"",
statusText:"",
address:"",
imgUrl:"",
},
methods:{
getStudentInfo:function(){
var oIdentifier = getCookie("identifier");
var params = new URLSearchParams();
params.append("identifier",oIdentifier);
axios.post("/Student/student_base_info",params).then(response => {
//console.log(response.data);
this.name = response.data.name;
this.identifier = response.data.identifier;
this.age = myAge(response.data.dob);
this.gender = response.data.gender;
this.status = response.data.status;
this.statusText = courseStatus(this.status);
this.imgUrl = "/Upload/avatar/100_100/"+response.data.openid+".jpg"
});
},
},
created(){
this.getStudentInfo();
},
});
},
axios
date
()
how do bosses solve this problem
if the layout is messy, it doesn"t feel good to load it twice.
(not to mention the smile of Synchronize)