swagger: "2.0" info: title: beego Test API description: beego has a very cool tools to autogenerate documents for your API version: 1.0.0 termsOfService: http://beego.me/ contact: email: astaxie@gmail.com license: name: Apache 2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html basePath: /api paths: /home/list: get: tags: - home description: 首页列表接口 operationId: HomeController.首页列表接口 parameters: - in: query name: PageSize description: 每页数据条数 required: true type: integer format: int64 - in: query name: CurrentIndex description: 当前页页码,从1开始 required: true type: integer format: int64 - in: query name: ChartPermissionId description: 品类id,最新传0 required: true type: integer format: int64 responses: "200": description: "" schema: $ref: '#/definitions/models.HomeList' /permission/all: get: tags: - permission description: 获取用户详情接口 operationId: ChartPermissionController.获取所有品种 responses: "200": description: "" schema: $ref: '#/definitions/models.ChartPermissionResp' /user/detail: get: tags: - user description: 获取用户详情接口 operationId: UserController.获取用户详情 responses: "200": description: "" schema: $ref: '#/definitions/models.UserDetail' /user/login: post: tags: - user description: 登录接口 operationId: UserController.登录 parameters: - in: body name: request description: type json string required: true schema: $ref: '#/definitions/models.LoginReq' responses: "200": description: "" schema: $ref: '#/definitions/models.LoginResp' /wechat/getEmailCode: get: tags: - wechat description: 获取邮件验证码接口 operationId: WechatController.获取邮件验证码 parameters: - in: query name: Email description: 邮箱 required: true type: string responses: Ret=200: description: 获取成功 /wechat/getPhoneNumber: post: tags: - wechat description: 小程序获取用户绑定手机号接口(需要登录) operationId: WechatController.小程序获取用户绑定手机号 parameters: - in: body name: request description: type json string required: true schema: $ref: '#/definitions/models.WxGetPhoneNumberReq' responses: "200": description: "" schema: $ref: '#/definitions/models.WxGetPhoneNumberResp' /wechat/getSmsCode: get: tags: - wechat description: 获取短信验证码接口 operationId: WechatController.获取短信验证码 parameters: - in: query name: Mobile description: 手机号码 required: true type: string - in: query name: AreaNum description: 地区编码 required: true type: string responses: Ret=200: description: 获取成功 /wechat/getUserInfo: post: tags: - wechat description: 小程序获取用户信息接口(需要登录) operationId: WechatController.小程序获取用户信息 parameters: - in: body name: request description: type json string required: true schema: $ref: '#/definitions/models.WxGetUserInfoReq' responses: "200": description: "" schema: $ref: '#/definitions/models.WxGetUserInfoResp' /wechat/login: get: tags: - wechat description: 微信登录接口 operationId: WechatCommonController.微信登录接口 parameters: - in: query name: Code description: 微信唯一编码code required: true type: string responses: "200": description: "" schema: $ref: '#/definitions/models.WxLoginResp' definitions: models.ChartPermission: title: ChartPermission type: object properties: ChartPermissionId: description: 权限id type: integer format: int64 PermissionName: description: 权限名称 type: string models.ChartPermissionResp: title: ChartPermissionResp type: object properties: List: type: array items: $ref: '#/definitions/models.ChartPermission' models.HomeList: title: HomeList type: object models.LoginReq: title: LoginReq type: object properties: Email: description: 邮箱 type: string LoginType: description: 登录方式:1:手机,2:邮箱 type: integer format: int64 Mobile: description: 手机号 type: string models.LoginResp: title: LoginResp type: object properties: Authorization: description: Token type: string CompanyName: description: 客户名称 type: string Email: description: 邮箱 type: string EndDate: description: 到期日期 type: string Headimgurl: description: 用户头像 type: string Mobile: description: 手机号 type: string ProductName: description: 客户类型名称 type: string Status: description: 状态 type: string UserId: description: 用户id type: integer format: int64 models.UserDetail: title: UserDetail type: object properties: CompanyName: description: 公司名称 type: string Email: description: 邮箱 type: string HasPermission: description: true:有权限,false:无权限 type: boolean Headimgurl: description: 用户头像,最后一个数值代表正方形头像大小(有0、46、64、96、132数值可选,0代表640*640正方形头像),用户没有头像时该项为空 type: string Mobile: description: 手机号码 type: string NickName: description: 用户昵称 type: string PermissionName: description: 拥有权限分类,多个用英文逗号分隔 type: string RealName: description: 用户实际名称 type: string models.WxGetPhoneNumberReq: title: WxGetPhoneNumberReq type: object properties: EncryptedData: description: encryptedData type: string Iv: description: iv type: string models.WxGetPhoneNumberResp: title: WxGetPhoneNumberResp type: object properties: Authorization: description: 登陆凭证,后续接口调用时,带在请求头里面Key:Authorization type: string CountryCode: description: 区号 type: string PhoneNumber: description: 用户绑定的手机号(国外手机号会有区号) type: string PurePhoneNumber: description: 没有区号的手机号 type: string models.WxGetUserInfoReq: title: WxGetUserInfoReq type: object properties: EncryptedData: description: encryptedData type: string Iv: description: iv type: string RawData: description: rawData type: string Signature: description: signature type: string models.WxGetUserInfoResp: title: WxGetUserInfoResp type: object properties: Authorization: description: 登陆凭证,后续接口调用时,带在请求头里面Key:Authorization type: string models.WxLoginResp: title: WxLoginResp type: object properties: Authorization: type: string CompanyName: description: 客户名称 type: string Email: description: 邮箱 type: string EndDate: description: 到期日期 type: string FirstLogin: type: integer format: int64 Headimgurl: description: 用户头像 type: string Mobile: description: 手机号 type: string ProductName: description: 客户类型名称 type: string Status: description: 状态 type: string UserId: type: integer format: int64 tags: - name: user description: | 用户 - name: permission description: | 品种