|
@@ -0,0 +1,280 @@
|
|
|
+{
|
|
|
+ "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": {
|
|
|
+ "/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/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.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": {
|
|
|
+ "Appid": {
|
|
|
+ "description": "Appid",
|
|
|
+ "type": "string"
|
|
|
+ },
|
|
|
+ "Authorization": {
|
|
|
+ "description": "登陆凭证,后续接口调用时,带在请求头里面Key:Authorization",
|
|
|
+ "type": "string"
|
|
|
+ },
|
|
|
+ "AvatarUrl": {
|
|
|
+ "description": "头像地址",
|
|
|
+ "type": "string"
|
|
|
+ },
|
|
|
+ "City": {
|
|
|
+ "description": "城市",
|
|
|
+ "type": "string"
|
|
|
+ },
|
|
|
+ "Country": {
|
|
|
+ "description": "国家",
|
|
|
+ "type": "string"
|
|
|
+ },
|
|
|
+ "CreateTime": {
|
|
|
+ "description": "注册时间",
|
|
|
+ "type": "string",
|
|
|
+ "format": "datetime"
|
|
|
+ },
|
|
|
+ "Gender": {
|
|
|
+ "description": "用户性别 1:男性,2:女性,0:未知(默认)",
|
|
|
+ "type": "integer",
|
|
|
+ "format": "int64"
|
|
|
+ },
|
|
|
+ "Language": {
|
|
|
+ "description": "语言",
|
|
|
+ "type": "string"
|
|
|
+ },
|
|
|
+ "Mobile": {
|
|
|
+ "description": "手机号",
|
|
|
+ "type": "string"
|
|
|
+ },
|
|
|
+ "ModifyTime": {
|
|
|
+ "description": "修改时间",
|
|
|
+ "type": "string",
|
|
|
+ "format": "datetime"
|
|
|
+ },
|
|
|
+ "NickName": {
|
|
|
+ "description": "昵称",
|
|
|
+ "type": "string"
|
|
|
+ },
|
|
|
+ "OpenId": {
|
|
|
+ "description": "open_id",
|
|
|
+ "type": "string"
|
|
|
+ },
|
|
|
+ "Province": {
|
|
|
+ "description": "省",
|
|
|
+ "type": "string"
|
|
|
+ },
|
|
|
+ "Timestamp": {
|
|
|
+ "description": "时间戳",
|
|
|
+ "type": "integer",
|
|
|
+ "format": "int64"
|
|
|
+ },
|
|
|
+ "Unionid": {
|
|
|
+ "description": "unionid",
|
|
|
+ "type": "string"
|
|
|
+ },
|
|
|
+ "UsersId": {
|
|
|
+ "type": "integer",
|
|
|
+ "format": "int64"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ "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"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|