diff --git a/server/Application/Api/Controller/AdminSettingController.class.php b/server/Application/Api/Controller/AdminSettingController.class.php index d21bd51f0..b236ac4a0 100644 --- a/server/Application/Api/Controller/AdminSettingController.class.php +++ b/server/Application/Api/Controller/AdminSettingController.class.php @@ -13,10 +13,12 @@ public function saveConfig(){ $home_page = intval(I("home_page")) ; $home_item = intval(I("home_item")) ; $oss_setting = I("oss_setting") ; + $beian = I("beian") ; D("Options")->set("history_version_count" ,$history_version_count) ; D("Options")->set("register_open" ,$register_open) ; D("Options")->set("home_page" ,$home_page) ; D("Options")->set("home_item" ,$home_item) ; + D("Options")->set("beian" ,$beian) ; if ($oss_open) { $this->checkComposerPHPVersion(); @@ -38,6 +40,7 @@ public function loadConfig(){ $oss_setting = D("Options")->get("oss_setting" ) ; $home_page = D("Options")->get("home_page" ) ; $home_item = D("Options")->get("home_item" ) ; + $beian = D("Options")->get("beian" ) ; $ldap_form = json_decode($ldap_form,1); $oss_setting = json_decode($oss_setting,1); @@ -51,6 +54,7 @@ public function loadConfig(){ "history_version_count"=>$history_version_count , "home_page"=>$home_page , "home_item"=>$home_item , + "beian"=>$beian , "oss_setting"=>$oss_setting , ); $this->sendResult($array); diff --git a/server/Application/Api/Controller/CommonController.class.php b/server/Application/Api/Controller/CommonController.class.php index 354606734..17d193566 100644 --- a/server/Application/Api/Controller/CommonController.class.php +++ b/server/Application/Api/Controller/CommonController.class.php @@ -82,9 +82,11 @@ public function showCaptcha(){ public function homePageSetting(){ $home_page = D("Options")->get("home_page" ) ; $home_item = D("Options")->get("home_item" ) ; + $beian = D("Options")->get("beian" ) ; $array = array( "home_page"=>$home_page , "home_item"=>$home_item , + "beian"=>$beian , ); $this->sendResult($array); } diff --git a/server/Application/Api/Model/OptionsModel.class.php b/server/Application/Api/Model/OptionsModel.class.php index 8a146bdf4..9e8ef2ac8 100644 --- a/server/Application/Api/Model/OptionsModel.class.php +++ b/server/Application/Api/Model/OptionsModel.class.php @@ -15,8 +15,11 @@ public function get($option_name){ // public function set($option_name,$option_value){ - $sql = " replace into options (option_name , option_value ) values ('$option_name' , '$option_value')"; - return $this->execute($sql);; + $return = M('options')->add(array( + "option_name"=>$option_name , + "option_value"=>$option_value , + ),NULL,true); + return $return; } } \ No newline at end of file diff --git a/web_src/src/components/Index.vue b/web_src/src/components/Index.vue index ce8d1be53..8b41b06d7 100644 --- a/web_src/src/components/Index.vue +++ b/web_src/src/components/Index.vue @@ -190,7 +190,7 @@ }}