前端API
API返回值为JSON,形式为:
{code:xxx, msg:xxx}
有数据返回,形式为:
{code:xxx, msg:xxx, data:xxx}
字段 | 说明 |
---|---|
code | 1:成功 其它值:失败 |
msg | 提示信息 |
data | 依据具体API返回对应数据 |
申请同步
ndc_applySyncView
- 类型:async
- 参数:无
- 返回值:
{code:1,msg:'成功'}
postMessage方式传参:
{type: ‘ndc_applySyncView’}
postMessage返回值:
{type: ‘ndc_applySyncViewResponse’, msg:{code:1,msg:'成功'}}
返回值列表:
code | msg |
---|---|
0 | 失败 |
1 | 成功 |
2 | 当前会议已结束 |
3 | 当前已经是同步状态 |
4 | 请让当前操作者先取消同步视屏 |
取消同步
ndc_cancelSyncView
- 类型:async
- 参数:无
- 返回值:
{code:1,msg:'成功'}
postMessage方式传参:
{type: ‘ndc_cancelSyncView’}
postMessage返回值:
{type:‘ndc_cancelSyncViewResponse’, msg:{code:1,msg:'成功'}}
返回值列表:
code | msg |
---|---|
0 | 失败 |
1 | 成功 |
2 | 当前会议已结束 |
3 | 没有权限 |
修改会议标题
ndc_setMeetingTitle
- 类型:async
- 参数:title:会议标题,String类型
- 返回值:
{code:1,msg:'成功'}
postMessage方式传参:
{type: ‘ndc_setMeetingTitle’, msg: {title: 会议标题}}
postMessage返回值:
{type: ‘ndc_setMeetingTitleResponse’, msg:{code:1,msg:'成功'}}
返回值列表:
code | msg |
---|---|
0 | 失败 |
1 | 成功 |
2 | 输入不合法,标题不能为空 |
3 | 输入不合法,标题长度不能超过30个字符 |
4 | 输入不合法,请输入由中文英文数字组成的字符串 |
设置主持人
ndc_setHost
- 类型:async
- 参数:userId:成员id,Number类型
- 返回值:
{code:1,msg:'成功'}
postMessage方式传参:
{type: ‘ndc_setHost’, msg: {userID: 用户id}}
postMessage返回值:
{type: ‘ndc_setHostResponse’, msg:{code:1,msg:'成功'}}
返回值列表:
code | msg |
---|---|
0 | 失败 |
1 | 成功 |
2 | 当前会议已结束 |
3 | 没有权限 |
4 | 该用户不在会议中 |
5 | 该用户未上线 |
6 | 非平台用户不能设置为主持人 |
移出成员
ndc_forceLeave
- 类型:async
- 参数:userId:成员id,Number类型
- 返回值:
{code:1,msg:'成功'}
postMessage方式传参:
{type: ‘ndc_forceLeave’, msg: {userID: 用户id}}
postMessage返回值:
{type: ‘ndc_forceLeaveResponse’, msg:{code:1,msg:'成功'}}
返回值列表:
code | msg |
---|---|
0 | 失败 |
1 | 成功 |
2 | 当前会议已结束 |
3 | 没有权限 |
4 | 请输入用户Id |
5 | 请先转移主持人身份 |
6 | 该用户不在会议中 |
7 | 该用户未上线 |
退出会议
ndc_quitMeeting
- 类型:async
- 参数:无
- 返回值:
{code:1,msg:'成功'}
postMessage方式传参:
{type: ‘ndc_quitMeeting’}
postMessage返回值:
{type: ‘ndc_quitMeetingResponse’, msg:{code:1,msg:'成功'}}
返回值列表:
code | msg |
---|---|
0 | 失败 |
1 | 成功 |
2 | 当前会议已结束 |
3 | 请先转移主持人身份 |
邀请成员(协同评审通知外层页面)
ndc_inviteMemberClick
外层页面提供该方法,协同评审调用。
postMessage 方式:
{type: ‘ndc_inviteMemberClick’}
邀请成员(外层页面通知协同评审)
ndc_inviteMember
- 类型:async
- 参数:inviteUsers:邀请的成员的信息列表,Array类型。
成员信息列表定义如下:
字段 | 说明 |
---|---|
id | 成员id,Number类型 |
name | 成员名称,String类型 |
avatar | 头像URL,String类型(非必填项) |
示例:
[{id:"成员id", name:"名称", avatar:"头像" }]
返回值:
{code:1,msg:'成功'}、
postMessage方式传参:
{type: ‘ndc_inviteMember’, msg: {inviteUsers: 邀请的成员列表}}
postMessage返回值:
{type: ‘ndc_inviteMemberResponse’, msg:{code:1,msg:'成功'}}
返回值列表:
code | msg |
---|---|
0 | 失败 |
1 | 成功 |
2 | 会议已结束 |
3 | 输入参数格式错误 |
结束会议
ndc_closeMeeting
- 类型:async
- 参数:无
- 返回值:
{code:1,msg:'成功'}
postMessage方式传参:
{type: ‘ndc_closeMeeting’}
postMessage返回值:
{type: ‘ndc_closeMeetingResponse’, msg:{code:1,msg:'成功'}}
返回值列表:
code | msg |
---|---|
0 | 失败 |
1 | 成功 |
2 | 当前会议已结束 |
3 | 没有权限 |
打开文件(协同评审通知外层页面)
ndc_openFileClick
外层页面提供该方法,协同评审调用。
postMessage 通知父页面:
{type: ‘ndc_openFileClick’}
打开文件(外层页面通知协同评审)
ndc_openFile
- 类型:async
- 参数:
- type:2表示2D图纸,3表示3D模型,Number类型。
- lightUrl::轻量化文件地址,String类型。
- name:轻量化文件名称,String类型。
- fileHeader::轻量化文件请求头,JSON类型。
- 返回值:
{code:1,msg:'成功'}
postMessage方式传参:
{type: ‘ndc_openFile’, msg: {type: 3,ligntUrl: 轻量化文件地址, name: 文件名称, fileHeader: 轻量化文件请求头}}
postMessage返回值:
{type: ‘ndc_openFileResponse’, msg:{code:1,msg:'成功'}}
返回值列表:
code | msg |
---|---|
0 | 失败 |
1 | 成功 |
2 | 会议已结束 |
3 | 没有权限 |
4 | 请输入类型 |
5 | 文件名过长 |
6 | 请输入轻量化文件地址 |
7 | 轻量化文件地址错误 |
快速截屏
ndc_quickScreenShot
- 类型:async
- 参数:无
- 返回值:
{code:1,data:'base64数据',msg:'操作取消'}
postMessage方式传参:
{type: ‘ndc_quickScreenShot’}
postMessage返回值:
{type: ‘ndc_quickScreenShotResponse’, msg:{code:1, data: base64数据, msg:'成功'}}
返回值列表:
code | type | data | msg |
---|---|---|---|
0 | cancel | / | 操作取消 |
1 | save | base64 | 成功 |
删除指定批注
ndc_delTag
- 类型:async
- 参数: id:待删除批注的id,String类型。
- 返回值:
{code:1,msg:'成功'}
postMessage方式传参:
{type: ‘ndc_delTag’,msg: {id: 批注的id}}
postMessage返回值:
{type: ‘ndc_delTagResponse’, msg:{code:1, msg:'成功'}}
返回值列表:
code | msg |
---|---|
0 | 失败 |
1 | 成功 |
2 | 会议已结束,无法获取 |
3 | 输入参数错误 |
4 | 操作者正在查看,无法删除 |
复制链接(协同评审通知外层页面)
ndc_copyLinkClick
外层页面提供该方法,协同评审调用。
参数:
字段 | 说明 |
---|---|
data | |
meetingTitle | 会议标题 |
meetingLink | 会议链接 |
meetingNumber | 会议ID |
startTime | 会议开始时间 |
postMessage方式:
{type: ‘ndc_copyLinkClick’, msg: 会议链接数据}
获取会议标题和邀请链接
ndc_getMeetInfo
- 类型:async
- 参数:无
- 返回值:
{code:1,msg:'成功',data:{}}
postMessage方式传参:
{type: ‘ndc_getMeetInfo’}
postMessage返回值:
{type: ‘ndc_getMeetInfoResponse’, msg:{code:1, msg:'成功'}}
返回值详情:
字段 | 说明 |
---|---|
code | 1:成功 其它值:失败 |
msg | 提示信息 |
data | |
meetingTitle | 会议标题 |
meetingLink | 会议链接 |
meetingNumber | 会议ID |
startTime | 会议开始时间 |
获取会议成员信息
ndc_getMemberInfo
- 类型:async
- 参数:无
- 返回值:
{code:1,msg:'成功',data:[]}
postMessage方式传参:
{type: ‘ndc_getMemberInfo’}
postMessage返回值:
{type: ‘ndc_getMemberInfoResponse’, msg:{code:1, msg:'成功'}}
返回值详情:
字段 | 说明 |
---|---|
code | 1:成功 其它值:失败 |
msg | 提示信息 |
data | 成员信息数组,具体字段如下 |
userID | 用户id |
userName | 用户名称 |
userRole | 用户角色 0:参与人 1:主持人 |
operateRole | 操作角色 0:观看者 1:操作者 |
status | 用户状态
0:未参会 1:正在会议中 2:退出 3:掉线 |
avatar | 用户头像 |
isSelf | 是否是当前用户 true:是 false:否 |
获取会议打开过的文件列表
ndc_getMeetFiles
- 类型:async
- 参数:无
- 返回值:
{code:1,msg:'成功',data:[{meetingId,fileName:xxx,fileType,openTime}]}
postMessage方式传参:
{type: ‘ndc_getMeetFiles’}
postMessage返回值:
{type: ‘ndc_getMeetFilesResponse’, msg:{code:1, msg:'成功', data: 文件列表}}
返回值详情:
字段 | 说明 |
---|---|
code | 1:成功 其它值:失败 |
msg | 提示信息 |
data | 文件信息数组,具体字段如下 |
fileID | 文件ID |
fileName | 文件名称 |
fileUrl | 轻量化文件地址 |
openTime | 打开时间 |
fileType | 文件类型 2:2D 3:3D |
获取当前打开文件的批注信息
ndc_getCurrentTag
- 类型:async
- 参数:无
- 返回值:
{code:1,msg:'成功',data:[]}
postMessage方式传参:
{type: ‘ndc_getCurrentTag’}
postMessage返回值:
{type: ‘ndc_getCurrentTagResponse’, msg:{code:1, msg:'成功', data: 文件列表}}
返回值详情:
字段 | 说明 |
---|---|
code | 1:成功 其它值:失败 |
msg | 提示信息 |
data | 批注信息数组,具体字段如下 |
meetingId | 会议ID |
fileId | 文件ID |
taglist | 批注数据 |
content | 批注详细信息 |
operType | 批注类型 1:文本 2:图片 3:语音 |
imageSrc | 批注图片base64或者语音文件地址 |
id | 批注ID |
userID | 用户ID |
userName | 用户名称 |
avatar | 用户头像 |
updateTime | 更新时间 |
createTime | 创建时间 |
监听成员信息变化通知事件
ndc_onMemberInfoChange
外层页面定义该方法,协同评审调用。
参数:type
postMessage 返回值:
{type: ‘ndc_onMemberInfoChange’, msg: {data: type: ‘MEMBER_JOIN’}}
监听批注数据变化通知事件
ndc_onTagInfoChange
外层页面定义该方法,协同评审调用。
参数:{type:'COMMENT_ADD'}
postMessage 返回值:
{type: ‘ndc_onTagInfoChange’, msg: {data: {type: ‘COMMENT_ADD’}}}
会议状态变化通知事件
ndc_onMeetingStatusChange
参数:status
字段 | 说明 |
---|---|
status | 1:在会议中 2:不在会议中 |
外层页面提供该方法,协同评审调用。
postMessage返回值:
{type: ‘ndc_onMeetingStatusChange’, msg: {status: 1}}
页面路由变化通知
ndc_pageChange
参数:path(当前路由hash)
外层页面提供该方法,协同评审调用。
postMessage 返回值:
{type: ‘ndc_pageChange’, msg: {path: 当前路由hash}}
生成会议纪要
ndc_addMeetingSummary
参数:
{
meetingId: 会议id,
summaryInfo: {
startTime: 会议开始时间 YYYY/MM/DD hh:mm
endTime: 会议结束时间 YYYY/MM/DD hh:mm
editor: 会议纪要编写者昵称
inMeetingNumberList: 参会人员昵称列表
outMeetingNumberList: 未参会人员昵称列表
},
meetingSummaryUrl: 会议纪要地址
}
postMessage 返回值
{type: ‘ndc_addMeetingSummary’, msg: { 参数同上 }}
修改会议纪要
ndc_updateMeetingSummary
参数:
{
meetingId: 会议id,
summaryInfo: {
startTime: 会议开始时间 YYYY/MM/DD hh:mm
endTime: 会议结束时间 YYYY/MM/DD hh:mm
editor: 会议纪要编写者昵称
inMeetingNumberList: 参会人员昵称列表
outMeetingNumberList: 未参会人员昵称列表
},
meetingSummaryUrl: 会议纪要地址
}
postMessage 返回值
{type: ‘ndc_updateMeetingSummary’, msg: { 参数同上 }}