mirror of
				https://github.com/TeaOSLab/EdgeAdmin.git
				synced 2025-11-04 13:10:26 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			24 lines
		
	
	
		
			532 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
		
			532 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
Tea.context(function () {
 | 
						|
	this.serverType = "httpProxy";
 | 
						|
	this.tlsProtocolName = ""
 | 
						|
	this.origins = [];
 | 
						|
 | 
						|
	this.success = NotifySuccess("保存成功", "/servers");
 | 
						|
 | 
						|
	this.changeServerType = function () {
 | 
						|
		this.origins = [];
 | 
						|
		this.tlsProtocolName = "";
 | 
						|
	};
 | 
						|
 | 
						|
	this.addOrigin = function () {
 | 
						|
		teaweb.popup("/servers/addOriginPopup?serverType=" + this.serverType, {
 | 
						|
			callback: function (resp) {
 | 
						|
				this.origins.push(resp.data.origin);
 | 
						|
			}
 | 
						|
		});
 | 
						|
	};
 | 
						|
 | 
						|
	this.removeOrigin = function (index) {
 | 
						|
		this.origins.$remove(index);
 | 
						|
	};
 | 
						|
}); |