微信小程序> 微信小程序扫一扫和拨打电话功能

微信小程序扫一扫和拨打电话功能

浏览量:4655 时间: 来源:大可大可抖
.wxml button id="tapTest" bindtap="tapName"扫一扫/button button id="tapTest" bindtap="makePhoneCall"打电话/button.js  //扫一扫  tapName: function (event) {    wx.scanCode({      success: (res) = {        console.log(res);      }    })  },  //打电话  makePhoneCall: function (event) {    wx.makePhoneCall({      phoneNumber:'6830237',      success: (res) = {        console.log("拨打成功");      },      fail:(e)={        console.log("拨打失败")      }    })

官方文档api地址:

https://developers.weixin.qq.com/miniprogram/dev/api/device/scan/wx.scanCode.html

https://developers.weixin.qq.com/miniprogram/dev/api/device/phone/wx.makePhoneCall.html

小程序

版权声明

即速应用倡导尊重与保护知识产权。如发现本站文章存在版权问题,烦请提供版权疑问、身份证明、版权证明、联系方式等发邮件至197452366@qq.com ,我们将及时处理。本站文章仅作分享交流用途,作者观点不等同于即速应用观点。用户与作者的任何交易与本站无关,请知悉。

产品经理

手机 : 13312967497

擅长 : 小程序流量变现

扫码领取礼包

最新资讯

热门模板

  • 头条
  • 搜狐
  • 微博
  • 百家
  • 一点资讯
  • 知乎