Index.php 635 B

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