更新时间:2024-01-24 GMT+08:00
分享

场景5:取消会议

描述

预约会议成功后,可以取消会议接口来取消会议。

业务流程

若要取消会议,可以调用cancelConf接口,并处理回调函数onCancelConfResult和订阅的onConfListChanged通知。。

  1. 接口调用

    1. 组装数据结构CancelConfParam和接口回调函数onCancelConfResult。
    2. 调用cancelConf取消会议,第1步中的数据作为参数。

  2. 处理回调函数

    处理回调函数onCancelConfResult。

  3. 处理消息通知

    处理消息通知onConfListChanged。

示例代码

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
/**
* 取消会议接口
*/
async cancelConfById() {
    let param = {
        confId: "989156631",
    }
    console.log(param);
    const apiService = new ApiService();
    let setResult = await apiService.cancelConf(param);;
    if (setResult.ret != 0) {
        window.electron.ipcRenderer.send("show-error-alert", "cancelConf error = " + setResult.ret);
    }
    this.props.history.push('/main');
}

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
/**
* ApiService中cancelConf接口定义
*/
async cancelConf(cancelConfParam) {
  return new Promise((resolve) => {
    let resultCallback = (ret, reason) => {
      console.log("cancelConf, out data = ", { ret, reason });
      resolve({ ret, reason });
    };
    console.log("cancelConf, in param = ", cancelConfParam);
    this.uisdkService.getConfMgrApi().cancelConf(cancelConfParam, resultCallback);
  });
}

onConfListChanged事件通知跟预约会议场景相同,请参考预约会议的示例代码

分享:

    相关文档

    相关产品