aa
This commit is contained in:
20
controllers/api_controller.go
Normal file
20
controllers/api_controller.go
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
package controllers
|
||||||
|
|
||||||
|
import "github.com/astaxie/beego/server/web"
|
||||||
|
|
||||||
|
type ApiController struct {
|
||||||
|
web.Controller
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Title 添加打印机
|
||||||
|
// @Description 添加打印机
|
||||||
|
// @Param app_id formData string true "应用ID"
|
||||||
|
// @Param timestamp formData int true "unix时间戳"
|
||||||
|
// @Param sign formData string true "签名"
|
||||||
|
// @Param method formData string true "接口名"
|
||||||
|
// @Success 200 {object} controllers.CallResult
|
||||||
|
// @Failure 200 {object} controllers.CallResult
|
||||||
|
// @router /AddPrint [post]
|
||||||
|
//func (c *PrintController) AddPrint() {
|
||||||
|
//
|
||||||
|
//}
|
||||||
@@ -8,14 +8,11 @@ type PrintController struct {
|
|||||||
beego.Controller
|
beego.Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
type CallBackPrint struct {
|
|
||||||
Data string `json:"data"`
|
|
||||||
Code string `json:"code"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// @Title 添加打印机
|
// @Title 添加打印机
|
||||||
// @Description 添加打印机
|
// @Description 添加打印机
|
||||||
// @Param token header string true "认证token"
|
// @Param app_id formData string true "应用ID"
|
||||||
|
// @Param timestamp formData int true "unix时间戳"
|
||||||
|
// @Param sign formData string true "签名"
|
||||||
// @Success 200 {object} controllers.CallResult
|
// @Success 200 {object} controllers.CallResult
|
||||||
// @Failure 200 {object} controllers.CallResult
|
// @Failure 200 {object} controllers.CallResult
|
||||||
// @router /AddPrint [post]
|
// @router /AddPrint [post]
|
||||||
|
|||||||
@@ -20,6 +20,11 @@ func init() {
|
|||||||
&controllers.PrintController{},
|
&controllers.PrintController{},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
web.NSNamespace("/api",
|
||||||
|
web.NSInclude(
|
||||||
|
&controllers.ApiController{},
|
||||||
|
),
|
||||||
|
),
|
||||||
)
|
)
|
||||||
ns2 := web.NewNamespace("/v2",
|
ns2 := web.NewNamespace("/v2",
|
||||||
web.NSNamespace("/task",
|
web.NSNamespace("/task",
|
||||||
|
|||||||
Reference in New Issue
Block a user