mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-28 15:10:25 +08:00
将API设置URL从/api改为/settings/api
This commit is contained in:
35
web/views/@default/settings/api/index.js
Normal file
35
web/views/@default/settings/api/index.js
Normal file
@@ -0,0 +1,35 @@
|
||||
Tea.context(function () {
|
||||
// 创建节点
|
||||
this.createNode = function () {
|
||||
teaweb.popup(".node.createPopup", {
|
||||
width: "50em",
|
||||
height: "30em",
|
||||
callback: function () {
|
||||
teaweb.success("保存成功", function () {
|
||||
teaweb.reload()
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 删除节点
|
||||
this.deleteNode = function (nodeId) {
|
||||
let that = this
|
||||
teaweb.confirm("确定要删除此节点吗?", function () {
|
||||
that.$post(".delete")
|
||||
.params({
|
||||
nodeId: nodeId
|
||||
})
|
||||
.refresh()
|
||||
})
|
||||
}
|
||||
|
||||
// 升级节点
|
||||
this.upgradeNode = function (nodeId) {
|
||||
teaweb.popup(".node.upgradePopup?nodeId=" + nodeId, {
|
||||
onClose: function () {
|
||||
teaweb.reload()
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user