diff --git a/Application/Media/Controller/ArticleController.class.php b/Application/Media/Controller/ArticleController.class.php index 3fa89143..095ee559 100644 --- a/Application/Media/Controller/ArticleController.class.php +++ b/Application/Media/Controller/ArticleController.class.php @@ -363,14 +363,28 @@ class ArticleController extends HomeController { $this->error('分类不存在或被禁用!'); } } - - public function agreement() { - $category=D('category')->where(array('name'=>'agreement'))->find(); - $docu=D('document')->where(array('category_id'=>$category['id'],'status'=>1))->find(); + public function agreement() { + $this->getDocument('用户协议'); + } + public function privacy() { + $this->getDocument('隐私政策'); + } + public function cancellation() { + $this->getDocument('注销协议'); + } + public function otherDirectory() { + $this->getDocument('第三方SDK目录'); + } + + private function getDocument($title) + { + $category=D('category')->where(array('name'=>'agreement'))->find(); + $docu=D('document')->where(array('category_id'=>$category['id'],'status'=>1,'title'=>['like',"%{$title}"]))->find(); $document_article=D('document_article')->where(array('id'=>$docu['id']))->find(); $this->assign('article',$document_article['content']); - $this->display(); - } + $this->display('agreement'); + } + protected function list_data($model){ $game = M($model['m_name'],$model['prefix']); $map = $model['map']; diff --git a/Application/Media/View/default/Public/loginreg.html b/Application/Media/View/default/Public/loginreg.html index 244623de..2680a9c4 100644 --- a/Application/Media/View/default/Public/loginreg.html +++ b/Application/Media/View/default/Public/loginreg.html @@ -41,6 +41,27 @@