申请ACME证书时防止重复提交

This commit is contained in:
刘祥超
2023-11-03 16:26:20 +08:00
parent 04a6792dbf
commit 617ad9b16e

View File

@@ -105,7 +105,7 @@ Tea.context(function () {
this.doDNS = function () {
this.isRequesting = true
let that = this
let taskCreated = false
this.$post("$")
.params({
platformUserId: this.platformUserId,
@@ -120,6 +120,7 @@ Tea.context(function () {
})
.success(function (resp) {
this.taskId = resp.data.taskId
taskCreated = true
this.isRequesting = true
this.$post(".run")
@@ -136,7 +137,9 @@ Tea.context(function () {
})
})
.done(function () {
this.isRequesting = false
if (!taskCreated) {
this.isRequesting = false
}
})
}