# uni.makePhoneCall(options)

拨打电话

# makePhoneCall 兼容性

Web Android iOS
4.0 x x

App平台见插件市场

# 参数

名称 类型 必填 默认值 兼容性 描述
options MakePhoneCallOptions - - -
名称 类型 必备 默认值 兼容性 描述
phoneNumber string - - 需要拨打的电话号码
success (result: MakePhoneCallSuccess) => void - - 成功返回的回调函数
fail (result: UniError) => void - - 失败的回调函数
complete (result: any) => void - - 结束的回调函数(调用成功、失败都会执行)

# 参见

# 示例

hello uni-app x

Template

Script

<template>
	<view>
		<page-head :title="title"></page-head>
		<view class="uni-padding-wrap uni-common-mt">
			<view class="uni-hello-text uni-center">请在下方输入电话号码</view>
			<input class="input uni-common-mt" type="number" name="input" @input="bindInput" />
			<view class="uni-btn-v uni-common-mt">
				<button @tap="makePhoneCall" type="primary" :disabled="disabled">拨打</button>
			</view>
		</view>
	</view>
</template>


<style>
	.input {
		height: 119rpx;
		line-height: 119rpx;
		font-size: 78rpx;
		border-bottom: 1rpx solid #E2E2E2;
		text-align:center;
	}
</style>

# 通用类型

# GeneralCallbackResult

名称 类型 必备 默认值 兼容性 描述
errMsg string - - 错误信息