sys_system.go 410 B

1234567891011121314151617181920212223
  1. package sysModel
  2. import (
  3. "gin-vue-admin/config"
  4. "gin-vue-admin/tools"
  5. )
  6. type System struct {
  7. Config config.Config
  8. }
  9. func (s *System)GetSystemConfig()(err error,conf config.Config){
  10. return nil,config.GinVueAdminconfig
  11. }
  12. func (s *System)SetSystemConfig()(err error){
  13. confs:= tools.StructToMap(s.Config)
  14. for k,v:= range confs {
  15. config.VTool.Set(k,v)
  16. }
  17. err = config.VTool.WriteConfig()
  18. return err
  19. }