当前位置:网站首页>微信小程序 实现拨打电话
微信小程序 实现拨打电话
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
取消拨打电话时触发的异常
边栏推荐
- 选择体育场馆的LED显示屏时应该注重哪些方面
- Database hyperphone (II)
- Zhengzhou University database course resource description
- Some suggestions for writing original technical articles
- Gree "not cool": the giant lawsuit ended and was reduced by large dealers. Is it too late for the new battlefield of air conditioning?
- 风口之下,隐形正畸还能走多远?
- 腾讯云上传使用
- 20 years ago, he was Ma Yun's biggest enemy
- Redis: configuring AOF does not work
- Switch and router technology-02-working principle of Ethernet switch
猜你喜欢
随机推荐
Taishan Office Technology Lecture: word strange paragraph borders
Database hyperphone (4)
Understand the staticarea initialization logic of SAP ui5 application through the initialization of fileuploader
Explain the idempotence of distributed system in detail
.net core with microservices - what is a microservice
【Codeforces】 A. Computer Game
JDBC连接数据库读取前台无法显示数据
如何开发一款在线Excel表格系统(上)
【单片机】2.1 AT89S52单片机的硬件组成
$attrs与$listeners组件传值
Help, boost and take responsibility, the new value and significance of the 6th Tuba rabbit 718 national home decoration Festival
面试官:什么是脚手架?为什么需要脚手架?常用的脚手架有哪些?
美团到餐“祖传数仓”标准化治理笔记
C语言怎么学?这篇文章给你完整答案
Understanding service governance in distributed development
The chess robot broke the finger of a 7-year-old boy. Netizen: it violated the first law of robots
交换机和路由器技术-02-以太网交换机工作原理
SVM+Surf+K-means花朵分类(Matlab)
Start from scratch blazor server (1) -- project construction
Database hyperphone (III)









