feat:完善信息
This commit is contained in:
@ -23,37 +23,37 @@ type (
|
||||
}
|
||||
// patentForm 专利参数
|
||||
patentForm struct {
|
||||
Title string `json:"title" form:"title"`
|
||||
IPCCode string `json:"ipc_code" form:"ipc_code"`
|
||||
CPCCode string `json:"cpc_code" form:"cpc_code"`
|
||||
ApplyCode string `json:"apply_code" form:"apply_code"`
|
||||
ApplyName string `json:"apply_name" form:"apply_name"`
|
||||
ApplyAddress string `json:"apply_address" form:"apply_address"`
|
||||
ApplyZipCode string `json:"apply_zip_code" form:"apply_zip_code"`
|
||||
Inventor string `json:"inventor" form:"inventor"`
|
||||
PriorityCode string `json:"priority_code" form:"priority_code"`
|
||||
OpenCode string `json:"open_code" form:"open_code"`
|
||||
ApplyAt string `json:"apply_at" form:"apply_at"`
|
||||
PriorityAt string `json:"priority_at" form:"priority_at"`
|
||||
OpenAt string `json:"open_at" form:"open_at"`
|
||||
Title string `json:"title" form:"title" binding:"required"`
|
||||
IPCCode string `json:"ipc_code" form:"ipc_code" binding:"required"`
|
||||
CPCCode string `json:"cpc_code" form:"cpc_code" binding:"required"`
|
||||
ApplyCode string `json:"apply_code" form:"apply_code" binding:"required"`
|
||||
ApplyName string `json:"apply_name" form:"apply_name" binding:"required"`
|
||||
ApplyAddress string `json:"apply_address" form:"apply_address" binding:"required"`
|
||||
ApplyZipCode string `json:"apply_zip_code" form:"apply_zip_code" binding:"required"`
|
||||
Inventor string `json:"inventor" form:"inventor" binding:"required"`
|
||||
PriorityCode string `json:"priority_code" form:"priority_code" binding:"required"`
|
||||
OpenCode string `json:"open_code" form:"open_code" binding:"required"`
|
||||
ApplyAt string `json:"apply_at" form:"apply_at" binding:"required"`
|
||||
PriorityAt string `json:"priority_at" form:"priority_at" binding:"required"`
|
||||
OpenAt string `json:"open_at" form:"open_at" binding:"required"`
|
||||
}
|
||||
// demandForm 需求参数
|
||||
demandForm struct {
|
||||
Title string `json:"title"`
|
||||
Introduce string `json:"introduce"`
|
||||
Name string `json:"name"`
|
||||
Mobile string `json:"mobile"`
|
||||
Deadline string `json:"deadline"`
|
||||
Industry []string `json:"industry"`
|
||||
Kinds []string `json:"kinds"`
|
||||
Title string `json:"title" form:"title" binding:"required"`
|
||||
Introduce string `json:"introduce" form:"introduce" binding:"required"`
|
||||
Name string `json:"name" form:"name" binding:"required"`
|
||||
Mobile string `json:"mobile" form:"mobile" binding:"required"`
|
||||
Deadline string `json:"deadline" form:"deadline" binding:"required"`
|
||||
Industry []string `json:"industry" form:"industry" binding:"required"`
|
||||
Kinds []string `json:"kinds" form:"kinds" binding:"required"`
|
||||
config.Area
|
||||
Budget float64 `json:"budget"`
|
||||
BudgetMode int `json:"budget_mode"`
|
||||
Expect []string `json:"expect"` // 期望合作的企业及模式
|
||||
DemandBasic string `json:"demand_basic"` // 基础
|
||||
DemandExpect string `json:"demand_expect"` // 预期
|
||||
DemandBenefit string `json:"demand_benefit"` // 效益
|
||||
Status int `json:"status"`
|
||||
Budget float64 `json:"budget" form:"budget"`
|
||||
BudgetMode int `json:"budget_mode" form:"budget_mode"`
|
||||
Expect []string `json:"expect" form:"expect"` // 期望合作的企业及模式
|
||||
DemandBasic string `json:"demand_basic" form:"demand_basic"` // 基础
|
||||
DemandExpect string `json:"demand_expect" form:"demand_expect"` // 预期
|
||||
DemandBenefit string `json:"demand_benefit" form:"demand_benefit"` // 效益
|
||||
Status int `json:"status" form:"status"`
|
||||
}
|
||||
)
|
||||
|
||||
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user