# callTel
weex 拨打电话接口
# 调用方式
callTel(params)
1
返回 Promise,使用 then/catch 或 await 处理结果。 接收单个业务参数;是否需要传参按下方参数表约定,无业务参数时可省略。具体字段及返回数据由宿主原生约定。
# 请求参数
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
param | Object | Y | {}属性: tel:{Type: String, Default: N/A, Description: 拨打的电话号码 } title:{Type: String, Default: N/A, Description: 确认框的标题,如 客户服务} desc:{Type: String, Default: N/A, Description: 确认框的描述,如 拨打热线电话} isDirectCall:{Type: Boolean, Default: false, Description: 是否不弹提示窗,直接拨打电话 } | 请求参数 |
参数对象示例(数值为示例值,不代表默认值):
const param = {
operation: 'callTel',
tel: '13012341234', // 电话号码
isDirectCall: true
};
1
2
3
4
5
2
3
4
5
# 接口调用示例
this.$bridge.callTel(param)
1
# 返回参数
返回 Promise;原生返回数据的字段由宿主决定,当前 JS 封装未限定完整结构。