36 lines
693 B
Go
36 lines
693 B
Go
package api
|
|
|
|
import (
|
|
"SciencesServer/app/basic/api"
|
|
"SciencesServer/app/enterprise/controller/config"
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
type Config struct{}
|
|
|
|
func (a *Config) Identity(c *gin.Context) {
|
|
data := config.NewConfig().Identity()
|
|
api.APISuccess(data)
|
|
}
|
|
|
|
func (a *Config) Transaction(c *gin.Context) {
|
|
data := config.NewConfig().Transaction()
|
|
api.APISuccess(data)
|
|
}
|
|
|
|
func (a *Config) Industry(c *gin.Context) {
|
|
|
|
}
|
|
|
|
func (a *Config) Area(c *gin.Context) {
|
|
form := &struct {
|
|
Key string `json:"key" form:"key"`
|
|
}{}
|
|
if err := api.Bind(form)(c); err != nil {
|
|
api.APIFailure(err.(error))(c)
|
|
return
|
|
}
|
|
data := config.NewConfig().Area(form.Key)
|
|
api.APIResponse(nil, data)(c)
|
|
}
|