mirror of
				https://github.com/TeaOSLab/EdgeAdmin.git
				synced 2025-11-04 05:00:25 +08:00 
			
		
		
		
	添加DNS账号时自动读取DNS服务商下域名
This commit is contained in:
		@@ -93,7 +93,10 @@
 | 
			
		||||
</table>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
<h3>管理的域名 <a href="" @click.prevent="createDomain()">[添加域名]</a> </h3>
 | 
			
		||||
<h3>管理的域名 <a href="" @click.prevent="createDomain()">[添加域名]</a></h3>
 | 
			
		||||
 | 
			
		||||
<p class="ui message blue" v-if="isUpdatingDomains">正在检查域名状态...</p>
 | 
			
		||||
 | 
			
		||||
<p class="comment" v-if="domains.length == 0">暂时还没有可以管理的域名。</p>
 | 
			
		||||
 | 
			
		||||
<table class="ui table selectable celled" v-if="domains.length > 0">
 | 
			
		||||
@@ -136,6 +139,9 @@
 | 
			
		||||
				<a href=""  style="border-bottom: 1px #db2828 dashed" title="点击和DNS服务商系统同步" @click.prevent="syncDomain(index,domain)" v-if="!domain.isSyncing"><span class="red">需要同步</span></a>
 | 
			
		||||
				<span v-else>正在同步...</span>
 | 
			
		||||
			</div>
 | 
			
		||||
            <div v-else-if="!domain.isUp">
 | 
			
		||||
                <a  href="" style="border-bottom: 1px #db2828 dashed" @click.prevent="alertDown"><span class="red">已下线</span></a>
 | 
			
		||||
            </div>
 | 
			
		||||
			<div v-else>
 | 
			
		||||
				<label-on :v-is-on="domain.isOn"></label-on>
 | 
			
		||||
			</div>
 | 
			
		||||
 
 | 
			
		||||
@@ -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("当前域名已从服务商下线")
 | 
			
		||||
	}
 | 
			
		||||
})
 | 
			
		||||
		Reference in New Issue
	
	Block a user