repository = $repository; $this->source = $this->request->header('source'); $this->merId = $this->request->header('merId'); } /** * @return mixed * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException * @author Qinii */ public function lst() { $id = $this->request->param('id') ?? 0; $where['status']=1; if($this->source=='yhc'){ $where['mer_id']=$this->merId; }else{ $where['mer_id']=0; $where['pid']=$id; } return app('json')->success($this->repository->apiGetArtcleCategory($where)); } }