package controllers
|
|
import (
|
"webserver/extend/code"
|
"webserver/extend/util"
|
|
"github.com/gin-gonic/gin"
|
)
|
|
type PanTiltController struct {
|
}
|
|
type PTInstruct struct {
|
ChannelId string `json:"channelId"` //服务器id
|
PTZType string `json:"ptzType"` //轮询周期
|
PTZParam int32 `json:"ptzParam"` //延时时间
|
}
|
|
func (controller PanTiltController) Controlling(c *gin.Context) {
|
var param PTInstruct
|
if err := c.BindJSON(¶m); err != nil {
|
util.ResponseFormat(c, code.RequestParamError, "参数有误")
|
return
|
}
|
|
b := true
|
if b {
|
util.ResponseFormat(c, code.Success, "")
|
} else {
|
util.ResponseFormat(c, code.ComError, "保存失败")
|
}
|
}
|