feat:完善信息

This commit is contained in:
henry
2021-10-15 11:50:57 +08:00
parent 4fc13250f1
commit bea9ceabba
3 changed files with 52 additions and 31 deletions

View File

@ -7,7 +7,8 @@ import (
"github.com/gin-gonic/gin"
)
func registerAPi(app *gin.Engine) {
// registerAPI 注册API
func registerAPI(app *gin.Engine) {
apiPrefix := "/api"
g := app.Group(apiPrefix)
// 登录验证
@ -114,7 +115,8 @@ func registerAPi(app *gin.Engine) {
}
}
func registerEnterprise(app *gin.Engine) {
// registerEnterpriseAPI 注册企业/管家后台API
func registerEnterpriseAPI(app *gin.Engine) {
apiPrefix := "/enterprise"
g := app.Group(apiPrefix)
// Config 配置管理
@ -123,4 +125,23 @@ func registerEnterprise(app *gin.Engine) {
_api := new(api3.Config)
config.GET("/area", _api.Area)
}
// Technology 技术管理
technology := g.Group("/technology")
{
_api := new(api3.Technology)
technology.POST("/paper", _api.Paper)
technology.POST("/paper/add", _api.PaperAdd)
technology.POST("/paper/edit", _api.PaperEdit)
technology.POST("/paper/delete", _api.PaperDelete)
technology.POST("/patent", _api.Patent)
technology.POST("/patent/detail", _api.PatentDetail)
technology.POST("/patent/add", _api.PatentAdd)
technology.POST("/patent/edit", _api.PatentEdit)
technology.POST("/patent/delete", _api.PatentDelete)
technology.POST("/demand", _api.Demand)
technology.POST("/demand/detail", _api.DemandDetail)
technology.POST("/demand/add", _api.DemandAdd)
technology.POST("/demand/edit", _api.DemandEdit)
technology.POST("/demand/delete", _api.DemandDelete)
}
}

View File

@ -56,8 +56,8 @@ func (this *Router) Init() *gin.Engine {
}
app.StaticFS("/upload", http.Dir("./upload"))
// 注册路由
registerAPi(app)
registerEnterprise(app)
registerAPI(app)
registerEnterpriseAPI(app)
app.MaxMultipartMemory = 4 << 20