PhoneGap中文网

标题: ionic的一键拨号咋做啊?求指教 [打印本页]

作者: 我本飞扬521    时间: 2016-6-6 10:21
标题: ionic的一键拨号咋做啊?求指教
我在页面上用的这个<a href="tel:400-000-0000">拨号</a>没有效果!求指教
作者: h110937006    时间: 2016-6-6 11:23
config.xml 加上这个 <access origin="tel:*" launch-external="yes" />
作者: 我本飞扬521    时间: 2016-6-6 13:42
h110937006 发表于 2016-6-6 11:23
config.xml 加上这个

ok了,谢谢
作者: staysunday    时间: 2016-7-15 13:51
h110937006 发表于 2016-6-6 11:23
config.xml 加上这个

加上这个还是不可以哎
作者: staysunday    时间: 2016-7-15 13:52
h110937006 发表于 2016-6-6 11:23
config.xml 加上这个

加上这个还是不可以哎
作者: staysunday    时间: 2016-7-15 14:06
staysunday 发表于 2016-7-15 13:52
加上这个还是不可以哎

得写在<access origin = "*"/>的前面哎!!我发现啦
作者: cswisodmliu    时间: 2016-7-16 14:39
http://www.ionic.ren/2016/01/15/ ... %e5%8a%9f%e8%83%bd/ 看看这个
作者: ionicwang    时间: 2016-7-16 21:58
在cordova中所有的URL Schemes 都是服从于白名单的,所以要现在项目config.xml中添加

<access origin="tel:*" launch-external="yes" />
作者: ionicwang    时间: 2016-7-16 21:59
<div class="col col-25 whiteFore" style="padding: 0px;text-align: center;line-height:1;background: #ff9402;"     ng-click="callPhone(18680470232)">  <img ng-src="img/shop/tel.png" height="20px" width="20px" style="margin-top:0.3rem"><br>  电话</div>
方法:
$scope.callPhone = function (mobilePhone) {  console.log("拨打:" + mobilePhone);  $window.location.href = "tel:" + mobilePhone;};





欢迎光临 PhoneGap中文网 (http://bbs.phonegap100.com/) Powered by Discuz! X3.2