...
|
...
|
@@ -276,6 +276,7 @@ class Create extends Api |
|
|
* @ApiRoute (/api/create/publish_note)
|
|
|
*
|
|
|
* @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
|
|
|
* @ApiParams (name="content_video", type="string", required=false, description="笔记中的视频")
|
|
|
* @ApiParams (name="content", type="string", required=true, description="笔记内容")
|
|
|
* @ApiParams (name="folder_id", type="inter", required=true, description="存储位置id 首页为0")
|
|
|
*
|
...
|
...
|
@@ -309,12 +310,14 @@ class Create extends Api |
|
|
if(empty($content)){
|
|
|
$this->error('缺少必要参数');
|
|
|
}
|
|
|
$content_video = $this->request->param('content_video');
|
|
|
|
|
|
//添加发布的文件数据表
|
|
|
$res['user_id'] = $user_id;
|
|
|
$res['type'] = 1;
|
|
|
$res['name'] = date('YmdHis');
|
|
|
$res['folder_id'] = $folder_id;
|
|
|
$res['content_video'] = $content_video;
|
|
|
$res['content'] = $content;
|
|
|
$res['createtime'] = time();
|
|
|
$res['updatetime'] = time();
|
...
|
...
|
@@ -445,6 +448,7 @@ class Create extends Api |
|
|
"name": //文件名称,
|
|
|
"images": //图片,
|
|
|
"video": //视频,
|
|
|
"content_vidoe"://笔记视频
|
|
|
"content": //笔记内容,
|
|
|
"is_open": //是否公开1公开2私密,
|
|
|
"is_up": //是否上架1上架2下架,
|
...
|
...
|
@@ -487,6 +491,9 @@ class Create extends Api |
|
|
$v = $qiniu.$v;
|
|
|
}
|
|
|
}
|
|
|
if(!empty($data['content_video'])){
|
|
|
$data['content_video'] = $qiniu.$data['content_video'];
|
|
|
}
|
|
|
if(!empty($data['content'])){
|
|
|
$data['images'] = '';
|
|
|
$data['video'] = '';
|
...
|
...
|
@@ -524,6 +531,7 @@ class Create extends Api |
|
|
* @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
|
|
|
* @ApiParams (name="id", type="inter", required=true, description="文件id")
|
|
|
* @ApiParams (name="content", type="string", required=true, description="笔记内容")
|
|
|
* @ApiParams (name="content_video", type="string", required=false, description="笔记中的视频")
|
|
|
* @ApiParams (name="folder_id", type="inter", required=true, description="存储位置id 首页为0")
|
|
|
*
|
|
|
* @ApiReturn({
|
...
|
...
|
@@ -552,6 +560,7 @@ class Create extends Api |
|
|
if(empty($content)){
|
|
|
$this->error('缺少必要参数');
|
|
|
}
|
|
|
$content_vdieo = $this->request->param('content_video');
|
|
|
|
|
|
$id = $this->request->param('id');
|
|
|
|
...
|
...
|
@@ -561,6 +570,7 @@ class Create extends Api |
|
|
$res['name'] = date('YmdHis');
|
|
|
$res['folder_id'] = $folder_id;
|
|
|
$res['content'] = $content;
|
|
|
$res['content_video'] = $content_vdieo;
|
|
|
$res['updatetime'] = time();
|
|
|
$data = Db::name('savemes')->where('id',$id)->update($res);
|
|
|
if(empty($data)){
|
...
|
...
|
|