当前位置:网站首页>uni-app实现app和H5调用手机拨号功能
uni-app实现app和H5调用手机拨号功能
2022-08-11 01:19:00 【Treasure girl1】
app
<view class="foortab_s gui-flex gui-align-items-center gui-space-between" @click="dial">
<view class="gui-flex gui-align-items-center">
<image src="/static/my/ic-k.png" mode="widthFix"></image>
<text>客服中心</text>
</view>
<!-- #ifdef APP-PLUS -->
<text>{
{phone}}</text>
<!-- #endif -->
<!-- #ifdef H5 -->
<a :href='phones'>{
{phone}}</a>
<!-- #endif -->
</view>
// 拨打电话
<script>
export default {
data() {
return {
phone: '',
phones: '',
}
},
onShow() {
//H5
this.phones = 'tel:' + 178944411
},
methods: {
dial() {
uni.makePhoneCall({
phoneNumber: this.phone
});
},
}
}
</script>
h5调用手机的拨号功能
使用a标签href属性中的tel;
动态绑定手机号
边栏推荐
猜你喜欢
[ASM] The relationship between the role of the bytecode operation ClassWriter COMPUTE_FRAMES and visitMaxs
WinForm (5) control and its members
20张图,全面掌握MVCC原理!
异常:try catch finally throws throw
22. Inventory service
【服务器数据恢复】raid5崩溃导致lvm信息和VXFS文件系统损坏的数据恢复案例
sed of the Three Musketeers of Shell Programming
两日总结九
【ASM】字节码操作 ClassWriter COMPUTE_FRAMES 的作用 与 visitMaxs 的关系
[21 Days Learning Challenge] Half Insertion Sort
随机推荐
22/8/9 Collection of Greedy Problems
Successfully resolved TypeError: can't multiply sequence by non-int of type 'float'
15 DOM 扩展
Apache Commons Configuration远程代码执行漏洞(CVE-2022-33980)分析&复现
C# JObject解析JSON数据
构建检测,无规矩不成方圆
dump_stack ()
C# using timer
连流量染色都没有,你说要搞微服务?
C#使用计时器
容器技术真的是环境管理的救星吗?
云原生-VMware虚拟机安装Kubesphere实战(一)
编程技巧│selenium 更新 chromedriver 驱动
Kunpeng compilation and debugging and basic knowledge of native development tools
The concept of services
[GXYCTF2019]BabySQli
研发项目流程规范
力扣------使用最小花费爬楼梯
MySQL进阶查询
How to determine the size of the version number