mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-04 13:10:26 +08:00
35 lines
849 B
JavaScript
35 lines
849 B
JavaScript
|
|
Tea.context(function () {
|
||
|
|
this.ip = ""
|
||
|
|
this.result = {
|
||
|
|
isDone: false,
|
||
|
|
isOk: false,
|
||
|
|
isFound: false,
|
||
|
|
isAllowed: false,
|
||
|
|
error: "",
|
||
|
|
province: null,
|
||
|
|
country: null,
|
||
|
|
ipItem: null,
|
||
|
|
ipList: null
|
||
|
|
}
|
||
|
|
|
||
|
|
this.$delay(function () {
|
||
|
|
this.$watch("ip", function () {
|
||
|
|
this.result.isDone = false
|
||
|
|
})
|
||
|
|
})
|
||
|
|
|
||
|
|
this.success = function (resp) {
|
||
|
|
this.result = resp.data.result
|
||
|
|
}
|
||
|
|
|
||
|
|
this.updateItem = function (itemId) {
|
||
|
|
teaweb.popup(Tea.url(".updateIPPopup?firewallPolicyId=" + this.firewallPolicyId, {itemId: itemId}), {
|
||
|
|
height: "23em",
|
||
|
|
callback: function () {
|
||
|
|
teaweb.success("保存成功", function () {
|
||
|
|
teaweb.reload()
|
||
|
|
})
|
||
|
|
}
|
||
|
|
})
|
||
|
|
}
|
||
|
|
})
|