兼容 两种写法
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
package account
|
||||
|
||||
import "github.com/gin-gonic/gin"
|
||||
|
||||
// 注册使用email
|
||||
func PostRegisterWithEmail(ctx *gin.Context) {
|
||||
|
||||
}
|
||||
@@ -15,6 +15,7 @@ import (
|
||||
func BaseGetToken(ctx *gin.Context) {
|
||||
param := &BaseGetTokenParam{}
|
||||
ctx.ShouldBind(param)
|
||||
// model.Models.KillaraCustomerModel.Find()
|
||||
log.Println()
|
||||
}
|
||||
|
||||
@@ -30,7 +31,9 @@ func BaseGetToken(ctx *gin.Context) {
|
||||
// version?: string;
|
||||
func AccountLoginWithTelephonePassword(ctx *gin.Context) {
|
||||
// ctx.ShouldBind()
|
||||
log.Println()
|
||||
// model.Models.KillaraCustomerModel.Find()
|
||||
|
||||
// log.Println(param)
|
||||
}
|
||||
|
||||
// @Action account/registerSmsCode
|
||||
@@ -62,6 +65,7 @@ func AccountForgetSmsCode(ctx *gin.Context) {
|
||||
// token: string;
|
||||
func AccountRegisterEmailCode(ctx *gin.Context) {
|
||||
// ctx.ShouldBind()
|
||||
|
||||
log.Println()
|
||||
}
|
||||
|
||||
|
||||
@@ -4,16 +4,26 @@ import (
|
||||
"log"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/iapologizewhenimwrong/Vestmore_GO/model"
|
||||
"github.com/iapologizewhenimwrong/Vestmore_GO/server/app/internal/handlers"
|
||||
|
||||
_ "github.com/go-sql-driver/mysql"
|
||||
)
|
||||
|
||||
func AppV10(ctx *gin.Context) {
|
||||
|
||||
if actionKey, ok := ctx.GetPostForm("action"); ok {
|
||||
// if token, ok := ctx.GetPostForm("token"); ok {
|
||||
|
||||
// }
|
||||
handlers.HandlersFuncRoutes[actionKey](ctx)
|
||||
}
|
||||
}
|
||||
|
||||
func main() {
|
||||
|
||||
model.Models.SetSqlxDriver("mysql", "php:aFk3i4Dj#76!4sd@tcp(47.243.100.6:3306)/zunxinfinance?charset=utf8mb4&timeout=10s")
|
||||
|
||||
r := gin.Default()
|
||||
v10 := r.Group("app")
|
||||
|
||||
|
||||
@@ -1,7 +1,16 @@
|
||||
package main
|
||||
|
||||
import "testing"
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
"github.com/iapologizewhenimwrong/Vestmore_GO/model"
|
||||
|
||||
_ "github.com/go-sql-driver/mysql"
|
||||
)
|
||||
|
||||
func TestMain(t *testing.T) {
|
||||
model.Models.SetSqlxDriver("mysql", "php:aFk3i4Dj#76!4sd@tcp(47.243.100.6:3306)/zunxinfinance?parseTime=true&charset=utf8mb4&timeout=10s")
|
||||
model.Models.KillaraCustomerModel.Find(context.TODO())
|
||||
main()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user