model) { $this->model = new \app\common\Model\SourceLink(); } } /** * 删除资源 * @return void * @throws \Exception */ public function delete() { $code = Request::post('sourceCode'); if (!$code) { $this->error("资源不存在"); } $this->model->deleteSource($code); $this->success(''); } }