1.修复文档模块数据解析错误(鼠标模块的数据发送到了文档模块);2.修改课堂状态更新时全员禁言状态值不正确的问题;3.鼠标激光笔模块tableid不正确
正在显示
5 个修改的文件
包含
19 行增加
和
11 行删除
此 diff 太大无法显示。
| @@ -34,7 +34,7 @@ import mdetect from "mdetect"; | @@ -34,7 +34,7 @@ import mdetect from "mdetect"; | ||
| 34 | import UTF8 from 'utf-8'; | 34 | import UTF8 from 'utf-8'; |
| 35 | 35 | ||
| 36 | let loger = Loger.getLoger('McuClient'); | 36 | let loger = Loger.getLoger('McuClient'); |
| 37 | -let _sdkInfo = { "version": "v1.38.4.20170629", "author": "www.3mang.com" }; | 37 | +let _sdkInfo = { "version": "v1.39.1.20170705", "author": "www.3mang.com" }; |
| 38 | 38 | ||
| 39 | //APE | 39 | //APE |
| 40 | let _sass; | 40 | let _sass; |
| @@ -967,7 +967,7 @@ class ConferApe extends Ape { | @@ -967,7 +967,7 @@ class ConferApe extends Ape { | ||
| 967 | classStatusInfo.activeDocCurPage = GlobalConfig.activeDocCurPage; //当前激活的文档的当前页 | 967 | classStatusInfo.activeDocCurPage = GlobalConfig.activeDocCurPage; //当前激活的文档的当前页 |
| 968 | classStatusInfo.isStopAllPublishMedia = _param.isStopAllPublishMedia || false; | 968 | classStatusInfo.isStopAllPublishMedia = _param.isStopAllPublishMedia || false; |
| 969 | classStatusInfo.currentSceneTableId = GlobalConfig.currentSceneTableId; | 969 | classStatusInfo.currentSceneTableId = GlobalConfig.currentSceneTableId; |
| 970 | - classStatusInfo.silence = _param.silence || false; | 970 | + classStatusInfo.silence = _param.silence || GlobalConfig.silence; |
| 971 | //loger.log("classStatusInfo--->", classStatusInfo); | 971 | //loger.log("classStatusInfo--->", classStatusInfo); |
| 972 | 972 | ||
| 973 | /* | 973 | /* |
| @@ -49,7 +49,7 @@ class CursorApe extends Ape { | @@ -49,7 +49,7 @@ class CursorApe extends Ape { | ||
| 49 | // 添加鼠标 | 49 | // 添加鼠标 |
| 50 | sendInsertCursor(_param) { | 50 | sendInsertCursor(_param) { |
| 51 | if (_param == null || EngineUtils.isEmptyObject(_param)) { | 51 | if (_param == null || EngineUtils.isEmptyObject(_param)) { |
| 52 | - loger.warn('添加标注失败->参数错误->', _param); | 52 | + loger.warn('添加激光笔失败->参数错误->', _param); |
| 53 | this._emit(MessageTypes.MCU_ERROR, MessageTypes.ERR_APE_INTERFACE_PARAM_WRONG); | 53 | this._emit(MessageTypes.MCU_ERROR, MessageTypes.ERR_APE_INTERFACE_PARAM_WRONG); |
| 54 | return; | 54 | return; |
| 55 | } | 55 | } |
| @@ -57,7 +57,7 @@ class CursorApe extends Ape { | @@ -57,7 +57,7 @@ class CursorApe extends Ape { | ||
| 57 | let itemIdx = ApeConsts.CURSOR_OBJ_TABLE_ID; | 57 | let itemIdx = ApeConsts.CURSOR_OBJ_TABLE_ID; |
| 58 | let cursorModelPdu = this.packPdu(_param, itemIdx); | 58 | let cursorModelPdu = this.packPdu(_param, itemIdx); |
| 59 | if (cursorModelPdu == null) { | 59 | if (cursorModelPdu == null) { |
| 60 | - loger.warn('添加标注失败-->参数错误->', _param); | 60 | + loger.warn('添加激光笔失败-->参数错误->', _param); |
| 61 | this._emit(MessageTypes.MCU_ERROR, MessageTypes.ERR_APE_INTERFACE_PARAM_WRONG); | 61 | this._emit(MessageTypes.MCU_ERROR, MessageTypes.ERR_APE_INTERFACE_PARAM_WRONG); |
| 62 | return; | 62 | return; |
| 63 | } | 63 | } |
| @@ -71,11 +71,11 @@ class CursorApe extends Ape { | @@ -71,11 +71,11 @@ class CursorApe extends Ape { | ||
| 71 | let tableInsertItemPdu = new pdu['RCRegistryTableUpdateItemPdu']; | 71 | let tableInsertItemPdu = new pdu['RCRegistryTableUpdateItemPdu']; |
| 72 | //optional RCPduType_E type = 1 [default = RCPDU_REG_TABLE_UPDATE_PDU]; | 72 | //optional RCPduType_E type = 1 [default = RCPDU_REG_TABLE_UPDATE_PDU]; |
| 73 | //repeated RCRegistryTableItemPdu items = 2; | 73 | //repeated RCRegistryTableItemPdu items = 2; |
| 74 | - tableInsertItemPdu.type = pdu.RCPDU_REG_TABLE_UPDATE_PDU; // | 74 | + tableInsertItemPdu.type = pdu.RCPDU_REG_TABLE_UPDATE_PDU; |
| 75 | tableInsertItemPdu.items.push(tableItemPdu); | 75 | tableInsertItemPdu.items.push(tableItemPdu); |
| 76 | 76 | ||
| 77 | let updateObjPdu = new pdu['RCRegistryUpdateObjPdu']; | 77 | let updateObjPdu = new pdu['RCRegistryUpdateObjPdu']; |
| 78 | - updateObjPdu.objId = ApeConsts.DOCSHARING_OBJ_TABLE_ID; // updateObjPdu.objId = ApeConsts.DOCSHARING_OBJ_TABLE_ID_H5; | 78 | + updateObjPdu.objId = ApeConsts.CURSOR_OBJ_TABLE_ID; |
| 79 | updateObjPdu.subType = tableInsertItemPdu.type; | 79 | updateObjPdu.subType = tableInsertItemPdu.type; |
| 80 | updateObjPdu.userData = tableInsertItemPdu.toArrayBuffer(); | 80 | updateObjPdu.userData = tableInsertItemPdu.toArrayBuffer(); |
| 81 | 81 | ||
| @@ -95,7 +95,7 @@ class CursorApe extends Ape { | @@ -95,7 +95,7 @@ class CursorApe extends Ape { | ||
| 95 | /////鼠标数据接受///////////////////////////////////////////////////////////////////////////////// | 95 | /////鼠标数据接受///////////////////////////////////////////////////////////////////////////////// |
| 96 | tableUpdateHandler(owner, itemIdx, itemData) { | 96 | tableUpdateHandler(owner, itemIdx, itemData) { |
| 97 | let cursorModel = this.unPackPdu(owner, itemIdx, itemData); | 97 | let cursorModel = this.unPackPdu(owner, itemIdx, itemData); |
| 98 | - loger.log('tableUpdateHandler', "activeDocId->", GlobalConfig.activeDocId, "parentId->", cursorModel.parentId); | 98 | + loger.log('鼠标数据->tableUpdateHandler'); |
| 99 | loger.log(cursorModel); | 99 | loger.log(cursorModel); |
| 100 | if (cursorModel) { | 100 | if (cursorModel) { |
| 101 | this._emit(MessageTypes.CURSOR_UPDATE, cursorModel); | 101 | this._emit(MessageTypes.CURSOR_UPDATE, cursorModel); |
| @@ -131,13 +131,13 @@ class CursorApe extends Ape { | @@ -131,13 +131,13 @@ class CursorApe extends Ape { | ||
| 131 | 131 | ||
| 132 | unPackPdu(owner, itemIdx, itemData) { | 132 | unPackPdu(owner, itemIdx, itemData) { |
| 133 | try { | 133 | try { |
| 134 | - loger.log("鼠标标注数据->unPackPdu"); | 134 | + loger.log("鼠标激光笔数据->unPackPdu"); |
| 135 | const cursorModelPdu = pdu['RCCursorDataModelPdu'].decode(itemData); | 135 | const cursorModelPdu = pdu['RCCursorDataModelPdu'].decode(itemData); |
| 136 | const _pointGroup = EngineUtils.arrayFromJsonString(cursorModelPdu.pointGroup); | 136 | const _pointGroup = EngineUtils.arrayFromJsonString(cursorModelPdu.pointGroup); |
| 137 | cursorModelPdu.pointGroup = _pointGroup; | 137 | cursorModelPdu.pointGroup = _pointGroup; |
| 138 | return cursorModelPdu; | 138 | return cursorModelPdu; |
| 139 | } catch (err) { | 139 | } catch (err) { |
| 140 | - loger.log("鼠标标注数据->unPackPdu->Pdu解析错误,itemIdx=" + itemIdx + " err:" + err.message); | 140 | + loger.log("鼠标激光笔数据->unPackPdu->Pdu解析错误,itemIdx=" + itemIdx + " err:" + err.message); |
| 141 | } | 141 | } |
| 142 | return null; | 142 | return null; |
| 143 | } | 143 | } |
| @@ -534,6 +534,7 @@ class DocApe extends Ape { | @@ -534,6 +534,7 @@ class DocApe extends Ape { | ||
| 534 | loger.log('添加文档->', "activeDocId->", GlobalConfig.activeDocId, "tableUpdateItemsLen->", tableInsertItemsLen); | 534 | loger.log('添加文档->', "activeDocId->", GlobalConfig.activeDocId, "tableUpdateItemsLen->", tableInsertItemsLen); |
| 535 | for (let i = 0; i < tableInsertItemsLen; ++i) { | 535 | for (let i = 0; i < tableInsertItemsLen; ++i) { |
| 536 | let insertItem = tableInsertItems[i]; | 536 | let insertItem = tableInsertItems[i]; |
| 537 | + if(insertItem){ | ||
| 537 | //this.tableInsertHandler(insertItem.owner, insertItem.itemIdx, insertItem.itemData); | 538 | //this.tableInsertHandler(insertItem.owner, insertItem.itemIdx, insertItem.itemData); |
| 538 | let itemDataInfo = this.unPackPdu(insertItem.owner, insertItem.itemIdx, insertItem.itemData); | 539 | let itemDataInfo = this.unPackPdu(insertItem.owner, insertItem.itemIdx, insertItem.itemData); |
| 539 | if(itemDataInfo){ | 540 | if(itemDataInfo){ |
| @@ -545,6 +546,10 @@ class DocApe extends Ape { | @@ -545,6 +546,10 @@ class DocApe extends Ape { | ||
| 545 | } | 546 | } |
| 546 | let getdocPackFullInfo= this._docPackFullInfo(itemDataInfo); | 547 | let getdocPackFullInfo= this._docPackFullInfo(itemDataInfo); |
| 547 | this._emit(MessageTypes.DOC_UPDATE, getdocPackFullInfo);//用添加和更新都统一DOC_UPDATE | 548 | this._emit(MessageTypes.DOC_UPDATE, getdocPackFullInfo);//用添加和更新都统一DOC_UPDATE |
| 549 | + }else{ | ||
| 550 | + loger.warn('文档数据解析失败->删除->itemIdx:'+insertItem.itemIdx); | ||
| 551 | + this.documentDelete({"itemIdx": insertItem.itemIdx}); | ||
| 552 | + } | ||
| 548 | } | 553 | } |
| 549 | } | 554 | } |
| 550 | //文档数据更新完毕,如果当前没有显示的文档,默认选择一个显示 | 555 | //文档数据更新完毕,如果当前没有显示的文档,默认选择一个显示 |
| @@ -596,8 +601,9 @@ class DocApe extends Ape { | @@ -596,8 +601,9 @@ class DocApe extends Ape { | ||
| 596 | loger.log('更新文档->', "activeDocId->", GlobalConfig.activeDocId, "更新的数量->", tableUpdateItemsLen); | 601 | loger.log('更新文档->', "activeDocId->", GlobalConfig.activeDocId, "更新的数量->", tableUpdateItemsLen); |
| 597 | for (let i = 0; i < tableUpdateItemsLen; ++i) { | 602 | for (let i = 0; i < tableUpdateItemsLen; ++i) { |
| 598 | let tableItem = _tableUpdateItems[i]; | 603 | let tableItem = _tableUpdateItems[i]; |
| 604 | + if(tableItem) { | ||
| 599 | let itemDataInfo = this.unPackPdu(tableItem.owner, tableItem.itemIdx, tableItem.itemData); | 605 | let itemDataInfo = this.unPackPdu(tableItem.owner, tableItem.itemIdx, tableItem.itemData); |
| 600 | - if (itemDataInfo != null) { | 606 | + if (itemDataInfo) { |
| 601 | this.docList[tableItem.itemIdx] = itemDataInfo; | 607 | this.docList[tableItem.itemIdx] = itemDataInfo; |
| 602 | if (itemDataInfo && (itemDataInfo.visible == "true" || itemDataInfo.visible == true)) { | 608 | if (itemDataInfo && (itemDataInfo.visible == "true" || itemDataInfo.visible == true)) { |
| 603 | GlobalConfig.activeDocId = itemDataInfo.itemIdx;//当前激活的文档ID | 609 | GlobalConfig.activeDocId = itemDataInfo.itemIdx;//当前激活的文档ID |
| @@ -607,7 +613,9 @@ class DocApe extends Ape { | @@ -607,7 +613,9 @@ class DocApe extends Ape { | ||
| 607 | let getdocPackFullInfo= this._docPackFullInfo(itemDataInfo); | 613 | let getdocPackFullInfo= this._docPackFullInfo(itemDataInfo); |
| 608 | this._emit(MessageTypes.DOC_UPDATE, getdocPackFullInfo); | 614 | this._emit(MessageTypes.DOC_UPDATE, getdocPackFullInfo); |
| 609 | } else { | 615 | } else { |
| 610 | - loger.log('更新文档-> 数据无效--> itemIdx', itemIdx); | 616 | + loger.warn('文档数据解析失败->删除->itemIdx:'+tableItem.itemIdx); |
| 617 | + this.documentDelete({"itemIdx": tableItem.itemIdx}); | ||
| 618 | + } | ||
| 611 | } | 619 | } |
| 612 | } | 620 | } |
| 613 | this._showDefaultDoc(); | 621 | this._showDefaultDoc(); |
-
请 注册 或 登录 后发表评论