123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- package route
- import (
- "github.com/gin-gonic/gin"
- "youngee_m_api/handler"
- "youngee_m_api/handler/operate"
- "youngee_m_api/model/http_model"
- )
- func InitRoute(r *gin.Engine) {
- r.POST("/login", handler.WrapCodeLoginHandler)
- r.GET("/getLoginUser", handler.WrapGetLoginUserHandler)
- r.POST("/userInfo", handler.WrapGetUserInfoHandler)
- r.GET("/test/ping", func(c *gin.Context) {
- resp := http_model.CommonResponse{
- Status: 0,
- Message: "",
- Data: "ping",
- }
- c.JSON(200, resp)
- })
- m := r.Group("/youngee/m")
- {
- m.POST("/test", func(c *gin.Context) {
- resp := http_model.CommonResponse{
- Status: 0,
- Message: "",
- Data: "ping",
- }
- c.JSON(200, resp)
- })
- m.POST("/product/list", handler.WrapFullProjectListHandler)
- m.POST("/project/show", handler.WrapShowProjectHandler)
- m.POST("/project/handle", handler.WrapProjectHandleHandler)
- m.POST("/product/findall", handler.WrapFindAllProductHandler)
- m.POST("/project/create", handler.WrapCreateProjectHandler)
- m.POST("/product/create", handler.WrapCreateProductHandler)
- m.POST("/product/find", handler.WrapFindProductHandler)
- m.POST("/pay/paysum", handler.WrapPaySumHandler)
- m.POST("/project/update", handler.WrapUpdateProjectHandler)
- m.POST("/project/approve", handler.WrapApproveProjectHandler)
- m.POST("/project/all", handler.WrapGetAllProjectHandler)
- m.POST("/project/taskList", handler.WrapProjectTaskListHandler)
- }
- u := r.Group("/youngee/m/user")
- {
- u.POST("/getUserList", handler.WrapGetUserListHandler)
- u.POST("/updateUserInfo", handler.WrapUpdateUserInfoHandler)
- u.POST("/createUser", handler.WrapCreateUserHandler)
- u.POST("/disabledUser", handler.WrapDisabledUserHandler)
- u.POST("/enterpriseUser", handler.WrapEnterpriseUserHandler)
- u.POST("/creatorList", handler.WrapCreatorListHandler)
- u.POST("/platformAccInfo", handler.WrapPlatformAccInfoHandler)
- u.POST("/talentInfo", handler.WrapTalentInfoHandler)
- u.POST("/accountInfo", handler.WrapAccountInfoHandler)
- u.POST("/deleteAccount", handler.WrapDeleteAccountHandler)
- u.POST("/getTaskRecord", handler.WrapGetTaskRecordHandler)
- }
- o := r.Group("/youngee/m/operate")
- {
- o.POST("/addPricing", operate.WrapAddPricingHandler)
- o.POST("/searchPricing", operate.WrapSearchPricingHandler)
- o.POST("/modifyPricing", operate.WrapModifyPricingHandler)
- }
- }
|