Skip to content

拨打电话

方法名

callPhone

用法

  • 用法如下:
    js
    module.callPhone({
      // 拨打号码
      number: 10086,
      // 卡槽索引,1.卡槽1(默认),2.卡槽2
      slot: 1,
      //是否是座机
      isTelephone: false
    }, res => {
      this.writeLog(JSON.stringify(res))
    });
  • 参数说明
    参数名参数类型是否必填默认值参数描述
    numberString要拨打的电话号码
    slotInteger1选择的拨打的卡槽序号,1.卡槽1,2.卡槽2
    isTelephoneBooleanfalse拨打的是否是座机

回调

  • 示例
    json
    {
      "data": {},
      "message": "",
      "code": 0
    }
  • 回调说明:
    参数名参数类型参数描述
    messageString消息提示
    dataObject数据对象
    codeInteger返回类型,0.成功,其他:失败