支付宝小程序API 拨打电话
my.makePhoneCall
拨打电话。
扫码体验
效果示例
示例代码
// API-DEMO page/API/make-phone-call/make-phone-call.json
{
"defaultTitle": "打电话"
}
<!-- API-DEMO page/API/make-phone-call/make-phone-call.axml-->
<view class="page">
<view class="page-section">
<view class="page-section-title">my.makePhoneCall</view>
<view class="page-section-btns">
<view onTap="makePhoneCall">打电话</view>
</view>
</view>
</view>
// API-DEMO page/API/make-phone-call/make-phone-call.js
Page({
makePhoneCall() {
my.makePhoneCall({ number: '95888' });
},
});
入参
Object 类型,属性如下:
名称 | 类型 | 必填 | 描述 |
---|---|---|---|
number | String | 是 | 电话号码 |