修复性别修改问题

This commit is contained in:
xxy
2020-05-16 03:05:49 +08:00
parent b8b074d40a
commit e24e87b546
6 changed files with 14 additions and 7 deletions

View File

@ -65,7 +65,7 @@ if(!token){
success: function(data){
if(data.code == 200){
$(".user_link").html("<i class=\"line mr20\">|</i>" +
"<a href=\"/user/userinfo.html\" class=\"mr15\">"+data.data.username+"</a>" +
"<a href=\"/user/userinfo.html\" class=\"mr15\">"+data.data.nickName+"</a>" +
"<a href=\"javascript:logout()\" >退出</a>");
;
if("/user/login.html" == window.location.pathname){

View File

@ -59,7 +59,7 @@
dataType: "json",
success: function (data) {
if (data.code == 200) {
if(data.data.userSex === 0){
if(data.data.userSex === '0'){
$("input[name=sex]").eq(0).attr("checked",true);
}

View File

@ -59,9 +59,9 @@
}else{
$("#my_name").html(data.data.username+"<em class=\"ml10\">[修改]</em>");
}
if(data.data.userSex === 0){
if(data.data.userSex === '0'){
$("#my_sex").html("男<em class=\"ml10\">[修改]</em>");
}else if(data.data.userSex === 1){
}else if(data.data.userSex === '1'){
$("#my_sex").html("女<em class=\"ml10\">[修改]</em>");
}else{
$("#my_sex").html("请选择");