About.php 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <?php
  2. /**
  3. * 关于我们等页面 控制器
  4. * Created by PhpStorm.
  5. * User: Administrator
  6. * Date: 2019/9/29
  7. * Time: 14:11
  8. */
  9. namespace app\home\controller;
  10. use think\Request;
  11. class About extends Home
  12. {
  13. private $temple_us_en = '<article>
  14. <p>Loyo mobile game platform provides players with free mobile game downloads, mobile game
  15. rankings
  16. and a large number of free mobile game packages! Loyo also provides fresh and fun mobile
  17. game
  18. information, massive mobile games, mobile games, mobile games and so on.</p>
  19. <p> Loyo is founded by game professionals of 5-10 years of experience in the game industry. It
  20. has a
  21. team of mobile game planning, mobile game development and mobile game operations. Every
  22. member
  23. of Loyo has a deep-love and understanding in the game industry. Loyo is one of the few
  24. emerging
  25. game companies in China that has game development, game operations and guild management.
  26. Since
  27. its establishment, Loyo has rapidly deployed the mobile game industry with its solid
  28. strength
  29. foundation, and has reached a deep strategic partnership with industry giants such as Baidu
  30. Games, 360 Games and Lenovo Games.</p>
  31. </article>';
  32. /**
  33. * 初始化操作
  34. */
  35. protected function _initialize()
  36. {
  37. parent::_initialize();
  38. }
  39. public function _empty()
  40. {
  41. $action = Request::instance()->action();
  42. $info = $this->getAboutData($action);
  43. $this->assign('info',$info);
  44. return $this->fetch('about/index');
  45. }
  46. /**
  47. * 关于 的页面加载
  48. */
  49. private function getAboutData($action) {
  50. $info = model('Aboutus')->where('name',$action)->find();
  51. if (empty($info)) $this->error('暂无数据');
  52. return $info;
  53. }
  54. /**
  55. * 服务协议
  56. */
  57. public function agreement(){
  58. return $this->fetch();
  59. }
  60. }