Files
EdgeAdmin/internal/web/actions/default/dashboard/index.go

30 lines
589 B
Go
Raw Normal View History

2020-07-22 22:19:39 +08:00
package dashboard
import (
"github.com/TeaOSLab/EdgeAdmin/internal/configloaders"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
)
2020-07-22 22:19:39 +08:00
type IndexAction struct {
actionutils.ParentAction
}
func (this *IndexAction) Init() {
this.Nav("", "", "")
}
func (this *IndexAction) RunGet(params struct{}) {
// 取得用户的权限
module, ok := configloaders.FindFirstAdminModule(this.AdminId())
if ok {
for _, m := range configloaders.AllModuleMaps() {
if m.GetString("code") == module {
this.RedirectURL(m.GetString("url"))
return
}
}
}
2020-12-03 11:03:12 +08:00
this.Show()
2020-07-22 22:19:39 +08:00
}