@@ -20,7 +20,6 @@ import ( | |||
"github.com/gin-gonic/gin" | |||
"github.com/go-pay/gopay" | |||
"github.com/jinzhu/copier" | |||
"net/url" | |||
"time" | |||
) | |||
@@ -399,34 +398,20 @@ func GetWithdrawCondition(c *gin.Context) { | |||
// @Accept json | |||
// @Produce json | |||
// @param Authorization header string true "验证参数Bearer和token空格拼接" | |||
// @Param req body md.LaunchBindAlipayAccountReq true "具体参数" | |||
// @Success 200 {string} "Url" | |||
// @Failure 400 {object} md.Response "具体错误" | |||
// @Router /api/v1/wallet/withdraw/launchBindAlipay [POST] | |||
func LaunchBindAlipayAccount(c *gin.Context) { | |||
var req md.LaunchBindAlipayAccountReq | |||
err := c.ShouldBindJSON(&req) | |||
if err != nil { | |||
err = svc.HandleValidateErr(err) | |||
err1 := err.(e.E) | |||
e.OutErr(c, err1.Code, err1.Error()) | |||
return | |||
} | |||
client, err := alipay.InitAlipay(nil) | |||
if err != nil { | |||
e.OutErr(c, e.ERR, err.Error()) | |||
return | |||
} | |||
appId := client.AppId | |||
redirectUri := req.RedirectUri | |||
scope := "auth_user" | |||
reqUrl := fmt.Sprintf("https://openauth.alipay.com/oauth2/publicAppAuthorize.htm?app_id=%s&scope=%s&redirect_uri=%s", appId, scope, redirectUri) | |||
reqUrl = url.QueryEscape(reqUrl) | |||
res := "alipays://platformapi/startapp?appId=20000067&url=" + reqUrl | |||
e.OutSuc(c, res, nil) | |||
resUrl := fmt.Sprintf("https://authweb.alipay.com/auth?auth_type=PURE_OAUTH_SDK&app_id=%s&scope=%s&state=init", appId, scope) | |||
e.OutSuc(c, resUrl, nil) | |||
} | |||
// BindAlipayAccount | |||
@@ -1,5 +1,4 @@ | |||
// Code generated by swaggo/swag. DO NOT EDIT. | |||
// Package docs Code generated by swaggo/swag. DO NOT EDIT | |||
package docs | |||
import "github.com/swaggo/swag" | |||
@@ -945,6 +944,44 @@ const docTemplate = `{ | |||
} | |||
} | |||
}, | |||
"/api/v1/faceRealName/state": { | |||
"get": { | |||
"description": "实名认证-分类", | |||
"consumes": [ | |||
"application/json" | |||
], | |||
"produces": [ | |||
"application/json" | |||
], | |||
"tags": [ | |||
"实名认证" | |||
], | |||
"summary": "实名认证-基础信息", | |||
"parameters": [ | |||
{ | |||
"type": "string", | |||
"description": "验证参数Bearer和token空格拼接", | |||
"name": "Authorization", | |||
"in": "header", | |||
"required": true | |||
} | |||
], | |||
"responses": { | |||
"200": { | |||
"description": "具体数据", | |||
"schema": { | |||
"$ref": "#/definitions/md.RealNameAuthBasicData" | |||
} | |||
}, | |||
"400": { | |||
"description": "具体错误", | |||
"schema": { | |||
"$ref": "#/definitions/md.Response" | |||
} | |||
} | |||
} | |||
} | |||
}, | |||
"/api/v1/fastLogin": { | |||
"post": { | |||
"description": "一键登录", | |||
@@ -1048,7 +1085,7 @@ const docTemplate = `{ | |||
}, | |||
{ | |||
"type": "string", | |||
"description": "页面名称类型值(1:首页 2:会员中心 3:底部导航 4:邀请下载落地页 5:邀请海报 7:下载渠道 8:贡献值 9:蛋蛋分 10:商务合作 11:资质证书 12:提现页 13:提现到账户)", | |||
"description": "页面名称类型值(1:首页 2:会员中心 3:底部导航 4:邀请下载落地页 5:邀请海报 7:下载渠道 8:贡献值 9:蛋蛋分 10:商务合作 11:资质证书 12:提现页 13:提现到账户 14实名认证)", | |||
"name": "mod_name_value", | |||
"in": "query", | |||
"required": true | |||
@@ -2305,9 +2342,7 @@ const docTemplate = `{ | |||
"name": "req", | |||
"in": "body", | |||
"required": true, | |||
"schema": { | |||
"type": "object" | |||
} | |||
"schema": {} | |||
} | |||
], | |||
"responses": { | |||
@@ -2936,15 +2971,6 @@ const docTemplate = `{ | |||
"name": "Authorization", | |||
"in": "header", | |||
"required": true | |||
}, | |||
{ | |||
"description": "具体参数", | |||
"name": "req", | |||
"in": "body", | |||
"required": true, | |||
"schema": { | |||
"$ref": "#/definitions/md.LaunchBindAlipayAccountReq" | |||
} | |||
} | |||
], | |||
"responses": { | |||
@@ -3022,68 +3048,6 @@ const docTemplate = `{ | |||
} | |||
} | |||
}, | |||
"code_fnuoos_com_EggPlanet_egg_models_git_src_model.ImSendRedPackageOrd": { | |||
"type": "object", | |||
"properties": { | |||
"amount": { | |||
"type": "string" | |||
}, | |||
"create_time": { | |||
"type": "string" | |||
}, | |||
"id": { | |||
"type": "integer" | |||
}, | |||
"im_data": { | |||
"type": "string" | |||
}, | |||
"im_uid": { | |||
"type": "integer" | |||
}, | |||
"ord_no": { | |||
"type": "string" | |||
}, | |||
"received_im_user_ids": { | |||
"type": "string" | |||
}, | |||
"received_times": { | |||
"type": "string" | |||
}, | |||
"received_user_amount": { | |||
"type": "string" | |||
}, | |||
"received_user_ids": { | |||
"type": "string" | |||
}, | |||
"red_packet_balance_amount": { | |||
"type": "string" | |||
}, | |||
"red_packet_balance_nums": { | |||
"type": "integer" | |||
}, | |||
"red_packet_nums": { | |||
"type": "integer" | |||
}, | |||
"red_packet_type": { | |||
"type": "integer" | |||
}, | |||
"state": { | |||
"type": "integer" | |||
}, | |||
"uid": { | |||
"type": "integer" | |||
}, | |||
"update_time": { | |||
"type": "string" | |||
}, | |||
"wait_draw_im_user_ids": { | |||
"type": "string" | |||
}, | |||
"wait_draw_user_ids": { | |||
"type": "string" | |||
} | |||
} | |||
}, | |||
"comm.AccessRecordsReq": { | |||
"type": "object", | |||
"properties": { | |||
@@ -3834,9 +3798,7 @@ const docTemplate = `{ | |||
"type": "object", | |||
"properties": { | |||
"data": { | |||
"description": "内容", | |||
"type": "object", | |||
"additionalProperties": true | |||
"description": "内容" | |||
}, | |||
"mod_name": { | |||
"description": "模块名称", | |||
@@ -4142,15 +4104,6 @@ const docTemplate = `{ | |||
} | |||
} | |||
}, | |||
"md.LaunchBindAlipayAccountReq": { | |||
"type": "object", | |||
"properties": { | |||
"redirect_uri": { | |||
"description": "回调页面,是经过转义的 URL 链接(url 必须以 HTTP 或者 HTTPS 开头)", | |||
"type": "string" | |||
} | |||
} | |||
}, | |||
"md.LoginReq": { | |||
"type": "object", | |||
"required": [ | |||
@@ -4385,6 +4338,9 @@ const docTemplate = `{ | |||
"is_need_get_energy": { | |||
"type": "string", | |||
"example": "0不需要获取能量 1弹窗提示 前往蛋蛋乐园获取能量" | |||
}, | |||
"tip_str": { | |||
"type": "string" | |||
} | |||
} | |||
}, | |||
@@ -4427,7 +4383,7 @@ const docTemplate = `{ | |||
"description": "红包详情信息", | |||
"allOf": [ | |||
{ | |||
"$ref": "#/definitions/code_fnuoos_com_EggPlanet_egg_models_git_src_model.ImSendRedPackageOrd" | |||
"$ref": "#/definitions/model.ImSendRedPackageOrd" | |||
} | |||
] | |||
}, | |||
@@ -5052,6 +5008,68 @@ const docTemplate = `{ | |||
} | |||
} | |||
}, | |||
"model.ImSendRedPackageOrd": { | |||
"type": "object", | |||
"properties": { | |||
"amount": { | |||
"type": "string" | |||
}, | |||
"create_time": { | |||
"type": "string" | |||
}, | |||
"id": { | |||
"type": "integer" | |||
}, | |||
"im_data": { | |||
"type": "string" | |||
}, | |||
"im_uid": { | |||
"type": "integer" | |||
}, | |||
"ord_no": { | |||
"type": "string" | |||
}, | |||
"received_im_user_ids": { | |||
"type": "string" | |||
}, | |||
"received_times": { | |||
"type": "string" | |||
}, | |||
"received_user_amount": { | |||
"type": "string" | |||
}, | |||
"received_user_ids": { | |||
"type": "string" | |||
}, | |||
"red_packet_balance_amount": { | |||
"type": "string" | |||
}, | |||
"red_packet_balance_nums": { | |||
"type": "integer" | |||
}, | |||
"red_packet_nums": { | |||
"type": "integer" | |||
}, | |||
"red_packet_type": { | |||
"type": "integer" | |||
}, | |||
"state": { | |||
"type": "integer" | |||
}, | |||
"uid": { | |||
"type": "integer" | |||
}, | |||
"update_time": { | |||
"type": "string" | |||
}, | |||
"wait_draw_im_user_ids": { | |||
"type": "string" | |||
}, | |||
"wait_draw_user_ids": { | |||
"type": "string" | |||
} | |||
} | |||
}, | |||
"pb.SendRedPacketResp": { | |||
"type": "object", | |||
"properties": { | |||
@@ -5074,6 +5092,8 @@ var SwaggerInfo = &swag.Spec{ | |||
Description: "APP客户端-Api接口", | |||
InfoInstanceName: "swagger", | |||
SwaggerTemplate: docTemplate, | |||
LeftDelim: "{{", | |||
RightDelim: "}}", | |||
} | |||
func init() { | |||
@@ -938,6 +938,44 @@ | |||
} | |||
} | |||
}, | |||
"/api/v1/faceRealName/state": { | |||
"get": { | |||
"description": "实名认证-分类", | |||
"consumes": [ | |||
"application/json" | |||
], | |||
"produces": [ | |||
"application/json" | |||
], | |||
"tags": [ | |||
"实名认证" | |||
], | |||
"summary": "实名认证-基础信息", | |||
"parameters": [ | |||
{ | |||
"type": "string", | |||
"description": "验证参数Bearer和token空格拼接", | |||
"name": "Authorization", | |||
"in": "header", | |||
"required": true | |||
} | |||
], | |||
"responses": { | |||
"200": { | |||
"description": "具体数据", | |||
"schema": { | |||
"$ref": "#/definitions/md.RealNameAuthBasicData" | |||
} | |||
}, | |||
"400": { | |||
"description": "具体错误", | |||
"schema": { | |||
"$ref": "#/definitions/md.Response" | |||
} | |||
} | |||
} | |||
} | |||
}, | |||
"/api/v1/fastLogin": { | |||
"post": { | |||
"description": "一键登录", | |||
@@ -1041,7 +1079,7 @@ | |||
}, | |||
{ | |||
"type": "string", | |||
"description": "页面名称类型值(1:首页 2:会员中心 3:底部导航 4:邀请下载落地页 5:邀请海报 7:下载渠道 8:贡献值 9:蛋蛋分 10:商务合作 11:资质证书 12:提现页 13:提现到账户)", | |||
"description": "页面名称类型值(1:首页 2:会员中心 3:底部导航 4:邀请下载落地页 5:邀请海报 7:下载渠道 8:贡献值 9:蛋蛋分 10:商务合作 11:资质证书 12:提现页 13:提现到账户 14实名认证)", | |||
"name": "mod_name_value", | |||
"in": "query", | |||
"required": true | |||
@@ -2298,9 +2336,7 @@ | |||
"name": "req", | |||
"in": "body", | |||
"required": true, | |||
"schema": { | |||
"type": "object" | |||
} | |||
"schema": {} | |||
} | |||
], | |||
"responses": { | |||
@@ -2929,15 +2965,6 @@ | |||
"name": "Authorization", | |||
"in": "header", | |||
"required": true | |||
}, | |||
{ | |||
"description": "具体参数", | |||
"name": "req", | |||
"in": "body", | |||
"required": true, | |||
"schema": { | |||
"$ref": "#/definitions/md.LaunchBindAlipayAccountReq" | |||
} | |||
} | |||
], | |||
"responses": { | |||
@@ -3015,68 +3042,6 @@ | |||
} | |||
} | |||
}, | |||
"code_fnuoos_com_EggPlanet_egg_models_git_src_model.ImSendRedPackageOrd": { | |||
"type": "object", | |||
"properties": { | |||
"amount": { | |||
"type": "string" | |||
}, | |||
"create_time": { | |||
"type": "string" | |||
}, | |||
"id": { | |||
"type": "integer" | |||
}, | |||
"im_data": { | |||
"type": "string" | |||
}, | |||
"im_uid": { | |||
"type": "integer" | |||
}, | |||
"ord_no": { | |||
"type": "string" | |||
}, | |||
"received_im_user_ids": { | |||
"type": "string" | |||
}, | |||
"received_times": { | |||
"type": "string" | |||
}, | |||
"received_user_amount": { | |||
"type": "string" | |||
}, | |||
"received_user_ids": { | |||
"type": "string" | |||
}, | |||
"red_packet_balance_amount": { | |||
"type": "string" | |||
}, | |||
"red_packet_balance_nums": { | |||
"type": "integer" | |||
}, | |||
"red_packet_nums": { | |||
"type": "integer" | |||
}, | |||
"red_packet_type": { | |||
"type": "integer" | |||
}, | |||
"state": { | |||
"type": "integer" | |||
}, | |||
"uid": { | |||
"type": "integer" | |||
}, | |||
"update_time": { | |||
"type": "string" | |||
}, | |||
"wait_draw_im_user_ids": { | |||
"type": "string" | |||
}, | |||
"wait_draw_user_ids": { | |||
"type": "string" | |||
} | |||
} | |||
}, | |||
"comm.AccessRecordsReq": { | |||
"type": "object", | |||
"properties": { | |||
@@ -3827,9 +3792,7 @@ | |||
"type": "object", | |||
"properties": { | |||
"data": { | |||
"description": "内容", | |||
"type": "object", | |||
"additionalProperties": true | |||
"description": "内容" | |||
}, | |||
"mod_name": { | |||
"description": "模块名称", | |||
@@ -4135,15 +4098,6 @@ | |||
} | |||
} | |||
}, | |||
"md.LaunchBindAlipayAccountReq": { | |||
"type": "object", | |||
"properties": { | |||
"redirect_uri": { | |||
"description": "回调页面,是经过转义的 URL 链接(url 必须以 HTTP 或者 HTTPS 开头)", | |||
"type": "string" | |||
} | |||
} | |||
}, | |||
"md.LoginReq": { | |||
"type": "object", | |||
"required": [ | |||
@@ -4378,6 +4332,9 @@ | |||
"is_need_get_energy": { | |||
"type": "string", | |||
"example": "0不需要获取能量 1弹窗提示 前往蛋蛋乐园获取能量" | |||
}, | |||
"tip_str": { | |||
"type": "string" | |||
} | |||
} | |||
}, | |||
@@ -4420,7 +4377,7 @@ | |||
"description": "红包详情信息", | |||
"allOf": [ | |||
{ | |||
"$ref": "#/definitions/code_fnuoos_com_EggPlanet_egg_models_git_src_model.ImSendRedPackageOrd" | |||
"$ref": "#/definitions/model.ImSendRedPackageOrd" | |||
} | |||
] | |||
}, | |||
@@ -5045,6 +5002,68 @@ | |||
} | |||
} | |||
}, | |||
"model.ImSendRedPackageOrd": { | |||
"type": "object", | |||
"properties": { | |||
"amount": { | |||
"type": "string" | |||
}, | |||
"create_time": { | |||
"type": "string" | |||
}, | |||
"id": { | |||
"type": "integer" | |||
}, | |||
"im_data": { | |||
"type": "string" | |||
}, | |||
"im_uid": { | |||
"type": "integer" | |||
}, | |||
"ord_no": { | |||
"type": "string" | |||
}, | |||
"received_im_user_ids": { | |||
"type": "string" | |||
}, | |||
"received_times": { | |||
"type": "string" | |||
}, | |||
"received_user_amount": { | |||
"type": "string" | |||
}, | |||
"received_user_ids": { | |||
"type": "string" | |||
}, | |||
"red_packet_balance_amount": { | |||
"type": "string" | |||
}, | |||
"red_packet_balance_nums": { | |||
"type": "integer" | |||
}, | |||
"red_packet_nums": { | |||
"type": "integer" | |||
}, | |||
"red_packet_type": { | |||
"type": "integer" | |||
}, | |||
"state": { | |||
"type": "integer" | |||
}, | |||
"uid": { | |||
"type": "integer" | |||
}, | |||
"update_time": { | |||
"type": "string" | |||
}, | |||
"wait_draw_im_user_ids": { | |||
"type": "string" | |||
}, | |||
"wait_draw_user_ids": { | |||
"type": "string" | |||
} | |||
} | |||
}, | |||
"pb.SendRedPacketResp": { | |||
"type": "object", | |||
"properties": { | |||
@@ -12,47 +12,6 @@ definitions: | |||
description: 总数据量 | |||
type: integer | |||
type: object | |||
code_fnuoos_com_EggPlanet_egg_models_git_src_model.ImSendRedPackageOrd: | |||
properties: | |||
amount: | |||
type: string | |||
create_time: | |||
type: string | |||
id: | |||
type: integer | |||
im_data: | |||
type: string | |||
im_uid: | |||
type: integer | |||
ord_no: | |||
type: string | |||
received_im_user_ids: | |||
type: string | |||
received_times: | |||
type: string | |||
received_user_amount: | |||
type: string | |||
received_user_ids: | |||
type: string | |||
red_packet_balance_amount: | |||
type: string | |||
red_packet_balance_nums: | |||
type: integer | |||
red_packet_nums: | |||
type: integer | |||
red_packet_type: | |||
type: integer | |||
state: | |||
type: integer | |||
uid: | |||
type: integer | |||
update_time: | |||
type: string | |||
wait_draw_im_user_ids: | |||
type: string | |||
wait_draw_user_ids: | |||
type: string | |||
type: object | |||
comm.AccessRecordsReq: | |||
properties: | |||
index: | |||
@@ -571,9 +530,7 @@ definitions: | |||
md.GetModuleSettingResp: | |||
properties: | |||
data: | |||
additionalProperties: true | |||
description: 内容 | |||
type: object | |||
mod_name: | |||
description: 模块名称 | |||
type: string | |||
@@ -786,12 +743,6 @@ definitions: | |||
description: 能否签到 | |||
type: boolean | |||
type: object | |||
md.LaunchBindAlipayAccountReq: | |||
properties: | |||
redirect_uri: | |||
description: 回调页面,是经过转义的 URL 链接(url 必须以 HTTP 或者 HTTPS 开头) | |||
type: string | |||
type: object | |||
md.LoginReq: | |||
properties: | |||
code: | |||
@@ -957,6 +908,8 @@ definitions: | |||
is_need_get_energy: | |||
example: 0不需要获取能量 1弹窗提示 前往蛋蛋乐园获取能量 | |||
type: string | |||
tip_str: | |||
type: string | |||
type: object | |||
md.RealNameAuthResp: | |||
properties: | |||
@@ -984,7 +937,7 @@ definitions: | |||
properties: | |||
detail: | |||
allOf: | |||
- $ref: '#/definitions/code_fnuoos_com_EggPlanet_egg_models_git_src_model.ImSendRedPackageOrd' | |||
- $ref: '#/definitions/model.ImSendRedPackageOrd' | |||
description: 红包详情信息 | |||
list: | |||
description: 领取红包用户列表 | |||
@@ -1414,6 +1367,47 @@ definitions: | |||
description: 余额 | |||
type: string | |||
type: object | |||
model.ImSendRedPackageOrd: | |||
properties: | |||
amount: | |||
type: string | |||
create_time: | |||
type: string | |||
id: | |||
type: integer | |||
im_data: | |||
type: string | |||
im_uid: | |||
type: integer | |||
ord_no: | |||
type: string | |||
received_im_user_ids: | |||
type: string | |||
received_times: | |||
type: string | |||
received_user_amount: | |||
type: string | |||
received_user_ids: | |||
type: string | |||
red_packet_balance_amount: | |||
type: string | |||
red_packet_balance_nums: | |||
type: integer | |||
red_packet_nums: | |||
type: integer | |||
red_packet_type: | |||
type: integer | |||
state: | |||
type: integer | |||
uid: | |||
type: integer | |||
update_time: | |||
type: string | |||
wait_draw_im_user_ids: | |||
type: string | |||
wait_draw_user_ids: | |||
type: string | |||
type: object | |||
pb.SendRedPacketResp: | |||
properties: | |||
seq: | |||
@@ -2041,6 +2035,31 @@ paths: | |||
summary: 实名认证-保存 | |||
tags: | |||
- 实名认证 | |||
/api/v1/faceRealName/state: | |||
get: | |||
consumes: | |||
- application/json | |||
description: 实名认证-分类 | |||
parameters: | |||
- description: 验证参数Bearer和token空格拼接 | |||
in: header | |||
name: Authorization | |||
required: true | |||
type: string | |||
produces: | |||
- application/json | |||
responses: | |||
"200": | |||
description: 具体数据 | |||
schema: | |||
$ref: '#/definitions/md.RealNameAuthBasicData' | |||
"400": | |||
description: 具体错误 | |||
schema: | |||
$ref: '#/definitions/md.Response' | |||
summary: 实名认证-基础信息 | |||
tags: | |||
- 实名认证 | |||
/api/v1/fastLogin: | |||
post: | |||
consumes: | |||
@@ -2104,7 +2123,8 @@ paths: | |||
name: Authorization | |||
required: true | |||
type: string | |||
- description: 页面名称类型值(1:首页 2:会员中心 3:底部导航 4:邀请下载落地页 5:邀请海报 7:下载渠道 8:贡献值 9:蛋蛋分 10:商务合作 11:资质证书 12:提现页 13:提现到账户) | |||
- description: 页面名称类型值(1:首页 2:会员中心 3:底部导航 4:邀请下载落地页 5:邀请海报 7:下载渠道 8:贡献值 9:蛋蛋分 10:商务合作 11:资质证书 12:提现页 13:提现到账户 | |||
14实名认证) | |||
in: query | |||
name: mod_name_value | |||
required: true | |||
@@ -2934,8 +2954,7 @@ paths: | |||
in: body | |||
name: req | |||
required: true | |||
schema: | |||
type: object | |||
schema: {} | |||
produces: | |||
- application/json | |||
responses: | |||
@@ -3351,12 +3370,6 @@ paths: | |||
name: Authorization | |||
required: true | |||
type: string | |||
- description: 具体参数 | |||
in: body | |||
name: req | |||
required: true | |||
schema: | |||
$ref: '#/definitions/md.LaunchBindAlipayAccountReq' | |||
produces: | |||
- application/json | |||
responses: | |||