<button bindtap="phonecall">拨打电话</button> // js Page({ phonecall:function(){ wx.makePhoneCall({ phoneNumber: ‘1340000‘ //仅为示例,并非真实的电话号码 }) } })
注意:在宠物家中是封装成util中的phonecall方法了:
phonecall: function (e) { util.phonecall(‘4000300011‘); },
2023-10-30 16:12:22
<button bindtap="phonecall">拨打电话</button> // js Page({ phonecall:function(){ wx.makePhoneCall({ phoneNumber: ‘1340000‘ //仅为示例,并非真实的电话号码 }) } })
phonecall: function (e) { util.phonecall(‘4000300011‘); },