gq 8 年之前
父节点
当前提交
fc77fccf8d
共有 2 个文件被更改,包括 198 次插入216 次删除
  1. 103 122
      server/app/Http/Controllers/Api/V1/HomeController.php
  2. 95 94
      server/app/Http/Controllers/Api/V1/MyController.php

+ 103 - 122
server/app/Http/Controllers/Api/V1/HomeController.php

@@ -24,50 +24,31 @@ class HomeController extends Controller
      * @apiSuccessExample {json} Success-Response:
      * @apiSuccessExample {json} Success-Response:
      * HTTP/1.1 200 OK
      * HTTP/1.1 200 OK
      * {
      * {
-     * "nickname": "",  名字
-     * "pic": "",   头像
-     *"tall": "",  身高
-     *"job": "",  职业
-     *"emotion": "1",  情感
-     * "address": "",地址
-     * "score": 1000,  支持分
-     * "care": 4,  关注
-     * "fens": 3,   粉丝
-     * "user_dream": [
-     *{
-     * "id": 2,
-     * "dream": "去旅游去旅游2",
-     * "about": "欧冠胡234",
-     * "money": 200,
-     * "time": 0,
-     * "get_money": 0,
-     * "dream_imgs": [
-     *  {
-     * {
-     * "id": 3,
-     *"dream": "3去旅游",
-     *"about": "",
-     * "money": 0,
-     *"time": 0,
-     * "get_money": 0,
-     * "mark": 0,
-     * "status": 0,
-     *  "created_at": null,
-     * "updated_at": null,
-     * "deleted_at": null,
-     *  "pic": [],
-     *  "pivot": {
-     *"user_id": 1,
-     * "dream_id": 3
-     * },
-     * "dream_imgs": []
-     *  },
-     * "near_dream_pic": [
-     * {
-     * "pic": "234"
-     *  },
+     *  "nickname": "",  名字
+     *  "pic": "",   头像
+     *  "tall": "",  身高
+     *  "job": "",  职业
+     *  "emotion": "1",  情感
+     *  "address": "",地址
+     *  "score": 1000,  支持分
+     *  "care": 4,  关注
+     *  "fens": 3,   粉丝
+     *  "user_dream": [
+     *      "id": 3,
+     *      "dream": "3去旅游",
+     *      "about": "",
+     *      "money": 0,
+     *      "time": 0,
+     *      "get_money": 0,
+     *      "mark": 0,
+     *      "status": 0,
+     *      "pic": [],
+     *      "dream_imgs": []
+     *      "near_dream_pic": [
+     *          {
+     *              "pic": "234"
+     *          },
      *    ]
      *    ]
-      * }
      *  }
      *  }
      * @apiErrorExample {json} Error-Response:
      * @apiErrorExample {json} Error-Response:
      *HTTP/1.1 400 Bad Request
      *HTTP/1.1 400 Bad Request
@@ -128,10 +109,10 @@ class HomeController extends Controller
      * @apiSuccessExample {json} Success-Response:
      * @apiSuccessExample {json} Success-Response:
      * HTTP/1.1 200 OK
      * HTTP/1.1 200 OK
      *{
      *{
-     * "status": true,
-     * "status_code": 0,
-     *"message": "",
-     *"data": ""
+     *      "status": true,
+     *      "status_code": 0,
+     *      "message": "",
+     *      "data": ""
      *}
      *}
      * @apiErrorExample {json} Error-Response:
      * @apiErrorExample {json} Error-Response:
      *HTTP/1.1 400 Bad Request
      *HTTP/1.1 400 Bad Request
@@ -143,11 +124,11 @@ class HomeController extends Controller
      * }
      * }
      *  可能出现的代码
      *  可能出现的代码
      * {
      * {
-    *"status": false,
-    *"status_code": 1303,
-    *"message": "商户余额不足",
-   * "data": null
-  *  }
+    *       "status": false,
+    *       "status_code": 1303,
+    *       "message": "商户余额不足",
+    *       "data": null
+    *  }
      *
      *
      */
      */
     public function support(Request $request)
     public function support(Request $request)
@@ -200,72 +181,72 @@ class HomeController extends Controller
      * @apiSuccessExample {json} Success-Response:
      * @apiSuccessExample {json} Success-Response:
      * HTTP/1.1 200 OK
      * HTTP/1.1 200 OK
      * {
      * {
-     * *"status": true,
-     * "status_code": 0,
-     *"message": "",
-     * "data": {
-     * 评论的梦想
-     * "dream1": [
-     * {
-     * "dream": "1的梦想",
-     * "about": "介绍",
-     *"pic": [
-     * {
-     * "pic": "111",
-     * }
-     * ],
-     *  "user": [
-     *{
-     * "pic": "",
-     *],
-     * "comments": [
-     * {
-     * "level": 0,
-     * "content": "EST",
-     * "created_at": "2017-04-27 12:17:20",
-     * }
-     * ],
-     *  * 回复的梦想
-     *  "dream2": [
-     *  {
-     ** "level": 0,
-     *"content": "EST",
-     * "created_at": "2017-04-27 12:17:20",
-     * "updated_at": null,
-     * "deleted_at": null,
-     * "reply_dream": {
-     *  * "dream": "1的梦想",
-     * "about": "介绍",
-     *"time": 0,
-     * "dream_imgs": [
-     *  {
-     *  "pic": "111",
-     *  },
-     *  ]
-     *  },
-     * "reply_dream_pic": [
-     * {
-     * "pic": "111",
-     *  }
-     *  ],
-     *  "reply_created_at": {
-     * "date": "2017-06-13 02:26:31.000000",
-     * "timezone_type": 3,
-     *  "timezone": "UTC"
-     *  },
-     *  "reply_content": "haha",
-     * "reply_level": 0,
-     *   "dream": {
-     * "dream": "1的梦想",
-     * "about": "介绍",
-     * "money": 5000,
-     * "time": 0,
-     * "dream_imgs": [
-     * {
-     * "pic": "111",
-     * },
-     * ]
-     * }
+     *      "status": true,
+     *      "status_code": 0,
+     *      "message": "",
+     *      "data": {
+     *          评论的梦想
+     *          "dream1": [
+     *              {
+     *                  "dream": "1的梦想",
+     *                  "about": "介绍",
+     *                  "pic": [
+     *                      {
+     *                          "pic": "111",
+     *                      }
+     *          ],
+     *      "user": [
+     *          {
+     *              "pic": "",
+     *       ],
+     *       "comments": [
+     *           {
+     *              "level": 0,
+     *              "content": "EST",
+     *              "created_at": "2017-04-27 12:17:20",
+     *           }
+     *        ],
+     *       回复的梦想
+     *           "dream2": [
+     *               {
+     *                 "level": 0,
+     *                  "content": "EST",
+     *                  "created_at": "2017-04-27 12:17:20",
+     *                  "updated_at": null,
+     *                  "deleted_at": null,
+     *                  "reply_dream": {
+     *                      "dream": "1的梦想",
+     *                      "about": "介绍",
+     *                      "time": 0,
+     *                      "dream_imgs": [
+     *                          {
+     *                              "pic": "111",
+     *                          },
+     *              ]
+     *       },
+     *      "reply_dream_pic": [
+     *          {
+     *              "pic": "111",
+     *          }
+     *       ],
+     *      "reply_created_at": {
+     *           "date": "2017-06-13 02:26:31.000000",
+     *          "timezone_type": 3,
+     *          "timezone": "UTC"
+     *      },
+     *      "reply_content": "haha",
+     *      "reply_level": 0,
+     *      "dream": {
+     *          "dream": "1的梦想",
+     *          "about": "介绍",
+     *          "money": 5000,
+     *          "time": 0,
+     *          "dream_imgs": [
+     *              {
+     *                  "pic": "111",
+     *              },
+     *          ]
+     *       }
      *   }
      *   }
      *  ]
      *  ]
      *  }
      *  }
@@ -273,10 +254,10 @@ class HomeController extends Controller
      * @apiErrorExample {json} Error-Response:
      * @apiErrorExample {json} Error-Response:
      *HTTP/1.1 400 Bad Request
      *HTTP/1.1 400 Bad Request
      * {
      * {
-     * "status": false,
-     * "status_code": 1500,
-     * "message": "会员不存在",
-     * "data": null
+     *       "status": false,
+     *      "status_code": 1500,
+     *      "message": "会员不存在",
+     *      "data": null
      * }
      * }
      */
      */
     public function interaction(Request $request)
     public function interaction(Request $request)

+ 95 - 94
server/app/Http/Controllers/Api/V1/MyController.php

@@ -81,33 +81,33 @@ class MyController extends Controller
      * @apiSuccessExample {json} Success-Response:
      * @apiSuccessExample {json} Success-Response:
      * HTTP/1.1 200 OK
      * HTTP/1.1 200 OK
      *{
      *{
-         *"status": true,
-         *"status_code": 0,
-         *"message": "",
-         *"data": {
-             *"user": {
-                 *  "id": 1,
-                 *  "tel": "13880642880",手机
-                 *  "nickname": "",昵称
-                 *  "sex": 1,性别
-                 *  "job": "", 职业
-                 *  "emotion": 1,情感状态
-                 *  "address": "",
-                 *  "detail_address": "",
-                 *  "status": 1,
-                 *  "tall": 1,   身高
-             *  }
-         * }
+     *    "status": true,
+     *   "status_code": 0,
+     *    "message": "",
+     *    "data": {
+     *        "user": {
+     *              "id": 1,
+     *              "tel": "13880642880",手机
+     *              "nickname": "",昵称
+     *              "sex": 1,性别
+     *              "job": "", 职业
+     *              "emotion": 1,情感状态
+     *              "address": "",
+     *              "detail_address": "",
+     *              "status": 1,
+     *              "tall": 1,   身高
+     *         }
+     *    }
      *}
      *}
      * @apiErrorExample {json} Error-Response:
      * @apiErrorExample {json} Error-Response:
      * HTTP/1.1 400 Bad Request
      * HTTP/1.1 400 Bad Request
      *{
      *{
-         *"status": true,
-         *"status_code": 0,
-         *"message": "",
-         *"data": {
-             *"user": null
-         * }
+     *    "status": true,
+     *    "status_code": 0,
+     *    "message": "",
+     *    "data": {
+     *        "user": null
+     *    }
      *}
      *}
      */
      */
     public function persona()
     public function persona()
@@ -142,26 +142,27 @@ class MyController extends Controller
      * @apiSuccessExample {json} Success-Response:
      * @apiSuccessExample {json} Success-Response:
      * HTTP/1.1 200 OK
      * HTTP/1.1 200 OK
      *{
      *{
-         *"status": true,
-         *"status_code": 0,
-         *"message": "",
-         * "data": {
-             *"data": [
-             *{
-                 *"nickname": "",充值人
-                 *"pivot": {
-                     *"coin": 0  捐赠梦想币数量
-         * }
+     *  "status": true,
+     *  "status_code": 0,
+     *  "message": "",
+     *  "data": {
+     *     "data": [
+     *           {
+     *              "nickname": "",充值人
+     *              "pivot": {
+     *                  "coin": 0  捐赠梦想币数量
+     *                }
+     *          }
      *}
      *}
      * @apiErrorExample {json} Error-Response:
      * @apiErrorExample {json} Error-Response:
      * HTTP/1.1 400 Bad Request
      * HTTP/1.1 400 Bad Request
      * {
      * {
-        *"status": true,
-        *"status_code": 0,
-        *"message": "",
-        *"data": {
-            *"data": []
-        *}
+     *   "status": true,
+     *  "status_code": 0,
+     *   "message": "",
+     *   "data": {
+     *        "data": []
+     *   }
     *}
     *}
      */
      */
     public function systemInfo()
     public function systemInfo()
@@ -181,28 +182,28 @@ class MyController extends Controller
      * HTTP/1.1 200 OK
      * HTTP/1.1 200 OK
      *
      *
      * {
      * {
-         *"status": true,
-         *"status_code": 0,
-         *"message": "",
-         *"data": {
-             *"comments_infos": [
-                 *{
-                     * "id": 1,
-                     *"dream_id": 2,
-                     *"user_id": 2,
-                     *"level": 2,
-                     *"content": "啊哈", 评论内容
-                     *"created_at": null, 评论时间
-                     *"updated_at": null,
-                     *"deleted_at": null,
-                     *"dream_name": "去旅游去旅游2", 梦想介绍
-                     *"dream_pic": "aaaaa", 梦想图片
-                     * "progress": 0,   进度
-                     *"reviewer": "22222",  评论者
-                     *"reviewer_pic": "22222pic", 评论者头像
-                *}
-            *]
-        *}
+     *    "status": true,
+     *    "status_code": 0,
+     *    "message": "",
+     *    "data": {
+     *        "comments_infos": [
+     *            {
+     *                 "id": 1,
+     *                "dream_id": 2,
+     *                "user_id": 2,
+     *                "level": 2,
+     *                "content": "啊哈", 评论内容
+     *               "created_at": null, 评论时间
+     *                "updated_at": null,
+     *                "deleted_at": null,
+     *                "dream_name": "去旅游去旅游2", 梦想介绍
+     *               "dream_pic": "aaaaa", 梦想图片
+     *                "progress": 0,   进度
+     *               "reviewer": "22222",  评论者
+     *                "reviewer_pic": "22222pic", 评论者头像
+     *           }
+     *       ]
+     *  }
      * }
      * }
      * @apiErrorExample {json} Error-Response:
      * @apiErrorExample {json} Error-Response:
      * HTTP/1.1 400 Bad Request
      * HTTP/1.1 400 Bad Request
@@ -243,24 +244,24 @@ class MyController extends Controller
      * @apiVersion 0.1.0
      * @apiVersion 0.1.0
      * @apiSuccessExample {json} Success-Response:
      * @apiSuccessExample {json} Success-Response:
      * {
      * {
-        *"status": true,
-        *"status_code": 0,
-        *"message": "",
-        *"data": ""
+     *  "status": true,
+     *   "status_code": 0,
+     *   "message": "",
+     *   "data": ""
     *}
     *}
      * HTTP/1.1 200 OK
      * HTTP/1.1 200 OK
      * @apiErrorExample {json} Error-Response:
      * @apiErrorExample {json} Error-Response:
      * {
      * {
-        *"status": false,
-        *"status_code": 1000,
-        *"message": "输入不正确",
-        *"data": null
+     *   "status": false,
+     *   "status_code": 1000,
+     *   "message": "输入不正确",
+     *  "data": null
     *}
     *}
     *{
     *{
-        *"status": false,
-        *"status_code": 600,
-        *"message": "保存用户数据失败",
-        *"data": null
+     *    "status": false,
+     *   "status_code": 600,
+     *   "message": "保存用户数据失败",
+     *   "data": null
     *}
     *}
      * HTTP/1.1 400 Bad Request
      * HTTP/1.1 400 Bad Request
      */
      */
@@ -290,19 +291,19 @@ class MyController extends Controller
      * @apiVersion 0.1.0
      * @apiVersion 0.1.0
      * @apiSuccessExample {json} Success-Response:
      * @apiSuccessExample {json} Success-Response:
      * {
      * {
-        *"status": true,
-        * "status_code": 0,
-         * "message": "",
-         * "data": {
-             * "dreams": [
-             *{
-                 *"id": 2,
-                 * "dream": "去旅游去旅游2",
-                 *"about": "欧冠胡234",
-                 * "dream_pic": "aaaaa",
-                 * "progress": 0,  进度
-             * ]
-         * }
+     *   "status": true,
+     *    "status_code": 0,
+     *     "message": "",
+     *     "data": {
+     *          "dreams": [
+     *        {
+     *           "id": 2,
+     *            "dream": "去旅游去旅游2",
+     *           "about": "欧冠胡234",
+     *            "dream_pic": "aaaaa",
+     *            "progress": 0,  进度
+     *        ]
+     *     }
      * }
      * }
      * HTTP/1.1 200 OK
      * HTTP/1.1 200 OK
      * @apiErrorExample {json} Error-Response:
      * @apiErrorExample {json} Error-Response:
@@ -371,18 +372,18 @@ class MyController extends Controller
      * @apiVersion 0.1.0
      * @apiVersion 0.1.0
      * @apiSuccessExample {json} Success-Response:
      * @apiSuccessExample {json} Success-Response:
      * {
      * {
-         * "status": true,
-         *"status_code": 0,
-         *"message": "",
-         *"data": ""
+     *    "status": true,
+     *   "status_code": 0,
+     *   "message": "",
+     *    "data": ""
      *}
      *}
      * HTTP/1.1 200 OK
      * HTTP/1.1 200 OK
      * @apiErrorExample {json} Error-Response:
      * @apiErrorExample {json} Error-Response:
      * {
      * {
-         *"status": false,
-         *"status_code": 600,
-         *"message": "保存用户数据失败",
-         *"data": null
+     *    "status": false,
+     *    "status_code": 600,
+     *    "message": "保存用户数据失败",
+     *    "data": null
      * }
      * }
      * HTTP/1.1 400 Bad Request
      * HTTP/1.1 400 Bad Request
      */
      */