当前位置:网站首页>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;
动态绑定手机号
边栏推荐
- what is an array
- 微服务概念
- Successfully resolved raise TypeError('Unexpected feature_names type')TypeError: Unexpected feature_names type
- Ambari迁移Spark2到其它机器(图文教程)
- How to determine the size of the version number
- 【C语言】探索数据的存储(整形篇)
- 2022年PMP报考指南
- Web APIs BOM - A Comprehensive Case of Operating Browsers
- BEVDepth: Acquisition of Reliable Depth for Multi-view 3D Object Detection 论文笔记
- LeetCode_优先级队列_692.前K个高频单词
猜你喜欢
The statistical data analysis, interview manual"
20张图,全面掌握MVCC原理!
Some Experiences of Embedded Software Logging
Flink二阶段提交
什么是“门”电路(电子硬件)
MySQL indexes and transactions
[Server data recovery] Data recovery case of lvm information and VXFS file system corruption caused by raid5 crash
Linux install redis database
两日总结十一
① 数据库介绍 及 关系型数据库的关系代数表达式
随机推荐
【服务器数据恢复】raid5崩溃导致lvm信息和VXFS文件系统损坏的数据恢复案例
两日总结九
WinForm(五)控件和它的成员
sed of the Three Musketeers of Shell Programming
Flink二阶段提交
如何破坏Excel文件,让其显示文件已损坏方法
word 设置标题前分页
HW-常见攻击方式和漏洞原理(2)
ArcGIS Pro 创建tpk
Construction inspection, no rules and no square
networkmanager无法打开
postgresql parameter meaning
Apache Commons Configuration远程代码执行漏洞(CVE-2022-33980)分析&复现
SystemVerilog: 验证知识点点滴滴
How to determine the size of the version number
Shell编程三剑客之sed
Shell Text Three Musketeers Sed
SQL语句--获取数据库表信息,表名、列名、描述注释等
SQL statement--get database table information, table name, column name, description comment, etc.
16. Sum of the nearest three numbers