This commit is contained in:
unknown
2026-02-04 20:27:13 +08:00
commit 3b042d1dad
9410 changed files with 1488147 additions and 0 deletions

View File

@@ -0,0 +1,51 @@
Tea.context(function () {
this.isRunning = false
this.isFinished = false
this.response = ""
this.error = ""
this.isOk = false
this.submitBefore = function () {
this.isRunning = true
this.isFinished = false
this.response = ""
this.error = ""
this.isOk = false
}
this.submitSuccess = function (resp) {
this.updateStatus(resp.data.result)
}
this.submitFail = function (resp) {
this.isRunning = false
this.isFinished = true
this.response = ""
this.error = resp.errors[0].messages[0]
this.errorLines = []
}
this.submitError = function () {
this.isRunning = false
this.isFinished = true
this.response = ""
this.errorLines = []
this.error = "请求超时"
}
this.updateStatus = function (result) {
this.isRunning = false
this.isFinished = true
this.isOk = result.isOk
this.response = result.response
this.responseLines = []
if (this.response != null) {
this.responseLines = this.response.split("\n")
}
this.error = result.error
this.errorLines = []
if (this.error.length > 0) {
this.errorLines = this.error.split("\n")
}
}
})