实现Ticket登录

This commit is contained in:
GoEdgeLab
2024-05-10 14:28:25 +08:00
parent 1658077150
commit af7a03b9fc
5 changed files with 100 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=0">
{$TEA.VUE}
{$TEA.SEMANTIC}
</head>
<body>
<div class="ui message warning" v-if="errorMsg.length > 0">ERROR: {{errorMsg}}</div>
</body>
</html>

View File

@@ -0,0 +1,13 @@
Tea.context(function () {
// store information to local
localStorage.setItem("sid", this.localSid)
localStorage.setItem("ip", this.ip)
if (this.errorMsg.length == 0) {
if (this.redirect.length > 0) {
window.location = this.redirect
} else {
window.location = "/dashboard"
}
}
})