7***@qq.com
7***@qq.com
  • 发布:2018-11-28 16:25
  • 更新:2018-11-28 16:34
  • 阅读:3179

拨打电话能不能不输入数字,直接点击号码拨打

分类:uni-app

<view class="btn-area">
<text @tap="makePhoneCall" type="primary" :disabled="disabled">咨询电话:200-0000-000</text>
</view>

<script>
export default {
data() {
return {
title: 'makePhoneCall',
disabled: true
}
},
methods: {
makePhoneCall: function () {
uni.makePhoneCall({
phoneNumber:114,
success: () => {
console.log("成功拨打电话")
}
})
},
}
}
</script>
结果: makePhoneCall:fail parameter error: parameter.phoneNumber should be String instead of Number;

2018-11-28 16:25 负责人:无 分享
已邀请:
Trust

Trust - 少说废话

该问题目前已经被锁定, 无法添加新回复