mirror of
				https://github.com/TeaOSLab/EdgeAdmin.git
				synced 2025-11-04 05:00:25 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			24 lines
		
	
	
		
			459 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
		
			459 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
Tea.context(function () {
 | 
						|
	this.isStarted = false
 | 
						|
	this.isChecking = true
 | 
						|
	this.result = {isOk: false, message: "", hasNew: false, dlURL: ""}
 | 
						|
 | 
						|
	this.start = function () {
 | 
						|
		this.isStarted = true
 | 
						|
		this.isChecking = true
 | 
						|
 | 
						|
		this.$delay(function () {
 | 
						|
			this.check()
 | 
						|
		}, 1000)
 | 
						|
	}
 | 
						|
 | 
						|
	this.check = function () {
 | 
						|
		this.$post("$")
 | 
						|
			.success(function (resp) {
 | 
						|
				this.result = resp.data.result
 | 
						|
			})
 | 
						|
			.done(function () {
 | 
						|
				this.isChecking = false
 | 
						|
			})
 | 
						|
	}
 | 
						|
}) |