47 lines
1.0 KiB
PHP
Executable File
47 lines
1.0 KiB
PHP
Executable File
<?php
|
|
|
|
namespace Home\Controller;
|
|
|
|
use Gy_Library\DBCont;
|
|
use Gy_Library\HomeController;
|
|
|
|
class UsController extends HomeController
|
|
{
|
|
|
|
public function aboutUs()
|
|
{
|
|
|
|
$id = I('get.id');
|
|
|
|
$this->meta_title = '关于我们';
|
|
//分享标题
|
|
$this->share_title = '关于我们';
|
|
$model = D('AboutUs');
|
|
$map['status'] = DBCont::YES_BOOL_STATUS;
|
|
$list = $model->where($map)->order('sort asc, id desc')->select();
|
|
|
|
if(!empty($id)) {
|
|
$search['status'] = DBCont::YES_BOOL_STATUS;
|
|
$search['id'] = $id;
|
|
$acticleId = $id;
|
|
$detail = $model->where($search)->find();
|
|
} else {
|
|
$detail = $list[0];
|
|
$acticleId = $list[0]['id'];
|
|
}
|
|
|
|
|
|
$this->list =$list;
|
|
$this->detail = $detail;
|
|
$this->acticleId = $acticleId;
|
|
//分享标题
|
|
$this->share_title=$detail['title'];
|
|
$this->share_link=U('',['id'=>$id],true,true);
|
|
|
|
$this->display();
|
|
|
|
}
|
|
|
|
|
|
}
|