当前位置:网站首页>微信小程序 实现拨打电话
微信小程序 实现拨打电话
2022-07-27 15:48:00 【星星也会数人类嘛】
小程序中点击电话标识发起拨打电话页面请求:
wxml:
<i class="fa fa-phone phoneIcon" aria-hidden="true" bindtap="phoneClick" data-phoneNumber="{
{item.phoneNumber}}"></i>
js:
/** * 电话点击 * @param {*} event */
phoneClick: function(event){
wx.makePhoneCall({
phoneNumber: event.target.dataset.phonenumber,
success(){
},
fail(){
}
})
}
注: 如果不写success和fail会报以下异常!
makePhonCall : fail cancel
取消拨打电话时触发的异常
边栏推荐
- 数据库超话(四)
- 阿里巴巴鹰眼系统简介
- Chen Yili of ICT Institute: reducing cost and increasing efficiency is the greatest value of cloud native applications
- Switch and router technology-02-working principle of Ethernet switch
- Windows and network foundation-15-local security policy
- With the arrival of large displacement hard core products, can the tank brand break through the ceiling of its own brand?
- Subject 3: straight driving
- 奇瑞欧萌达也太像长安UNI-T了,但长得像,产品力就像吗?
- What are VO, do, dto and Po
- 7 岁男孩被 AI 机器人折断手指,仅因下棋太快?
猜你喜欢

二舅的外甥和他的学生们

Initial polymorphism

The chess robot broke the finger of a 7-year-old boy. Netizen: it violated the first law of robots

How to extract tables from PDF through C /vb.net

Windows and network foundation-15-local security policy

大排量硬核产品来袭,坦克品牌能否冲破自主品牌天花板?

Sharing of local file upload technology of SAP ui5 fileuploader

美团到餐“祖传数仓”标准化治理笔记

Introduction to Alibaba eagle eye system

信通院陈屹力:降本增效是云原生应用最大价值
随机推荐
Redis: 配置AOF不起作用
一文理解分布式开发中的服务治理
通过 FileUploader 的初始化,了解 SAP UI5 应用的 StaticArea 初始化逻辑
【数据库系统概论(王珊)】第5章——数据库完整性
Sharing of local file upload technology of SAP ui5 fileuploader
写好技术原创文章的一点建议
初识多态
MySQL: Functions
成本高、落地难、见效慢,开源安全怎么办?
一个端到端的基于 form 表单的文件上传程序,包含客户端和服务器端
numpy数组矩阵操作
二舅的外甥和他的学生们
Help, boost and take responsibility, the new value and significance of the 6th Tuba rabbit 718 national home decoration Festival
Understanding service governance in distributed development
【单片机】2.3 AT89S52的CPU
MLX90640 红外热成像仪测温传感器模块开发笔记(七)
Neural network implementation of handwritten numeral classification matlab
Following the example of IE, is the decline of Firefox inevitable?
微软默默给 curl 捐赠一万美元,半年后才通知
General process of background management system permission setting