<?php

namespace app\home\controller;

use think\Lang;
use think\Cache;
use think\Request;
use think\Controller;
use think\Validate;

/**
 * 关于我们类
 */
class About extends Controller
{


    /**
     * 构造函数
     *
     * @access public
     */
    public function __construct()
    {
        parent::__construct();

    }//end __construct()


    /**
     * 关于我们管理
     *
     * @access public
     * @return array JsonString
     */
    public function index()
    {
        // 获取导航.
        $navigationField = [
            'navigation_zhName',
            'navigation_enName',
            'navigation_id',
        ];
        $navigationWhere = ['navigation_type' => 1];
        $getNavigation = model('Navigation')->getSelect($navigationField, $navigationWhere);
        $this->assign('navigation', $getNavigation);
        // 导航Id.
        $navigationId = [
            'home',
            'service',
            'count',
            'about-us',
            'contact',
            'pricing',
        ];
        $this->assign('navigationId', $navigationId);
        // 获取未显示在导航的标题.
        $navigationWhere = ['navigation_type' => 2];
        $getNavigation = model('Navigation')->getSelect($navigationField, $navigationWhere);
        $this->assign('navigationTitle', $getNavigation);
        // 获取文字内容.
        $getAboutSlt = [
            'product_title',
            'product_ctitle',
        ];
        $getAboutWhr['product_type'] = 6;
        $getAbout = model('Product')->getSelect($getAboutSlt, $getAboutWhr);
        $this->assign('about', $getAbout);
        // 获取foot.
        $getFootSlt = [
            'value',
            'remark',
        ];
        $getFootWhr = [
            ['code' => 'site_phone'],
            ['code' => 'site_email'],
            ['code' => 'fax'],
        ];
        $getFoot = model('Config')->getSelect($getFootSlt, $getFootWhr);
        $this->assign('foot', $getFoot);

        return $this->fetch();

    }//end index()


}
