ContactController.php
1.3 KB
<?php
// +----------------------------------------------------------------------
// | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013-2019 http://www.thinkcmf.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: 老猫 <thinkcmf@126.com>
// +----------------------------------------------------------------------
namespace app\portal\controller;
use cmf\controller\HomeBaseController;
use think\Db;
class ContactController extends HomeBaseController
{
//联系我们
//联系我们详情
public function contactDetail(){
$language = $this->request->param('language');
if(isset($language) && !empty($language)){
//英文
$field_contact = 'id,company_name_en,address_en,mobile,phone,wx,email';
}else{
//中文
$field_contact = 'id,company_name,address,mobile,phone,wx,email';
}
$res = CommonController::findData('contact',['id'=>1],$field_contact);
$this->assign('res',$res);
return $this->fetch();
}
}