当前位置:网站首页>Uniapp implements the function of clicking to make a call

Uniapp implements the function of clicking to make a call

2022-06-24 10:16:00 Ma Xiaotiao coding

uniapp Click to make a call

Use uniapp Self contained api:uni.makePhoneCall
The following is the implementation code :

<view class="btn" @click="telFun()"> Telephone consultation </view>

methods: {
	// Make a phone call :
	telFun() {
		uni.makePhoneCall({
			phoneNumber: '12345', // Phone number 
			success: function(e) {
				console.log(e);
			},
			fail: function(e) {
				console.log(e);
			}
		})
	},
}

 Insert picture description here

原网站

版权声明
本文为[Ma Xiaotiao coding]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/175/202206240915341665.html