修改部分路由

This commit is contained in:
邹宗楠
2022-08-11 15:20:03 +08:00
parent 7d874eca22
commit 0c62addc11
5 changed files with 9 additions and 12 deletions

View File

@@ -75,7 +75,6 @@ func (p *PrinterTemp) DeleteTemp(c *gin.Context) {
// @Title 获取用户模板
// @Description 获取用户模板
// @Param token cookie string true "用户登录token"
// @Param data body app_model.DeleteTemp true "请求参数"
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
// @router /getUserTempList [get]

View File

@@ -90,7 +90,7 @@ func (p *Print) GetPrinters(c *gin.Context) {
// @Title 删除打印机
// @Description 删除打印机
// @Param token cookie string true "用户登录token"
// @Param data body app_model.QueryPrintReq true "请求参数"
// @Param data body app_model.DeletePrintReq true "请求参数"
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
// @router /delPrinters [post]
@@ -163,7 +163,7 @@ func (p *Print) UpdatePrinter(c *gin.Context) {
// @Title 测试打印
// @Description 测试打印
// @Param token cookie string true "用户登录token"
// @Param data body app_model.UpdatePrintReq true "请求参数"
// @Param data body app_model.TestPrintReq true "请求参数"
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
// @router /testPrinter [post]
@@ -196,7 +196,7 @@ func (p *Print) TestPrint(c *gin.Context) {
// @Title 获取打印机消息
// @Description 获取打印机消息
// @Param token cookie string true "用户登录token"
// @Param data body app_model.UpdatePrintReq true "请求参数"
// @Param data body app_model.GetPrintMsg true "请求参数"
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
// @router /getPrintMessages [get]

View File

@@ -9,13 +9,11 @@ import (
func Init(r *gin.Engine) {
// 需要token-管理系统
InitV2System(r.Group("/v2"))
//v1是不需要token的-管理系统
InitV1System(r.Group("v1"))
// app端不需要token
InitV3App(r.Group("/v1"))
//v1是不需要token的-管理系统
InitV1System(r.Group("v1"))
// app端需要token
InitV4App(r.Group("/v2"))

View File

@@ -11,8 +11,4 @@ func InitV3App(v2 *gin.RouterGroup) {
appNo.POST("/getUserPhone", app.Auth2ControllerController.GetUserPhoneByWeChat) // 获取微信用户电话
appNo.POST("/login", app.Auth2ControllerController.Login) // 微信登录
//
appNo.POST("/getToken4Jxc4", app.Auth2ControllerController.GetToken4Jxc4) // 微信登录京西菜市,获取菜市token
}

View File

@@ -28,4 +28,8 @@ func InitV4App(v2 *gin.RouterGroup) {
// 打印机设置
setting := v2.Group("/setting")
setting.POST("updatePrintSetting", app.PrintSettingController.UpdatePrintSetting) // 打印机设置修改
//
appYes.POST("/getToken4Jxc4", app.Auth2ControllerController.GetToken4Jxc4) // 微信登录京西菜市,获取菜市token
}