添加DNS账号时自动读取DNS服务商下域名

This commit is contained in:
GoEdgeLab
2021-08-19 14:26:25 +08:00
parent b167eedd31
commit ec4468cb55
5 changed files with 62 additions and 2 deletions

View File

@@ -1,4 +1,28 @@
Tea.context(function () {
this.isUpdatingDomains = false
this.$delay(function () {
this.syncDomains()
})
this.syncDomains = function () {
this.isUpdatingDomains = true
this.$post(".syncDomains")
.params({
providerId: this.provider.id
})
.success(function (resp) {
if (resp.data.hasChanges) {
teaweb.reload()
}
})
.done(function () {
this.$delay(function () {
this.isUpdatingDomains = false
}, 1000)
})
}
this.updateProvider = function (providerId) {
teaweb.popup(Tea.url(".updatePopup?providerId=" + providerId), {
height: "28em",
@@ -88,4 +112,8 @@ Tea.context(function () {
this.viewServers = function (domainId) {
teaweb.popup("/dns/domains/serversPopup?domainId=" + domainId)
}
this.alertDown = function () {
teaweb.popupTip("当前域名已从服务商下线")
}
})