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.
|
|
|
|
package shiyan
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"fmt"
|
|
|
|
|
|
|
|
|
|
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
|
|
|
|
"github.com/flipped-aurora/gin-vue-admin/server/model/common/response"
|
|
|
|
|
"github.com/flipped-aurora/gin-vue-admin/server/model/testpage"
|
|
|
|
|
"github.com/gin-gonic/gin"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
type ShiyanApi struct {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (a *ShiyanApi) AddBaseMenu(c *gin.Context) {
|
|
|
|
|
var answerMap testpage.Answer
|
|
|
|
|
err := global.GVA_DB_Master.First(&answerMap)
|
|
|
|
|
if err != nil {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
fmt.Printf("%v\n", answerMap)
|
|
|
|
|
response.Ok(c)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//get请求获参
|
|
|
|
|
func (a *ShiyanApi) GetRequestOperation(c *gin.Context) {
|
|
|
|
|
id := c.Query("id")
|
|
|
|
|
fmt.Printf("====>%v\n", id)
|
|
|
|
|
response.Ok(c)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//get请求获参
|
|
|
|
|
type postGroupCanshu struct {
|
|
|
|
|
Id int `json:"id" from:"id"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (a *ShiyanApi) PostRequestOperation(c *gin.Context) {
|
|
|
|
|
var ids postGroupCanshu
|
|
|
|
|
_ = c.ShouldBindJSON(&ids)
|
|
|
|
|
// name := c.Query("id")
|
|
|
|
|
fmt.Printf("====>%v\n", ids.Id)
|
|
|
|
|
response.Ok(c)
|
|
|
|
|
}
|