title = '溯源'; $id = input('id'); $original_id = input('original_id'); if($original_id > 0){ $list = Db::table('goods_collect') ->alias('i') ->field('i.*,m.name as user_name,m.headimg,m.phone') ->join('store_member m','m.id = i.user_id','LEFT') ->where('original_id|i.id',$original_id) ->order('i.id asc')->select(); }else{ $list = Db::table('goods_collect') ->alias('i') ->field('i.*,m.name as user_name,m.headimg,m.phone') ->join('store_member m','m.id = i.user_id','LEFT') ->where('i.id',$id) ->order('i.id asc')->select(); } $this->assign('list',$list); $this->fetch('index'); } /** * 数据列表处理 * @auth true * @menu true * @param array $data * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\ModelNotFoundException * @throws \think\exception\DbException */ protected function _index_page_filter(&$data) { } //删除货主 public function remove() { $this->_save($this->table, ['status' => '3']); } public function edit(){ $this->title = '编辑'; $this->_form($this->table, 'form'); } protected function _form_filter(&$data) { } }