<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;