mirror of
https://github.com/ehang-io/nps.git
synced 2025-09-02 03:16:53 +00:00
增加 web_base_url 配置, 用于配置 web 后台可置于代理子路径下
This commit is contained in:
@@ -8,10 +8,10 @@
|
||||
|
||||
<title>nps admin login</title>
|
||||
|
||||
<link href="/static/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="/static/font-awesome/css/font-awesome.css" rel="stylesheet">
|
||||
<link href="{{.web_base_url}}/static/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="{{.web_base_url}}/static/font-awesome/css/font-awesome.css" rel="stylesheet">
|
||||
|
||||
<link href="/static/css/style.css" rel="stylesheet">
|
||||
<link href="{{.web_base_url}}/static/css/style.css" rel="stylesheet">
|
||||
|
||||
</head>
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
</div>
|
||||
<button onclick="login()" class="btn btn-primary block full-width m-b">login</button>
|
||||
{{if eq true .register_allow}}
|
||||
<a class="btn btn-sm btn-white btn-block" href="/login/register">register</a>
|
||||
<a class="btn btn-sm btn-white btn-block" href="{{.web_base_url}}/login/register">register</a>
|
||||
{{end}}
|
||||
</form>
|
||||
</div>
|
||||
@@ -59,7 +59,7 @@
|
||||
</div>
|
||||
|
||||
</body>
|
||||
<script src="/static/js/jquery-2.1.1.js"></script>
|
||||
<script src="{{.web_base_url}}/static/js/jquery-2.1.1.js"></script>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -68,11 +68,11 @@
|
||||
function login() {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/login/verify",
|
||||
url: "{{.web_base_url}}/login/verify",
|
||||
data: $("form").serializeArray(),
|
||||
success: function (res) {
|
||||
if (res.status) {
|
||||
window.location.href = "/index/index"
|
||||
window.location.href = "{{.web_base_url}}/index/index"
|
||||
} else {
|
||||
alert(res.msg)
|
||||
}
|
||||
|
Reference in New Issue
Block a user