feat:完善项目

This commit is contained in:
henry
2021-11-04 15:15:11 +08:00
parent 288c74dc41
commit 153df336b8
18 changed files with 898 additions and 76 deletions

21
app/api/config.go Normal file
View File

@ -0,0 +1,21 @@
package api
import (
"ArmedPolice/app/controller/config"
"ArmedPolice/app/service"
"github.com/gin-gonic/gin"
)
type Config struct{}
func (*Config) Area(c *gin.Context) {
form := &struct {
Key string `json:"key" form:"key"`
}{}
if err := bind(form)(c); err != nil {
APIFailure(err.(error))(c)
return
}
data := config.NewInstance()(getSession()(c).(*service.Session)).Area(form.Key)
APIResponse(nil, data)
}