About.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <?php
  2. namespace app\home\controller;
  3. use think\Lang;
  4. use think\Cache;
  5. use think\Request;
  6. use think\Controller;
  7. use think\Validate;
  8. /**
  9. * 关于我们类
  10. */
  11. class About extends Controller
  12. {
  13. /**
  14. * 构造函数
  15. *
  16. * @access public
  17. */
  18. public function __construct()
  19. {
  20. parent::__construct();
  21. }//end __construct()
  22. /**
  23. * 关于我们管理
  24. *
  25. * @access public
  26. * @return array JsonString
  27. */
  28. public function index()
  29. {
  30. // 获取导航.
  31. $navigationField = [
  32. 'navigation_zhName',
  33. 'navigation_enName',
  34. 'navigation_id',
  35. ];
  36. $navigationWhere = ['navigation_type' => 1];
  37. $getNavigation = model('Navigation')->getSelect($navigationField, $navigationWhere);
  38. $this->assign('navigation', $getNavigation);
  39. // 导航Id.
  40. $navigationId = [
  41. 'home',
  42. 'service',
  43. 'count',
  44. 'about-us',
  45. 'contact',
  46. 'pricing',
  47. ];
  48. $this->assign('navigationId', $navigationId);
  49. // 获取未显示在导航的标题.
  50. $navigationWhere = ['navigation_type' => 2];
  51. $getNavigation = model('Navigation')->getSelect($navigationField, $navigationWhere);
  52. $this->assign('navigationTitle', $getNavigation);
  53. // 获取foot.
  54. $getFootSlt = [
  55. 'value',
  56. 'remark',
  57. ];
  58. $getFootWhr = [
  59. ['code' => 'site_phone'],
  60. ['code' => 'site_email'],
  61. ['code' => 'fax'],
  62. ];
  63. $getFoot = model('Config')->getSelect($getFootSlt, $getFootWhr);
  64. $this->assign('foot', $getFoot);
  65. return $this->fetch();
  66. }//end index()
  67. }