增加 web_base_url 配置, 用于配置 web 后台可置于代理子路径下

This commit is contained in:
涵曦
2019-05-10 16:29:55 +00:00
parent 4b7b2f4c27
commit 383dbd1b7b
21 changed files with 124 additions and 73 deletions

View File

@@ -18,7 +18,7 @@
<div class="content">
<div class="table-responsive">
<div id="toolbar">
<a href="/index/addhost?vkey={{.task_id}}&client_id={{.client_id}}"
<a href="{{.web_base_url}}/index/addhost?vkey={{.task_id}}&client_id={{.client_id}}"
class="btn btn-primary dim"
type="button" langtag="info-new">新增</a>
</div>
@@ -158,7 +158,7 @@
if (confirm("Are you sure you want to delete it")) {
$.ajax({
type: "POST",
url: "/index/delhost",
url: "{{.web_base_url}}/index/delhost",
data: {"id": id},
success: function (res) {
alert(res.msg)
@@ -171,7 +171,7 @@
}
function edit(id) {
window.location.href = "/index/edithost?id=" + id
window.location.href = "{{.web_base_url}}/index/edithost?id=" + id
}