Index.php 597 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. namespace app\index\controller;
  3. use app\common\controller\Frontend;
  4. use think\Db;
  5. class Index extends Frontend
  6. {
  7. protected $noNeedLogin = '*';
  8. protected $noNeedRight = '*';
  9. protected $layout = '';
  10. public function index()
  11. {
  12. return $this->view->fetch();
  13. }
  14. //基础文章网页
  15. public function basedata(){
  16. $key = input('key','');
  17. if(!$key){
  18. exit;
  19. }
  20. $content = Db::name('basedata')->where('key',$key)->find();
  21. $this->assign('content',$content['content']);
  22. return $this->fetch();
  23. }
  24. }