uniapp实现拨打电话功能:

1.实现:
<view class="content-bottom-phone flex">
	<span>电话:</span>
	<span @click="handlePhoneBtn(item.contactNumber)">
		{{ item.contactNumber }}
		<i>
			<uni-icons type="phone" size="20" color="#333333"></uni-icons>
		</i>
	</span>
</view>


// 电话按钮
handlePhoneBtn(tel) {
	uni.makePhoneCall({//直接使用uniapp里面的方法
		phoneNumber: '"' + tel + '"'
	});
},
2.效果:

uniapp实现拨打电话功能:_第1张图片

你可能感兴趣的:(小程序端,uniapp,前端)