| xqd
@@ -306,24 +306,24 @@ class IndexController extends Controller
|
|
|
* @apiParam {string} keyword 关键字
|
|
|
* @apiSuccessExample {json} Success-Response:
|
|
|
* HTTP/1.1 200 OK
|
|
|
- {
|
|
|
- "status": true,
|
|
|
- "status_code": 0,
|
|
|
- "message": "",
|
|
|
- "data": {
|
|
|
- "data": [
|
|
|
- {
|
|
|
- "dream": "haha", 梦想名
|
|
|
- "user_pic": [
|
|
|
- {
|
|
|
- "pic": "", 用户头像
|
|
|
- }
|
|
|
- ],
|
|
|
- "dream_img": "", 梦想图片
|
|
|
- }
|
|
|
- ]
|
|
|
- }
|
|
|
- }
|
|
|
+ *{
|
|
|
+ * "status": true,
|
|
|
+ * "status_code": 0,
|
|
|
+ * "message": "",
|
|
|
+ * "data": {
|
|
|
+ * "data": [
|
|
|
+ * {
|
|
|
+ * "dream": "haha", 梦想名
|
|
|
+ * "user_pic": [
|
|
|
+ * {
|
|
|
+ * "pic": "", 用户头像
|
|
|
+ * }
|
|
|
+ * ],
|
|
|
+ * "dream_img": "", 梦想图片
|
|
|
+ * }
|
|
|
+ * ]
|
|
|
+ * }
|
|
|
+ *}
|
|
|
* @apiErrorExample {json} Error-Response:
|
|
|
* HTTP/1.1 400 Bad Request
|
|
|
*/
|
| xqd
@@ -372,37 +372,46 @@ class IndexController extends Controller
|
|
|
* @apiParam {int} id 被点击用户ID
|
|
|
* @apiSuccessExample {json} Success-Response:
|
|
|
* HTTP/1.1 200 OK
|
|
|
- {
|
|
|
- "status": true,
|
|
|
- "status_code": 0,
|
|
|
- "message": "",
|
|
|
- "data": [
|
|
|
- {
|
|
|
- "id": 12,
|
|
|
- "dream": "123",
|
|
|
- "about": "124",
|
|
|
- "sign": null,
|
|
|
- "videos": "234",
|
|
|
- "money": 2345,
|
|
|
- "time": 0, 倒计时 s
|
|
|
- "get_money": 0,
|
|
|
- "mark": 0,
|
|
|
- "status": 0,
|
|
|
- "score": 3,
|
|
|
- "created_at": "2017-06-15 08:46:52",
|
|
|
- "updated_at": "2017-06-15 08:46:52",
|
|
|
- "deleted_at": null,
|
|
|
- "imgs": [
|
|
|
- {
|
|
|
- "id": 8,
|
|
|
- "dream_id": 12,
|
|
|
- "title": "",
|
|
|
- "pic": "....png", 梦想图片
|
|
|
- },
|
|
|
- ],
|
|
|
- }
|
|
|
- ]
|
|
|
- }
|
|
|
+ *{
|
|
|
+ * "status": true,
|
|
|
+ * "status_code": 0,
|
|
|
+ * "message": "",
|
|
|
+ * "data": [
|
|
|
+ * {
|
|
|
+ * "dream": "1的梦想",
|
|
|
+ * "about": "介绍",
|
|
|
+ * "video": "",
|
|
|
+ * "time": 0,
|
|
|
+ * "status": 0,
|
|
|
+ * "updated_at": null,
|
|
|
+ * "dream_imgs": [
|
|
|
+ * {
|
|
|
+ * "title": "1", 梦想图片介绍
|
|
|
+ * "pic": "111", 梦想图片
|
|
|
+ * },
|
|
|
+ * ],
|
|
|
+ * "comments": [
|
|
|
+ * {
|
|
|
+ * "user_id": 2,
|
|
|
+ * "level": 0,
|
|
|
+ * "content": "评论内容", 评论内容
|
|
|
+ * "updated_at": null,
|
|
|
+ * "pic": "", 评论者头像
|
|
|
+ * "replay": [
|
|
|
+ * {
|
|
|
+ * "level": 0,
|
|
|
+ * "content": "回复内容", 回复内容
|
|
|
+ * "updated_at": null,
|
|
|
+ * "pic": "" 回复者头像
|
|
|
+ * }
|
|
|
+ * ]
|
|
|
+ * }
|
|
|
+ * ],
|
|
|
+ * }
|
|
|
+ * ]
|
|
|
+ * }
|
|
|
+ * ]
|
|
|
+ *}
|
|
|
* @apiErrorExample {json} Error-Response:
|
|
|
* HTTP/1.1 400 Bad Request
|
|
|
*/
|
| xqd
@@ -415,7 +424,15 @@ class IndexController extends Controller
|
|
|
UserCareUser::where('user_id',$user->id)->where('other_user_id',$other_id)->update(['dream_num'=>0]);
|
|
|
$data = UserInfoModel::find($other_id)->UserDream;
|
|
|
foreach ($data as $item) {
|
|
|
- $item->imgs = $item->dreamImgs ;
|
|
|
+ $item->dream_imgs = $item->dreamImgs ;
|
|
|
+ $item->comments = $item->DreamInfo;
|
|
|
+ foreach ( $item->comments as $k => $v){
|
|
|
+ $v->pic = UserInfoModel::find($v->user_id)->pic;
|
|
|
+ $v->replay = $v->replay;
|
|
|
+ foreach ($v->replay as $k1 => $v1){
|
|
|
+ $v1->pic = UserInfoModel::find($v1->user_id)->pic;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
return $this->api($data);
|
|
|
}
|