mirror of
				https://github.com/TeaOSLab/EdgeAdmin.git
				synced 2025-11-04 05:00:25 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			31 lines
		
	
	
		
			639 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			31 lines
		
	
	
		
			639 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
Tea.context(function () {
 | 
						|
	this.isSubmitting = false
 | 
						|
 | 
						|
	this.encodedFrom = window.encodeURIComponent(this.from)
 | 
						|
 | 
						|
	this.$delay(function () {
 | 
						|
		this.$find("form input[name='otpCode']").focus()
 | 
						|
	});
 | 
						|
 | 
						|
	// 更多选项
 | 
						|
	this.moreOptionsVisible = false;
 | 
						|
	this.showMoreOptions = function () {
 | 
						|
		this.moreOptionsVisible = !this.moreOptionsVisible;
 | 
						|
	};
 | 
						|
 | 
						|
	this.submitBefore = function () {
 | 
						|
		this.isSubmitting = true;
 | 
						|
	};
 | 
						|
 | 
						|
	this.submitDone = function () {
 | 
						|
		this.isSubmitting = false;
 | 
						|
	};
 | 
						|
 | 
						|
	this.submitSuccess = function (resp) {
 | 
						|
		if (this.from.length == 0) {
 | 
						|
			window.location = "/dashboard";
 | 
						|
		} else {
 | 
						|
			window.location = this.from;
 | 
						|
		}
 | 
						|
	};
 | 
						|
}); |