2021-11-04 15:15:11 +08:00
|
|
|
package api
|
|
|
|
|
|
|
|
import (
|
|
|
|
"ArmedPolice/app/controller/config"
|
|
|
|
"ArmedPolice/app/service"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
|
|
)
|
|
|
|
|
|
|
|
type Config struct{}
|
|
|
|
|
2021-11-04 15:44:35 +08:00
|
|
|
/**
|
|
|
|
* @apiDefine Config 配置管理
|
|
|
|
*/
|
|
|
|
|
2021-11-04 15:15:11 +08:00
|
|
|
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)
|
|
|
|
}
|