扫描二维码打开
平时我们在微信小程序开发时,免不了都需要:电话,手机,客服等常见联系方式功能,所以今天直接放微信小程序开发代码:
<view class="popuptel" bindtap='tels'>拨打电话:0755-32926666</view> <view class="popuptel" bindtap='phone'>拨打手机:15817498888</view> <button class="popupkefu" open-type="contact"><text>在线客服咨询</text></button>
//拨打电话事件 tels:function () { wx.makePhoneCall({ phoneNumber: '0755-32926666',//在这里填写正确的电话 success:function(){ console.log('拨打成功') }, fail:function(){ console.log('拨打失败') } }) }, //拨打手机事件 phone:function () { wx.makePhoneCall({ phoneNumber: '15817498888',//在这里填写正确的手机号 success:function(){ console.log('拨打成功') }, fail:function(){ console.log('拨打失败') } }) },
3、保存提交,即可简单的实现了日常微信小程序中需要的联系功能。
本文由百业营销网原创,转载请注明版权和链接。
Copyright 深圳市某某科技有限公司 版权所有. 备案号:粤ICP备98989988号