当前位置:网站首页>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;
动态绑定手机号
边栏推荐
猜你喜欢

More parameter exposure of Pico 4: Pancake + color perspective, and Pro version

Jvm. Profiling tools (jconsole, jvisualvm, arthas, jprofiler, mat)

EPro-PnP: Generalized End-to-End Probabilistic Perspective-n-Points for Monocular Object Pose Est...

Linux install redis database

关于编程本质那些事

ArcGIS Pro 创建tpk

② 关系数据库标准语言SQL 数据定义(创建、修改基本表)、数据更新(增删改)

Shell Text Three Musketeers Sed

如何防止离职员工把企业文件拷贝带走?法律+技术,4步走

QT+VTK+PCL拟合圆柱并计算起始点、中止点
随机推荐
wincc如何实现远程监控1200PLC
Dual machine thermal for comprehensive experiment (VRRP + OSPF + + NAT + DHCP + VTP PVSTP + single-arm routing)
R语言多元线性回归、ARIMA分析美国不同候选人对经济GDP时间序列影响
EPro-PnP: Generalized End-to-End Probabilistic Perspective-n-Points for Monocular Object Pose Est...
vim取上个窗口号.
Sigma开发注意细节
二维数组实战项目--------《扫雷游戏》
微信小程序通过URL Scheme动态的渲染数据
#yyds Dry Goods Inventory#[Yugong Series] August 2022 Go Teaching Course 008-Integer of Data Types
Flink二阶段提交
2022年PMP报考指南
Single-chip human-computer interaction--matrix key
迭代器和生成器
循环单词
数据分析面试手册《SQL篇》
J9数字论:DAO治理更像一种生态过程:治理原生于网络,不断演变
php 判断数组是否为多维数组
【HFSS学习记录2】腔体滤波器的设计与仿真
Still using Xshell?You are out, recommend a more modern terminal connection tool, easy to use!
微信小程序内部A页面向内嵌H5页面跳转,并且传参