mirror of
				https://github.com/TeaOSLab/EdgeAdmin.git
				synced 2025-11-04 13:10:26 +08:00 
			
		
		
		
	
		
			
	
	
		
			23 lines
		
	
	
		
			350 B
		
	
	
	
		
			Go
		
	
	
	
	
	
		
		
			
		
	
	
			23 lines
		
	
	
		
			350 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| 
								 | 
							
								package group
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								import (
							 | 
						||
| 
								 | 
							
									"github.com/iwind/TeaGo/actions"
							 | 
						||
| 
								 | 
							
									"net/http"
							 | 
						||
| 
								 | 
							
								)
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								type Helper struct {
							 | 
						||
| 
								 | 
							
								}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								func NewHelper() *Helper {
							 | 
						||
| 
								 | 
							
									return &Helper{}
							 | 
						||
| 
								 | 
							
								}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								func (this *Helper) BeforeAction(action *actions.ActionObject) {
							 | 
						||
| 
								 | 
							
									if action.Request.Method != http.MethodGet {
							 | 
						||
| 
								 | 
							
										return
							 | 
						||
| 
								 | 
							
									}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
									action.Data["mainTab"] = "component"
							 | 
						||
| 
								 | 
							
									action.Data["secondMenuItem"] = "group"
							 | 
						||
| 
								 | 
							
								}
							 |