作者 何书鹏
1 个管道 的构建 通过 耗费 6 秒

获取笔记

... ... @@ -667,4 +667,30 @@ class Almighty extends Api
$this->error($response['err_msg'],null,$response['err_no']);
}
}
/**
* @ApiTitle (全能题库-获取笔记)
* @ApiSummary (全能题库-获取笔记)
* @ApiMethod (POST)
*
* @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
*
* @ApiParams (name="question_id", type="int", required=true, description="题目ID")
*
* @ApiReturn({
"code": 1,
"msg": "成功",
"time": "1599032660",
"data": {
"note": '笔记内容'
}
})
*/
public function getNote()
{
$question_id = $this->request->param('question_id');
empty($question_id) && $this->error('缺少必要参数');
$note = QuestionNote::where(['question_id'=>$question_id,'user_id'=>$this->auth->id])->value('content');
$this->success('添加笔记成功',compact('note'));
}
}
\ No newline at end of file
... ...
此 diff 太大无法显示。