diff --git a/server/websocket/internal/logic/datatransferlogic.go b/server/websocket/internal/logic/datatransferlogic.go index d999d8e3..a282f726 100644 --- a/server/websocket/internal/logic/datatransferlogic.go +++ b/server/websocket/internal/logic/datatransferlogic.go @@ -84,7 +84,7 @@ func (l *DataTransferLogic) DataTransfer(svcCtx *svc.ServiceContext, w http.Resp } defer conn.Close() //鉴权不成功10秒后断开 - var ( + /*var ( userInfo *auth.UserInfo isAuth bool ) @@ -101,7 +101,10 @@ func (l *DataTransferLogic) DataTransfer(svcCtx *svc.ServiceContext, w http.Resp //发送关闭信息 _ = conn.WriteMessage(websocket.CloseMessage, nil) return - } + }*/ + //测试的目前写死 39 + var userInfo auth.UserInfo + userInfo.UserId = 39 //生成连接唯一标识 uniqueId := websocketIdGenerator.Get() ws := wsConnectItem{ diff --git a/server/websocket/internal/logic/ws_render_image_logic.go b/server/websocket/internal/logic/ws_render_image_logic.go index 978154d0..2b2e860b 100644 --- a/server/websocket/internal/logic/ws_render_image_logic.go +++ b/server/websocket/internal/logic/ws_render_image_logic.go @@ -23,7 +23,7 @@ type renderImageControlChanItem struct { // 渲染发送到组装数据组装数据 func (w *wsConnectItem) renderImage(data []byte) { - var renderImageData websocket_data.RenderImageReqMsg + var renderImageData websocket_data.AssembleRenderData if err := json.Unmarshal(data, &renderImageData); err != nil { w.outChan <- w.respondDataFormat(constants.WEBSOCKET_ERR_DATA_FORMAT, "invalid format of websocket render image message:"+string(data)) logx.Error("invalid format of websocket render image message", err)