<script type="text/javascript" charset="UTF-8">
mui.init();
mui.ready(function(){
mui.plusReady(function(){
m_id=plus.storage.getItem('m_id');
document.getElementById('m_id').value=m_id;
mui.ajax(server+'index.php/Mobile/User/edit_user_info',{
data:{
m_id:plus.storage.getItem('m_id')
},
dataType:'json',
type:'get',
timeout:10000,
success:function(data){
if(data.code){
console.log(data.info.pic_path);
if(data.info.pic_path != 'Uploads/Image/Mobile/'){
document.getElementById('image').src=server+data.info.pic_path;
}
if(data.info.username){
document.getElementById('username').value=data.info.username;
}
if(data.info.sex){
var sex=document.getElementById('sex');
for(var i=0;i<sex.options.length;i++){
if(data.info.sex==sex.options[i].value){
sex.options[i].selected='selected';
break;
}
}
}
if(data.info.birthday){
document.getElementById('birthday').value=data.info.birthday;
}
if(data.info.job){
var job=document.getElementById('job');
for(var i=0;i<job.options.length;i++){
if(data.info.job==job.options[i].value){
job.options[i].selected='selected';
break;
}
}
}else{
}
}
},
error:function(xhr,type,errorThrown){
mui.alert(type);
}
})
})
})