fix
This commit is contained in:
8
utils/websocket_data/notify_data.go
Normal file
8
utils/websocket_data/notify_data.go
Normal file
@@ -0,0 +1,8 @@
|
||||
package websocket_data
|
||||
|
||||
// 请求回调接口数据(登录|注册)
|
||||
type NotifyData struct {
|
||||
WebsocketConnectId string `json:"websocket_connect_id"` //websocket连接唯一标识
|
||||
RequestTime int64 `json:"request_time"` //请求回调时的utc时间
|
||||
Data interface{} `json:"data"` //其他数据
|
||||
}
|
||||
38
utils/websocket_data/render_data.go
Normal file
38
utils/websocket_data/render_data.go
Normal file
@@ -0,0 +1,38 @@
|
||||
package websocket_data
|
||||
|
||||
import "fusenapi/constants"
|
||||
|
||||
// websocket数据交互基本数据类型
|
||||
type DataTransferData struct {
|
||||
T constants.Websocket `json:"t"` //消息类型
|
||||
D interface{} `json:"d"` //传递的消息
|
||||
}
|
||||
|
||||
// websocket接受要云渲染处理的数据
|
||||
type RenderImageReqMsg struct {
|
||||
RenderId string `json:"render_id"` //渲染id
|
||||
RenderData RenderData `json:"render_data"`
|
||||
}
|
||||
type RenderData struct {
|
||||
TemplateTag string `json:"template_tag"` //模板标签(必须)
|
||||
ProductId int64 `json:"product_id"` //产品id(必须)
|
||||
Website string `json:"website"` //网站(可选)
|
||||
Slogan string `json:"slogan"` //slogan(可选)
|
||||
Address string `json:"address"` //地址(可选)
|
||||
Phone string `json:"phone"` //电话(可选)
|
||||
UserId int64 `json:"user_id"` //用户id(websocket连接建立再赋值)
|
||||
GuestId int64 `json:"guest_id"` //游客id(websocket连接建立再赋值)
|
||||
Logo string `json:"logo"` //log资源地址(websocket连接建立再赋值)
|
||||
}
|
||||
|
||||
// websocket发送渲染完的数据
|
||||
type RenderImageRspMsg struct {
|
||||
RenderId string `json:"render_id"` //渲染id
|
||||
Image string `json:"image"` //渲染结果图片
|
||||
CombineTakesTime string `json:"combine_takes_time"` //合图需要时间
|
||||
UnityRenderTakesTime string `json:"unity_render_takes_time"` //unity渲染用时
|
||||
}
|
||||
type ThirdPartyLoginRspMsg struct {
|
||||
//websocket三方登录的通知数据
|
||||
Token string `json:"token"`
|
||||
}
|
||||
Reference in New Issue
Block a user