...
This commit is contained in:
@@ -74,6 +74,7 @@ header {
|
||||
border-radius: 10px;
|
||||
border-width: 2px;
|
||||
border: #F0F0F514;
|
||||
padding: 5px;
|
||||
background: #F0F0F524;
|
||||
color: white;
|
||||
text-align: center;
|
||||
@@ -91,6 +92,23 @@ header {
|
||||
color: #ec914b;
|
||||
}
|
||||
|
||||
.hello_to_user {
|
||||
border-radius: 10px;
|
||||
border-width: 2px;
|
||||
border: #F0F0F514;
|
||||
padding: 10px;
|
||||
background: #F0F0F524;
|
||||
color: #ec914b;
|
||||
text-align: center;
|
||||
margin: 2px;
|
||||
}
|
||||
|
||||
|
||||
.hello_to_user_txt {
|
||||
color: #ec914b;
|
||||
}
|
||||
|
||||
|
||||
#bottom {
|
||||
float: right;
|
||||
display: inline-block;
|
||||
|
||||
@@ -81,8 +81,8 @@ function postLogin(target,type, data, key,callBackResult) {
|
||||
if (httpRequest.readyState === XMLHttpRequest.DONE) {
|
||||
if (httpRequest.status === 200) {
|
||||
try {
|
||||
callBackResult(httpRequest.response)
|
||||
document.location.href = document.location
|
||||
var data = JSON.parse(httpRequest.response)
|
||||
callBackResult(data)
|
||||
} catch (e) {
|
||||
|
||||
}
|
||||
@@ -133,8 +133,8 @@ function logout() {
|
||||
document.cookie = "refresh=; expires=Thu, 01 Jan 1970 00:00:01 GMT;"
|
||||
let logOutUrl = getMainPath() + "/user/logout.ajax";
|
||||
post(logOutUrl,"","","", function (resultData) {
|
||||
alert(resultData)
|
||||
document.location.href = document.location
|
||||
alert("로그아웃 됨요~! 빠염~!")
|
||||
document.location.replace(document.location)
|
||||
})
|
||||
|
||||
}
|
||||
@@ -144,6 +144,9 @@ function gotoLogin() {
|
||||
location.href = getMainPath()+"/login"
|
||||
}
|
||||
|
||||
function gotoJoin() {
|
||||
document.location.replace(getMainPath() + "/user/join")
|
||||
}
|
||||
|
||||
function goToView(path,id) {
|
||||
location.href = path + id;
|
||||
@@ -155,11 +158,20 @@ function onclickLogin(type, keyword) {
|
||||
'user_id': user_id.value,
|
||||
'user_pw': user_pw.value,
|
||||
}
|
||||
postLogin(getMainPath()+"/user/login.ajax",type,JSON.stringify(data),keyword, function (resultData) {
|
||||
var data = JSON.parse(resultData)
|
||||
// alert(resultData)
|
||||
document.cookie = "access=" + data.token.split(";")[0]+";"
|
||||
document.cookie = "refresh=" + data.refresh.split(";")[0]+";"
|
||||
postLogin(getMainPath()+"/user/login.ajax",type,JSON.stringify(data),keyword, function (data) {
|
||||
if (data.isOk) {
|
||||
document.cookie = "access=" + data.token.split(";")[0]+";"
|
||||
document.cookie = "refresh=" + data.refresh.split(";")[0]+";"
|
||||
document.location.replace(document.location)
|
||||
} else {
|
||||
if (data.resultCode === 7100) {
|
||||
if(confirm(`너 누구임 정보 없는데?!\n${data.resultMsg}[${data.resultCode}]\n가입 할래!?`)){
|
||||
document.location.replace(getMainPath() + "/user/join")
|
||||
}
|
||||
} else {
|
||||
alert(`너 누구임?!\n${data.resultMsg}[${data.resultCode}]`)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,12 @@
|
||||
<tr id="bottom">
|
||||
<td><h3><a aria-label="licenses" style="color: white" href="../licenses" title="Gmail">licenses</a></h3></td>
|
||||
<td><h3><a aria-label="sendToMe" style="color: white" href="mailto:lunaticbum@gmail.com" title="Gmail">lunaticbum@gmail.com</a></h3></td>
|
||||
<th:block th:if="${PERMISSION == 'OK'}">
|
||||
<td><h3><a aria-label="logout" style="color: white" href="javascript:logout()" title="logout" >logout</a></h3></td>
|
||||
</th:block>
|
||||
<th:block th:if="${PERMISSION != 'OK'}">
|
||||
<td><h3><a aria-label="join" style="color: white" href="javascript:gotoJoin()" title="join" >join</a></h3></td>
|
||||
</th:block>
|
||||
</tr>
|
||||
</table>
|
||||
</footer>
|
||||
|
||||
@@ -25,8 +25,9 @@
|
||||
<div></div>
|
||||
<div></div>
|
||||
<div></div>
|
||||
<div class="user_info" >
|
||||
<td><h3><a aria-label="logout" style="color: white" href="javascript:logout()" title="logout">logout</a></h3></td>
|
||||
<div class="hello_to_user" >
|
||||
<a aria-label="logout" href="javascript:logout()" title="logout" class="hello_to_user_txt" >what's up~!</a><br/>
|
||||
<a aria-label="logout" href="javascript:logout()" title="logout" class="hello_to_user_txt" >[[${user_id}]]</a>
|
||||
</div>
|
||||
</th:block>
|
||||
</header>
|
||||
|
||||
Reference in New Issue
Block a user