mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-06 14:50:25 +08:00
32 lines
554 B
JavaScript
32 lines
554 B
JavaScript
Tea.context(function () {
|
|
this.isRequesting = false
|
|
this.isOk = false
|
|
this.message = ""
|
|
this.failKeys = []
|
|
|
|
this.before = function () {
|
|
this.isRequesting = true
|
|
this.isOk = false
|
|
this.message = ""
|
|
this.failKeys = []
|
|
}
|
|
|
|
this.success = function (resp) {
|
|
this.isOk = true
|
|
|
|
let f = NotifyReloadSuccess("任务提交成功")
|
|
f()
|
|
}
|
|
|
|
this.fail = function (resp) {
|
|
this.message = resp.message
|
|
|
|
if (resp.data.failKeys != null) {
|
|
this.failKeys = resp.data.failKeys
|
|
}
|
|
}
|
|
|
|
this.done = function () {
|
|
this.isRequesting = false
|
|
}
|
|
}); |