Skip to content

设置通话次数限制策略

方法名

setPhoneCallLimitation

用法

  • 用法如下:
    js
    module.setPhoneCallLimitation({
      params: {
        dateType: 0,
        isOutgoing: false,
        limitNumber: 10
      },
      complete: (res) => {
        console.log(res)
      }
    })
    js
    module.setPhoneCallLimitation({
      params: {
        dateType: 0,
        isOutgoing: false,
        limitNumber: 10
      },
      complete: (res : LevenResult) => {
        console.log(res)
      }
    } as LevenOptions)
  • 参数说明
    参数名参数类型是否必填默认值参数描述
    paramsObject接口请求参数
    params.dateTypeInteger设置天/周/月
    0:天
    1:周
    2:月
    params.isOutgoingBooleantrue:设置去电,false:设置来电
    params.limitNumberInteger表示限制的次数
    successFunction执行成功的函数
    failFunction执行失败的函数
    completeFunction执行完成的函数,不管成功还是失败都会执行

回调

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