拨打电话


接口说明

根据dialNumber, makeWay打开语音通话界面。

HWH5.makePhoneCall

  • 基础库从 10.0.5 开始支持,低版本需做兼容处理
  • makingcall在后续版本中将会逐渐废弃,请使用makePhoneCall代替

请求参数

参数 类型 必填 说明
dialNumber String 必传,手机或座机号码,不支持拨打国际电话,国内座机格式:区号-座机号码、区号座机号码
makeWay Number 必传,1回拨

返回结果

参数 说明
code 1 拨号失败; 0 成功,调起正在拨打电话页面。
message 失败说明。

请求示例

  • ES6版本
  •   HWH5.makePhoneCall({
        dialNumber: '18066668888',
        makeWay: 0
      }).then(reply => {
        console.log(reply);
      }).catch(error => {
        console.log('请求异常', error);
      });
    
  • ES5版本
  •   HWH5.makePhoneCall({
        dialNumber: '18066668888',
        makeWay: 0
      }).then(function (reply) {
        console.log(reply);
      }).catch(function (error) {
        console.log('请求异常', error);
      });
    

    result. ""

      Not Found. ""