| xqd
@@ -364,6 +364,7 @@ class MyController extends Controller
|
|
|
* @api {post} /api/my/add_dream 发布梦想(addDream)
|
|
|
* @apiDescription 发布梦想(addDream)
|
|
|
* @apiParam {string} pic 梦想图片 数组
|
|
|
+ * @apiParam {string} videos 梦想视频
|
|
|
* @apiParam {string} dream 梦想标题
|
|
|
* @apiParam {string} about 梦想介绍
|
|
|
* @apiParam {int} money 梦想币
|
| xqd
@@ -416,7 +417,8 @@ class MyController extends Controller
|
|
|
$data1['created_at'] = date('Y-m-d H:i:s');
|
|
|
$data1['updated_at'] = date('Y-m-d H:i:s');
|
|
|
$arr = $request->pic;
|
|
|
- if (empty($arr)) return $this->error(ErrorCode::ATTACHMENT_NOT_EXIST);
|
|
|
+ $videos = $request->videos;
|
|
|
+ if (empty($arr) && empty($videos)) return $this->error(ErrorCode::ATTACHMENT_NOT_EXIST);
|
|
|
$ok = UserDream::create($data1);
|
|
|
$arr1 = [];
|
|
|
if ($ok) {
|