|
@@ -0,0 +1,297 @@
|
|
|
|
+<?php
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * @api {get} common.public 公共参数说明
|
|
|
|
+ * @apiVersion 1.0.0
|
|
|
|
+ * @apiName common.public
|
|
|
|
+ * @apiGroup Common
|
|
|
|
+ *
|
|
|
|
+ * @apiDescription 介绍公共参数
|
|
|
|
+ *
|
|
|
|
+ * @apiParam {Number} json 是否返回json格式的数据1为返回2为不返回
|
|
|
|
+ * @apiParam {Number} signature 用于登录后的uid验证,每次都要传入,请登录后将这个值保存在本地
|
|
|
|
+ * @apiParam {Number} pg 分页数,第几页,列表页瀑布流使用该参数
|
|
|
|
+ *
|
|
|
|
+ * @apiSuccess {Number} status 状态,1为有效2为无效
|
|
|
|
+ * @apiSuccess {String} msg 请求的数据是否成功的提示
|
|
|
|
+ * @apiSuccess {String} data 如果status为1,data有值
|
|
|
|
+ * @apiSuccess {Object[]} page 分页信息
|
|
|
|
+ * @apiSuccess {Number} page.total 分页总数
|
|
|
|
+ * @apiSuccess {Number} page.current_page 当前页
|
|
|
|
+ * @apiSuccess {Number} page.total_page 总页数
|
|
|
|
+ * @apiSuccess {Number} page.next_page 下一页
|
|
|
|
+ * @apiSuccess {Number} page.prev_page 上一页
|
|
|
|
+ * @apiSuccess {Number} page.status 是否有下一页数据,0为没有
|
|
|
|
+ */
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * @api {post} upload/upload/?save.start 上传图片接口
|
|
|
|
+ * @apiVersion 1.0.0
|
|
|
|
+ * @apiName save.start
|
|
|
|
+ * @apiGroup Common
|
|
|
|
+ *
|
|
|
|
+ * @apiParam {Number} key 值为6,写死即可
|
|
|
|
+ * @apiParam {String} file 文件流 multipart/form-data形式
|
|
|
|
+ *
|
|
|
|
+ * @apiSuccess {String} url 图片地址
|
|
|
|
+*/
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * @api {get} saike/passport/?l=applet.bind 用户登录 未授权
|
|
|
|
+ * @apiVersion 1.0.0
|
|
|
|
+ * @apiName applet.bind
|
|
|
|
+ * @apiGroup AppletPassport
|
|
|
|
+ *
|
|
|
|
+ * @apiDescription 用户登录
|
|
|
|
+ *
|
|
|
|
+ * @apiParam {String} code 微信登录返回的code
|
|
|
|
+ * @apiParam {String} create 1为创建临时用户,2为不创建,默认为2
|
|
|
|
+ *
|
|
|
|
+ * @apiSuccess {String} session_key create==1时返回,保存下来。然后请求applet.login
|
|
|
|
+ * @apiSuccess {String} openid create==1时返回,保存下来。然后请求applet.login
|
|
|
|
+ * @apiSuccess {Number} vid create==2时返回,微信id,请保存在本地
|
|
|
|
+ * @apiSuccess {Number} uid create==2时返回,用户id,请保存在本地
|
|
|
|
+ * @apiSuccess {String} signature 用于登录后的uid验证,每次都要传入,请登录后将这个值保存在本地
|
|
|
|
+ */
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * @api {get} wonderful/passport/?l=applet.login 用户登录 已授权
|
|
|
|
+ * @apiVersion 1.0.0
|
|
|
|
+ * @apiName applet.login
|
|
|
|
+ * @apiGroup AppletPassport
|
|
|
|
+ *
|
|
|
|
+ * @apiDescription 用户登录
|
|
|
|
+ *
|
|
|
|
+ * @apiParam {String} code 微信登录返回的code
|
|
|
|
+ * @apiParam {String} session_key 如果进行了applet.bind并获取了session_key。需要传入
|
|
|
|
+ * @apiParam {String} openid 如果进行了applet.bind并获取了session_key。需要传入
|
|
|
|
+ * @apiParam {String} nickname 用户昵称
|
|
|
|
+ * @apiParam {String} avatarurl 用户头像
|
|
|
|
+ * @apiParam {String} gender 性别
|
|
|
|
+ * @apiParam {String} city 城市
|
|
|
|
+ * @apiParam {String} province 省份
|
|
|
|
+ * @apiParam {String} country 县区
|
|
|
|
+ * @apiParam {String} iv 微信的加密参数
|
|
|
|
+ * @apiParam {String} encryptedData 微信的加密参数
|
|
|
|
+ *
|
|
|
|
+ * @apiSuccess {Number} vid 微信id,请保存在本地
|
|
|
|
+ * @apiSuccess {Number} uid 用户id,请保存在本地
|
|
|
|
+ * @apiSuccess {String} signature 用于登录后的uid验证,每次都要传入,请登录后将这个值保存在本地
|
|
|
|
+ */
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * @api {get} saike/passport/?l=applet.update 更新用户信息
|
|
|
|
+ * @apiVersion 1.0.0
|
|
|
|
+ * @apiName applet.update
|
|
|
|
+ * @apiGroup AppletPassport
|
|
|
|
+ *
|
|
|
|
+ * @apiDescription 更新用户信息
|
|
|
|
+ *
|
|
|
|
+ * @apiParam {String} nickname 用户昵称
|
|
|
|
+ * @apiParam {String} avatarurl 用户头像
|
|
|
|
+ * @apiParam {String} gender 性别
|
|
|
|
+ * @apiParam {String} city 城市
|
|
|
|
+ * @apiParam {String} province 省份
|
|
|
|
+ * @apiParam {String} country 县区
|
|
|
|
+ * @apiParam {String} iv 微信的加密参数
|
|
|
|
+ * @apiParam {String} encryptedData 微信的加密参数
|
|
|
|
+ * @apiParam {Number} vid 微信id
|
|
|
|
+ * @apiParam {Number} uid 用户id
|
|
|
|
+ * @apiParam {String} signature signature
|
|
|
|
+ *
|
|
|
|
+ *
|
|
|
|
+ * @apiSuccess {Number} vid 微信id,请保存在本地
|
|
|
|
+ * @apiSuccess {Number} uid 用户id,请保存在本地
|
|
|
|
+ * @apiSuccess {String} signature 用于登录后的uid验证,每次都要传入,请登录后将这个值保存在本地
|
|
|
|
+ */
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * @api {get} saike/passport/?l=applet.mobile 更新用户手机号-微信绑定
|
|
|
|
+ * @apiVersion 1.0.0
|
|
|
|
+ * @apiName applet.mobile
|
|
|
|
+ * @apiGroup AppletPassport
|
|
|
|
+ *
|
|
|
|
+ * @apiDescription 更新用户手机号-微信绑定
|
|
|
|
+ *
|
|
|
|
+ * @apiParam {String} iv 微信的加密参数
|
|
|
|
+ * @apiParam {String} encryptedData 微信的加密参数
|
|
|
|
+ * @apiParam {Number} vid 微信id
|
|
|
|
+ * @apiParam {Number} uid 用户id
|
|
|
|
+ * @apiParam {String} signature signature
|
|
|
|
+ *
|
|
|
|
+ *
|
|
|
|
+ * @apiSuccess {Number} vid 微信id,请保存在本地
|
|
|
|
+ * @apiSuccess {Number} uid 用户id,请保存在本地
|
|
|
|
+ * @apiSuccess {String} signature 用于登录后的uid验证,每次都要传入,请登录后将这个值保存在本地
|
|
|
|
+ */
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * @api {get} saike/passport/?l=applet.bind_mobile 更新用户手机号-验证码绑定
|
|
|
|
+ * @apiVersion 1.0.0
|
|
|
|
+ * @apiName applet.bind_mobile
|
|
|
|
+ * @apiGroup AppletPassport
|
|
|
|
+ *
|
|
|
|
+ * @apiDescription 更新用户手机号-验证码绑定
|
|
|
|
+ *
|
|
|
|
+ * @apiParam {Number} uid 用户id
|
|
|
|
+ * @apiParam {Number} mobile 手机号
|
|
|
|
+ * @apiParam {String} mcode 验证码
|
|
|
|
+ * @apiParam {String} signature signature
|
|
|
|
+ *
|
|
|
|
+
|
|
|
|
+ * @apiSuccess {Number} uid 用户id,请保存在本地
|
|
|
|
+ * @apiSuccess {String} signature 用于登录后的uid验证,每次都要传入,请登录后将这个值保存在本地
|
|
|
|
+ */
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * @api {get} saike/passport/?l=reg.getMCode 获取手机验证码
|
|
|
|
+ * @apiVersion 1.0.0
|
|
|
|
+ * @apiName reg.getMCode
|
|
|
|
+ * @apiGroup AppletPassport
|
|
|
|
+ *
|
|
|
|
+ * @apiDescription 获取手机验证码
|
|
|
|
+ *
|
|
|
|
+ * @apiParam {Number} mobile 手机号
|
|
|
|
+ *
|
|
|
|
+ * @apiSuccess {String} msg 验证码已发送至您的手机,请注意查收,十分钟之内有效
|
|
|
|
+ */
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * @api {get} saike/passport/?l=reg.getMCode 获取手机验证码,未登录状态
|
|
|
|
+ * @apiVersion 1.0.0
|
|
|
|
+ * @apiName reg.getMCode
|
|
|
|
+ * @apiGroup AppPassport
|
|
|
|
+ *
|
|
|
|
+ * @apiDescription 获取手机验证码,未登录状态
|
|
|
|
+ *
|
|
|
|
+ * @apiParam {Number} mobile 手机号
|
|
|
|
+ *
|
|
|
|
+ * @apiSuccess {String} msg 验证码已发送至您的手机,请注意查收,十分钟之内有效
|
|
|
|
+ */
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * @api {get} saike/passport/?l=reg.getMCodeLogin 获取手机验证码,已登录状态
|
|
|
|
+ * @apiVersion 1.0.0
|
|
|
|
+ * @apiName reg.getMCode
|
|
|
|
+ * @apiGroup AppPassport
|
|
|
|
+ *
|
|
|
|
+ * @apiDescription 获取手机验证码,已登录状态
|
|
|
|
+ *
|
|
|
|
+ * @apiParam {Number} mobile 手机号
|
|
|
|
+ * @apiParam {String} signature signature
|
|
|
|
+ *
|
|
|
|
+ * @apiSuccess {String} msg 验证码已发送至您的手机,请注意查收,十分钟之内有效
|
|
|
|
+ */
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * @api {get} saike/passport/?l=app.login 登录与注册
|
|
|
|
+ * @apiVersion 1.0.0
|
|
|
|
+ * @apiName app.login
|
|
|
|
+ * @apiGroup AppPassport
|
|
|
|
+ *
|
|
|
|
+ * @apiDescription 登录与注册
|
|
|
|
+ *
|
|
|
|
+ * @apiParam {Number} mobile 手机号
|
|
|
|
+ * @apiParam {String} mcode 验证码
|
|
|
|
+ *
|
|
|
|
+ * @apiSuccess {Number} uid 用户id,请保存在本地
|
|
|
|
+ * @apiSuccess {String} signature 用于登录后的uid验证,每次都要传入,请登录后将这个值保存在本地
|
|
|
|
+ */
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * @api {get} saike/passport/?l=app.login_uuid UUID登录
|
|
|
|
+ * @apiVersion 1.0.0
|
|
|
|
+ * @apiName app.login_uuid
|
|
|
|
+ * @apiGroup AppPassport
|
|
|
|
+ *
|
|
|
|
+ * @apiDescription UUID登录
|
|
|
|
+ *
|
|
|
|
+ * @apiParam {Number} uuid UUID
|
|
|
|
+ *
|
|
|
|
+ * @apiSuccess {Number} uid 用户id,请保存在本地
|
|
|
|
+ * @apiSuccess {String} signature 用于登录后的uid验证,每次都要传入,请登录后将这个值保存在本地
|
|
|
|
+ */
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * @api {get} saike/passport/?l=app.bind_mobile 更新用户手机号-验证码绑定
|
|
|
|
+ * @apiVersion 1.0.0
|
|
|
|
+ * @apiName app.bind_mobile
|
|
|
|
+ * @apiGroup AppPassport
|
|
|
|
+ *
|
|
|
|
+ * @apiDescription 更新用户手机号-验证码绑定
|
|
|
|
+ *
|
|
|
|
+ * @apiParam {Number} uid 用户id
|
|
|
|
+ * @apiParam {Number} mobile 手机号
|
|
|
|
+ * @apiParam {String} mcode 验证码
|
|
|
|
+ * @apiParam {String} signature signature
|
|
|
|
+ *
|
|
|
|
+
|
|
|
|
+ * @apiSuccess {Number} uid 用户id,请保存在本地
|
|
|
|
+ * @apiSuccess {String} signature 用于登录后的uid验证,每次都要传入,请登录后将这个值保存在本地
|
|
|
|
+ */
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * @api {get} saike/passport/?l=app.wechat_reg 第三方登录-已经拥有openid
|
|
|
|
+ * @apiVersion 1.0.0
|
|
|
|
+ * @apiName app.wechat_reg
|
|
|
|
+ * @apiGroup AppPassport
|
|
|
|
+ *
|
|
|
|
+ * @apiDescription 第三方登录-已经拥有openid
|
|
|
|
+ *
|
|
|
|
+ * @apiParam {String} username 用户名
|
|
|
|
+ * @apiParam {String} avatar 头像
|
|
|
|
+ * @apiParam {String} sex 性别
|
|
|
|
+ * @apiParam {String} city 城市
|
|
|
|
+ * @apiParam {String} province 省份
|
|
|
|
+ * @apiParam {String} country 县区
|
|
|
|
+ * @apiParam {String} openid openid
|
|
|
|
+ * @apiParam {String} unionid unionid
|
|
|
|
+ * @apiParam {String} access_token access_token
|
|
|
|
+ * @apiParam {String} refresh_token refresh_token
|
|
|
|
+ * @apiParam {String} expires_in 失效时间
|
|
|
|
+ *
|
|
|
|
+ * @apiSuccess {Number} uid 用户id,请保存在本地
|
|
|
|
+ * @apiSuccess {Number} mobile 手机号,判断手机号是否存在,不存在则需要进行绑定,请直接使用app.bind_mobile接口进行绑定即可
|
|
|
|
+ * @apiSuccess {String} signature 用于登录后的uid验证,每次都要传入,请登录后将这个值保存在本地
|
|
|
|
+ */
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * @api {get} saike/oauth/?l=request.callback 第三方登录
|
|
|
|
+ * @apiVersion 1.0.0
|
|
|
|
+ * @apiName request.callback
|
|
|
|
+ * @apiGroup AppPassport
|
|
|
|
+ *
|
|
|
|
+ * @apiDescription 第三方登录
|
|
|
|
+ *
|
|
|
|
+ * @apiParam {Number} account 第三方登录的账号,写死为2吧
|
|
|
|
+ * @apiParam {Number} system 系统id,写死为1,后续做ok精彩和精品时再加
|
|
|
|
+ * @apiParam {String} source 渠道来源,写死为1,默认1则为官网渠道
|
|
|
|
+ * @apiParam {String} source_type 渠道类型,写死为ios或者android
|
|
|
|
+ * @apiParam {String} code 用户授权后返回的code
|
|
|
|
+ *
|
|
|
|
+
|
|
|
|
+ * @apiSuccess {Number} uid 用户id,请保存在本地
|
|
|
|
+ * @apiSuccess {Number} mobile 手机号,判断手机号是否存在,不存在则需要进行绑定,请直接使用app.bind_mobile接口进行绑定即可
|
|
|
|
+ * @apiSuccess {String} signature 用于登录后的uid验证,每次都要传入,请登录后将这个值保存在本地
|
|
|
|
+ */
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * @api {get} saike/passport/?l=app.update 更新用户信息
|
|
|
|
+ * @apiVersion 1.0.0
|
|
|
|
+ * @apiName app.update
|
|
|
|
+ * @apiGroup AppPassport
|
|
|
|
+ *
|
|
|
|
+ * @apiDescription 更新用户信息
|
|
|
|
+ *
|
|
|
|
+ * @apiParam {Number} signature 用户signature
|
|
|
|
+ * @apiParam {String} username 用户昵称
|
|
|
|
+ * @apiParam {String} avatar 用户头像
|
|
|
|
+ * @apiParam {String} gender 性别
|
|
|
|
+ * @apiParam {String} city 城市
|
|
|
|
+ * @apiParam {String} province 省份
|
|
|
|
+ * @apiParam {String} country 县区
|
|
|
|
+ *
|
|
|
|
+ * @apiSuccess {Number} uid 用户id,请保存在本地
|
|
|
|
+ * @apiSuccess {String} signature 用于登录后的uid验证,每次都要传入,请登录后将这个值保存在本地
|
|
|
|
+ */
|