mirror of
				https://github.com/TeaOSLab/EdgeAdmin.git
				synced 2025-11-04 13:10:26 +08:00 
			
		
		
		
	实现Ticket登录
This commit is contained in:
		
							
								
								
									
										14
									
								
								web/views/@default/login/ticket.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								web/views/@default/login/ticket.html
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,14 @@
 | 
			
		||||
<!DOCTYPE html>
 | 
			
		||||
<html lang="zh">
 | 
			
		||||
<head>
 | 
			
		||||
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
 | 
			
		||||
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=0">
 | 
			
		||||
    {$TEA.VUE}
 | 
			
		||||
    {$TEA.SEMANTIC}
 | 
			
		||||
</head>
 | 
			
		||||
<body>
 | 
			
		||||
 | 
			
		||||
<div class="ui message warning" v-if="errorMsg.length > 0">ERROR: {{errorMsg}}</div>
 | 
			
		||||
 | 
			
		||||
</body>
 | 
			
		||||
</html>
 | 
			
		||||
							
								
								
									
										13
									
								
								web/views/@default/login/ticket.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								web/views/@default/login/ticket.js
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,13 @@
 | 
			
		||||
Tea.context(function () {
 | 
			
		||||
	// store information to local
 | 
			
		||||
	localStorage.setItem("sid", this.localSid)
 | 
			
		||||
	localStorage.setItem("ip", this.ip)
 | 
			
		||||
 | 
			
		||||
	if (this.errorMsg.length == 0) {
 | 
			
		||||
		if (this.redirect.length > 0) {
 | 
			
		||||
			window.location = this.redirect
 | 
			
		||||
		} else {
 | 
			
		||||
			window.location = "/dashboard"
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
})
 | 
			
		||||
		Reference in New Issue
	
	Block a user