作者 潘浩文
1 个管道 的构建 通过 耗费 1 秒

个人中心页面渲染

... ... @@ -61,7 +61,7 @@ class AdminLightController extends AdminBaseController
->join('temple t', 'l.temple_id=t.id','left')
->join('temple_area ta', 'l.area_id=ta.id','left')
->where($where)
->field('l.*,t.address,t.name as tname,ta.name as taname,ta.light')
->field('l.*,t.address as taddress,t.name as tname,ta.name as taname,ta.light')
->order('l.create_time', 'desc')
->paginate('10');
//向地址传参
... ... @@ -82,7 +82,7 @@ class AdminLightController extends AdminBaseController
->join('temple t', 'l.temple_id=t.id','left')
->join('temple_area ta', 'l.area_id=ta.id','left')
->where('l.temple_id', $id)
->field('l.*,t.address,t.name as tname,ta.name as taname,ta.light')
->field('l.*,t.address as taddress,t.name as tname,ta.name as taname,ta.light')
->order('l.create_time', 'desc')
->paginate('10');
$this->assign('page', $data->render());
... ...
... ... @@ -34,6 +34,9 @@ class AdminTempleAreaController extends AdminBaseController
$param = $this->request->param();
//添加搜索条件
$where=[];
if (cmf_get_current_admin_id()!=1){
$where['t.user_id']=cmf_get_current_admin_id();
};
$keyword = empty($param['keyword']) ? '' : $param['keyword'];
if (!empty($keyword)) {
$where['ta.name'] = ['like', "%$keyword%"];
... ...
... ... @@ -10,7 +10,7 @@
// [ 入口文件 ]
ini_set('display_errors','on');
// 调试模式开关
define("APP_DEBUG", true);
define("APP_DEBUG", false);
// 定义CMF根目录,可更改此目录
define('CMF_ROOT', __DIR__ . '/../');
... ...
... ... @@ -53,7 +53,7 @@
<eq name="vo.status" value="1">正常</eq>
<eq name="vo.status" value="2">故障</eq>
</td>
<td>{$vo.address}</td>
<td>{$vo.taddress}</td>
<td>{$vo.tname}</td>
<td>{$vo.taname}</td>
<td>
... ...
... ... @@ -40,7 +40,7 @@
<eq name="vo.status" value="1">正常</eq>
<eq name="vo.status" value="2">故障</eq>
</td>
<td>{$vo.address}</td>
<td>{$vo.taddress}</td>
<td>{$vo.tname}</td>
<td>{$vo.taname}</td>
<td>
... ...