apidoc实例

    /**
     * @apiDefine MyError
     * @apiError {String} msg 失败描述
     * @apiError {String} code 失败标识,值为0
     * @apiError {Integer} data 失败返回数据,可能为空
     * @apiErrorExample {json} Error-Response:
     *     HTTP/1.1 404 Not Found
     *     {
     *      "code":0,
     *      "msg":"获取失败",
     *      "time":"1564261895",
     *      "data":null
     *     }
     */


    /**
     * @api {post} /api/store/getStoreDesc 获取店铺具体信息
     * @apiDescription 根据店铺id或商户手机号获取店铺具体信息
     * @apiVersion 1.0.1
     * @apiName getStoreUserDesc
     * @apiGroup STOREUSER
     *
     *
     * @apiParam {Integer} id 用户id (和手机号二选一)
     * @apiParam {String} mobile 手机号(和用户id二选一)
     *
     *
     * @apiSuccess {String} msg 成功描述
     * @apiSuccess {String} code 成功标识,值为1
     * @apiSuccess {Array} data 成功返回数据
     *
     *
     * @apiSampleRequest /api/store/getStoreDesc
     *
     * @apiSuccessExample Success-Response:
     *     HTTP/1.1 200 OK
     *     {
     *     "code":1,
     *     "msg":"获取成功",
     *     "time":"1564262836",
     *     "data":[
     *          {
     *              "id":1,
     *              "store_name":"小店",//商家名称
     *              "business_license":"/uploads/20190728/099618409d8beebc597619a5ffffb154.jpg",//营业执照
     *              "status":1,//1=正常 2 = 审核中 3 = 拒绝 4 = 禁用
     *              "ctime":1564243971,
     *              "utime":1564243977,
     *          },
     *      ]
     *     }
     * @apiUse MyError
     * @Author: Areom <[email protected]>
     */
    public function getStoreDesc()
    {
         //逻辑。。。。
    }

 效果如下:

apidoc实例_第1张图片

 

 

 

你可能感兴趣的:(tool,php,apidoc,php)