123456789101112131415161718192021222324252627282930313233 |
- package service
- import (
- "gin-vue-admin/config"
- "gin-vue-admin/global"
- "gin-vue-admin/model"
- "gin-vue-admin/utils"
- )
- func GetSystemConfig() (err error, conf config.Server) {
- return nil, global.GVA_CONFIG
- }
- func SetSystemConfig(system model.System) (err error) {
- cs := utils.StructToMap(system.Config)
- for k, v := range cs {
- global.GVA_VP.Set(k, v)
- }
- err = global.GVA_VP.WriteConfig()
- return err
- }
|