当前位置:网站首页>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;
动态绑定手机号
边栏推荐
猜你喜欢
随机推荐
微服务概念
Shell 文本三剑客 Sed
ArcGIS Pro 创建tpk
两日总结十一
【视频】报告分享|2021年保险行业数字化洞察
微信小程序自定义navigationBar
【21天学习挑战赛】折半插入排序
MySQL advanced query
[GXYCTF2019]BabySQli
16. 最接近的三数之和
分库分表ShardingSphere-JDBC笔记整理
什么是数组
Navicat 16-数据库工具
Apache Commons Configuration远程代码执行漏洞(CVE-2022-33980)分析&复现
连流量染色都没有,你说要搞微服务?
Jvm. Profiling tools (jconsole, jvisualvm, arthas, jprofiler, mat)
BEVDepth: Acquisition of Reliable Depth for Multi-view 3D Object Detection 论文笔记
Exception: try catch finally throws throw
使用mysql语句操作数据表(table)
LeetCode_优先级队列_692.前K个高频单词






![[GXYCTF2019]BabySQli](/img/8a/7500c0ee275d6ef8909553f34c99cf.png)


