File tree Expand file tree Collapse file tree 2 files changed +403
-333
lines changed
Expand file tree Collapse file tree 2 files changed +403
-333
lines changed Original file line number Diff line number Diff line change @@ -639,20 +639,24 @@ func (this *ManagerController) CreateToken() {
639639}
640640
641641func (this * ManagerController ) Setting () {
642-
642+ tab := this . GetString ( "tab" , "basic" )
643643 options , err := models .NewOption ().All ()
644644 if err != nil {
645645 this .Abort ("404" )
646646 }
647647
648648 if this .Ctx .Input .IsPost () {
649649 for _ , item := range options {
650- item .OptionValue = this .GetString (item .OptionName )
651- item .InsertOrUpdate ()
650+ if _ , ok := this .Ctx .Request .PostForm [item .OptionName ]; ok {
651+ item .OptionValue = this .GetString (item .OptionName )
652+ item .InsertOrUpdate ()
653+ }
652654 }
655+
653656 if err := models .NewElasticSearchClient ().Init (); err != nil {
654657 this .JsonResult (1 , err .Error ())
655658 }
659+
656660 models .NewSign ().UpdateSignRule ()
657661 models .NewReadRecord ().UpdateReadingRule ()
658662 this .JsonResult (0 , "ok" )
@@ -667,7 +671,7 @@ func (this *ManagerController) Setting() {
667671 }
668672 }
669673 this .Data ["SITE_TITLE" ] = this .Option ["SITE_NAME" ]
670-
674+ this . Data [ "Tab" ] = tab
671675 this .Data ["IsSetting" ] = true
672676 this .Data ["SeoTitle" ] = "配置管理"
673677 this .TplName = "manager/setting.html"
You can’t perform that action at this time.
0 commit comments