正在显示
1 个修改的文件
包含
10 行增加
和
0 行删除
@@ -276,6 +276,7 @@ class Create extends Api | @@ -276,6 +276,7 @@ class Create extends Api | ||
276 | * @ApiRoute (/api/create/publish_note) | 276 | * @ApiRoute (/api/create/publish_note) |
277 | * | 277 | * |
278 | * @ApiHeaders (name=token, type=string, required=true, description="请求的Token") | 278 | * @ApiHeaders (name=token, type=string, required=true, description="请求的Token") |
279 | + * @ApiParams (name="content_video", type="string", required=false, description="笔记中的视频") | ||
279 | * @ApiParams (name="content", type="string", required=true, description="笔记内容") | 280 | * @ApiParams (name="content", type="string", required=true, description="笔记内容") |
280 | * @ApiParams (name="folder_id", type="inter", required=true, description="存储位置id 首页为0") | 281 | * @ApiParams (name="folder_id", type="inter", required=true, description="存储位置id 首页为0") |
281 | * | 282 | * |
@@ -309,12 +310,14 @@ class Create extends Api | @@ -309,12 +310,14 @@ class Create extends Api | ||
309 | if(empty($content)){ | 310 | if(empty($content)){ |
310 | $this->error('缺少必要参数'); | 311 | $this->error('缺少必要参数'); |
311 | } | 312 | } |
313 | + $content_video = $this->request->param('content_video'); | ||
312 | 314 | ||
313 | //添加发布的文件数据表 | 315 | //添加发布的文件数据表 |
314 | $res['user_id'] = $user_id; | 316 | $res['user_id'] = $user_id; |
315 | $res['type'] = 1; | 317 | $res['type'] = 1; |
316 | $res['name'] = date('YmdHis'); | 318 | $res['name'] = date('YmdHis'); |
317 | $res['folder_id'] = $folder_id; | 319 | $res['folder_id'] = $folder_id; |
320 | + $res['content_video'] = $content_video; | ||
318 | $res['content'] = $content; | 321 | $res['content'] = $content; |
319 | $res['createtime'] = time(); | 322 | $res['createtime'] = time(); |
320 | $res['updatetime'] = time(); | 323 | $res['updatetime'] = time(); |
@@ -445,6 +448,7 @@ class Create extends Api | @@ -445,6 +448,7 @@ class Create extends Api | ||
445 | "name": //文件名称, | 448 | "name": //文件名称, |
446 | "images": //图片, | 449 | "images": //图片, |
447 | "video": //视频, | 450 | "video": //视频, |
451 | + "content_vidoe"://笔记视频 | ||
448 | "content": //笔记内容, | 452 | "content": //笔记内容, |
449 | "is_open": //是否公开1公开2私密, | 453 | "is_open": //是否公开1公开2私密, |
450 | "is_up": //是否上架1上架2下架, | 454 | "is_up": //是否上架1上架2下架, |
@@ -487,6 +491,9 @@ class Create extends Api | @@ -487,6 +491,9 @@ class Create extends Api | ||
487 | $v = $qiniu.$v; | 491 | $v = $qiniu.$v; |
488 | } | 492 | } |
489 | } | 493 | } |
494 | + if(!empty($data['content_video'])){ | ||
495 | + $data['content_video'] = $qiniu.$data['content_video']; | ||
496 | + } | ||
490 | if(!empty($data['content'])){ | 497 | if(!empty($data['content'])){ |
491 | $data['images'] = ''; | 498 | $data['images'] = ''; |
492 | $data['video'] = ''; | 499 | $data['video'] = ''; |
@@ -524,6 +531,7 @@ class Create extends Api | @@ -524,6 +531,7 @@ class Create extends Api | ||
524 | * @ApiHeaders (name=token, type=string, required=true, description="请求的Token") | 531 | * @ApiHeaders (name=token, type=string, required=true, description="请求的Token") |
525 | * @ApiParams (name="id", type="inter", required=true, description="文件id") | 532 | * @ApiParams (name="id", type="inter", required=true, description="文件id") |
526 | * @ApiParams (name="content", type="string", required=true, description="笔记内容") | 533 | * @ApiParams (name="content", type="string", required=true, description="笔记内容") |
534 | + * @ApiParams (name="content_video", type="string", required=false, description="笔记中的视频") | ||
527 | * @ApiParams (name="folder_id", type="inter", required=true, description="存储位置id 首页为0") | 535 | * @ApiParams (name="folder_id", type="inter", required=true, description="存储位置id 首页为0") |
528 | * | 536 | * |
529 | * @ApiReturn({ | 537 | * @ApiReturn({ |
@@ -552,6 +560,7 @@ class Create extends Api | @@ -552,6 +560,7 @@ class Create extends Api | ||
552 | if(empty($content)){ | 560 | if(empty($content)){ |
553 | $this->error('缺少必要参数'); | 561 | $this->error('缺少必要参数'); |
554 | } | 562 | } |
563 | + $content_vdieo = $this->request->param('content_video'); | ||
555 | 564 | ||
556 | $id = $this->request->param('id'); | 565 | $id = $this->request->param('id'); |
557 | 566 | ||
@@ -561,6 +570,7 @@ class Create extends Api | @@ -561,6 +570,7 @@ class Create extends Api | ||
561 | $res['name'] = date('YmdHis'); | 570 | $res['name'] = date('YmdHis'); |
562 | $res['folder_id'] = $folder_id; | 571 | $res['folder_id'] = $folder_id; |
563 | $res['content'] = $content; | 572 | $res['content'] = $content; |
573 | + $res['content_video'] = $content_vdieo; | ||
564 | $res['updatetime'] = time(); | 574 | $res['updatetime'] = time(); |
565 | $data = Db::name('savemes')->where('id',$id)->update($res); | 575 | $data = Db::name('savemes')->where('id',$id)->update($res); |
566 | if(empty($data)){ | 576 | if(empty($data)){ |
-
请 注册 或 登录 后发表评论