You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
489 B

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