diff --git a/Application/Admin/Controller/PromoteNoticeController.class.php b/Application/Admin/Controller/PromoteNoticeController.class.php new file mode 100644 index 000000000..8fa3c526d --- /dev/null +++ b/Application/Admin/Controller/PromoteNoticeController.class.php @@ -0,0 +1,26 @@ +find(); + $this->assign('data',$data); + $this->display(); + } + + public function doEdit() + { + $res = M("promote_notice","tab_")->save($_REQUEST); + if(!$res){ + $this->ajaxReturn(["status"=>0,"msg"=>"保存失败"]); + } + $this->ajaxReturn(["status"=>1,"msg"=>"修改并保存成功"]); + } +} diff --git a/Application/Admin/View/PromoteNotice/edit.html b/Application/Admin/View/PromoteNotice/edit.html new file mode 100644 index 000000000..a4d663dcf --- /dev/null +++ b/Application/Admin/View/PromoteNotice/edit.html @@ -0,0 +1,87 @@ + + + + + + + + + + +
+ + +
+ + + + + + + + + + +
是否开启: + + + +
公告内容: + +
+
+
+ + +
+
+ + +
+ + + diff --git a/Application/Home/Controller/PromoteController.class.php b/Application/Home/Controller/PromoteController.class.php index c54ea9248..17c6c7adc 100644 --- a/Application/Home/Controller/PromoteController.class.php +++ b/Application/Home/Controller/PromoteController.class.php @@ -298,9 +298,17 @@ class PromoteController extends BaseController $this->assign("tips",$tips); $this->assign("message",$message); $this->meta_title = "首页"; + //首页公告 + $this->getIndexTip(); $this->display(); } - + public function getIndexTip() + { + $data = M("promote_notice","tab_")->where("is_open = 1")->getField('content'); + if($data){ + $this->assign('index_tip',$data); + } + } public function popRuleDetail($id=0, $p=1, $row=1, $force=false, $pop = false) { $promoteBelong = M('promote', 'tab_')->where(['id'=>get_pid()])->getField('company_belong'); diff --git a/Application/Home/View/default/Promote/index.html b/Application/Home/View/default/Promote/index.html index 718ea9b7f..b46351e03 100644 --- a/Application/Home/View/default/Promote/index.html +++ b/Application/Home/View/default/Promote/index.html @@ -3,6 +3,10 @@ + + + +
    @@ -209,12 +213,51 @@ {$_page}
- . - - - - + + + + + +