当前位置:网站首页>uniapp实现点击拨打电话功能

uniapp实现点击拨打电话功能

2022-06-24 09:43:00 马小跳会Coding

uniapp实现点击拨打电话

使用uniapp自带的api:uni.makePhoneCall
以下是具体实现的代码:

<view class="btn" @click="telFun()">电话咨询</view>

methods: {
	//拨打电话:
	telFun() {
		uni.makePhoneCall({
			phoneNumber: '12345', //电话号码
			success: function(e) {
				console.log(e);
			},
			fail: function(e) {
				console.log(e);
			}
		})
	},
}

在这里插入图片描述

原网站

版权声明
本文为[马小跳会Coding]所创,转载请带上原文链接,感谢
https://blog.csdn.net/weixin_48596030/article/details/125296619