<view class="telbtn" @click="gotel">拨打电话</view>
<script>
export default {
data() {
return {
}
},
methods: {
gotel:function() {
uni.makePhoneCall({
phoneNumber: '10086',
success: () => {
console.log('拨打电话成功!');
},
fail: () => {
console.error('拨打电话失败!');
}
});
},
}
}
</script>