模版更新

This commit is contained in:
xiongxiaoyang
2024-05-28 09:42:27 +08:00
parent b0c249cdca
commit ea5c0e8bd1
32 changed files with 312 additions and 311 deletions

View File

@ -1,4 +1,5 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})">
<title th:text="'账号设置_'+${application.website.name}"></title>
@ -25,10 +26,12 @@
<div class="my_info cf">
<div class="my_info_txt">
<ul class="mytab_list">
<li ><i class="tit">我的头像</i>
<a style="position: relative" >
<img id="imgLogo" class="user_img" alt="我的头像" src="/images/man.png" />
<input class="opacity" onchange="picChange()" type="file" id="file0" name="file" title="点击上传图片" style="z-index: 100;cursor: pointer;left: 0px; top: -25px; width: 60px; height: 80px; opacity: 0; position: absolute; "/>
<li><i class="tit">我的头像</i>
<a style="position: relative">
<img id="imgLogo" class="user_img" alt="我的头像" src="/images/man.png"/>
<input class="opacity" onchange="picChange()" type="file" id="file0" name="file"
title="点击上传图片"
style="z-index: 100;cursor: pointer;left: 0px; top: -25px; width: 60px; height: 80px; opacity: 0; position: absolute; "/>
</a>
@ -59,27 +62,26 @@
dataType: "json",
success: function (data) {
if (data.code == 200) {
if(data.data.userPhoto){
$("#imgLogo").attr("src",data.data.userPhoto);
if (data.data.userPhoto) {
$("#imgLogo").attr("src", data.data.userPhoto);
}
if(data.data.nickName){
$("#my_name").html(data.data.nickName+"<em class=\"ml10\">[修改]</em>");
}else{
$("#my_name").html(data.data.username+"<em class=\"ml10\">[修改]</em>");
if (data.data.nickName) {
$("#my_name").html(data.data.nickName + "<em class=\"ml10\">[修改]</em>");
} 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{
} else {
$("#my_sex").html("请选择");
}
} else if (data.code == 1001) {
//未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href);
location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else {
layer.alert(data.msg);
@ -96,7 +98,7 @@
var file = $("#file0").val(); //文件名称
if (file != "") {
if(checkPicUpload($("#file0")[0])) {
if (checkPicUpload($("#file0")[0])) {
$.ajaxFileUpload({
url: "/file/picUpload", //用于文件上传的服务器端请求地址
@ -118,7 +120,7 @@
} else if (data.code == 1001) {
//未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href);
location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else {
layer.alert(data.msg);
@ -143,7 +145,6 @@
}
}
</script>
</body>