where('company_id',$this->auth->company_id) ->order('id' , 'asc') ->select(); if(!empty($list)){ $list = list_domain_image($list,['image']); $info['createtime'] = $list[count($list)-1]['updatetime']; } $rs = [ 'info' => $info, 'list' => $list ]; $this->success(1, $rs); } //操作规范 public function lists(){ $logo_id = input('logo_id',0); $logo_title = Db::name('tiaoshiweixiu_logo') ->where('id',$logo_id)->value('title'); $info['title'] = $logo_title.':消防产品接线调试技术指导汇总'; $info['createtime'] = time(); // $list = Db::name('tiaoshiweixiu')->field('content',true) ->where('company_id',$this->auth->company_id) ->where('logo_id',$logo_id) ->select(); if(!empty($list)){ foreach($list as $key => $val){ $list[$key]['title'] = $logo_title.':'.$val['title']; } $info['createtime'] = $list[count($list)-1]['updatetime']; } $rs = [ 'info' => $info, 'list' => $list, ]; $this->success(1, $rs); } //详情 public function info(){ $id = input('id',0); $info = Db::name('tiaoshiweixiu') ->where('id',$id) ->find(); $logo_title = Db::name('tiaoshiweixiu_logo') ->where('id',$info['logo_id'])->value('title'); $info['title'] = $logo_title.':'.$info['title']; $this->success(1, $info); } }