package myself import ( "Cold_Logistic/internal/server/adapter/http/middleware" "github.com/gin-gonic/gin" ) func Register(r *gin.RouterGroup) { api := NewApi() myself := r.Group("/myself") myself.Use(middleware.Auth()) myself.GET("/info", api.myselfInfo) // 个人信息 myself.POST("/update", api.updateMyselfInfo) // 修改个人信息 myself.POST("/refreshToken", api.refreshToken) // 刷新token myself.POST("/address/page", api.addressPage) // 寄件/收件人列表 myself.POST("/address/add", api.addAddress) // 添加寄件/收件人 myself.POST("/address/update", api.updateAddress) // 修改寄件/收件人 myself.POST("/address/delete", api.deleteAddress) // 删除寄件/收件人 myself.POST("/logisticCompany/page", api.logisticPage) // 物流公司列表 myself.POST("/logisticCompany/add", api.addLogistic) // 物流公司添加 myself.POST("/logisticCompany/delete", api.deleteLogistic) // 物流公司删除 myself.POST("/placeOrder", api.placeOrder) // 下单 myself.POST("/orderPage", api.orderPage) // 订单列表 myself.POST("/orderDetail", api.orderDetail) // 订单详情 myself.POST("/orderSubNo", api.orderSubNo) // 订单揽件码 return } type Api struct{} func NewApi() Api { return Api{} }