About.php 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  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. 'pricing',
  46. 'contact',
  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. // 主获取页主介绍.
  54. $getIndexIntroduceSlt = ['product_ctitle'];
  55. $getIndexIntroduceWhr['product_type'] = 1;
  56. $getIndexIntroduce = model('Product')->getSelect($getIndexIntroduceSlt, $getIndexIntroduceWhr);
  57. $getIndexIntroduceArr = explode("@#", $getIndexIntroduce[0]['product_ctitle']);
  58. $this->assign('indexIntroduceArr', $getIndexIntroduceArr);
  59. // 获取服务.
  60. $getServiceSlt = [
  61. 'product_ctitle',
  62. 'product_title',
  63. ];
  64. $getServiceWhr['product_type'] = 2;
  65. $getService = model('Product')->getSelect($getServiceSlt, $getServiceWhr);
  66. $this->assign('service', $getService);
  67. // 获取解决方案.
  68. $getSolutionSlt = ['product_title'];
  69. $getSolutionWhr['product_type'] = 4;
  70. $getSolution = model('Product')->getSelect($getSolutionSlt, $getSolutionWhr);
  71. $this->assign('solution', $getSolution);
  72. // 获取案例展示.
  73. $getCaseSlt = [
  74. 'product_title',
  75. 'product_ctitle',
  76. ];
  77. $getCaseWhr['product_type'] = 3;
  78. $getCase = model('Product')->getSelect($getCaseSlt, $getCaseWhr);
  79. $this->assign('case', $getCase);
  80. // 合作流程.
  81. $getCooperationProcessSlt = ['product_title'];
  82. $getCooperationProcessWhr['product_type'] = 7;
  83. $getCooperationProcess = model('Product')->getSelect($getCooperationProcessSlt, $getCooperationProcessWhr);
  84. $this->assign('cooperationProcess', $getCooperationProcess);
  85. // 获取foot.
  86. $getFootSlt = [
  87. 'value',
  88. 'remark',
  89. ];
  90. $getFootWhr = [
  91. ['code' => 'site_phone'],
  92. ['code' => 'site_email'],
  93. ['code' => 'fax'],
  94. ];
  95. $getFoot = model('Config')->getSelect($getFootSlt, $getFootWhr);
  96. $this->assign('foot', $getFoot);
  97. return $this->fetch();
  98. }//end index()
  99. }