Uniapp——拨打电话、发送短信
代码】Uniapp——拨打电话、发送短信。
·
1. 拨打电话
uni.makePhoneCall({
phoneNumber: "13666666666",
success() {
console.log("拨打成功")
},
fail() {
console.log("拨打失败")
}
})
2. 发送短信
let msg = plus.messaging.createMessage(plus.messaging.TYPE_SMS)
msg.to = ['13666666666']
msg.body = 'Hello'
plus.messaging.sendMessage(msg)
【权限选择】
更多推荐
所有评论(0)