You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
400 B
22 lines
400 B
package testroute
|
|
|
|
import (
|
|
"fmt"
|
|
"key_performance_indicators/overall/publicmethod"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
func (a *ApiMethod) MyTest(ctx *gin.Context) {
|
|
|
|
name := ctx.PostForm("name")
|
|
fmt.Printf("传入的Name为:%v\n", name)
|
|
var p1 Person
|
|
|
|
err := ctx.Bind(&p1)
|
|
if err != nil {
|
|
publicmethod.Result(1, err.Error(), ctx)
|
|
}
|
|
fmt.Printf("%#v\n", p1)
|
|
publicmethod.Result(0, p1, ctx)
|
|
}
|
|
|