测试机器:MX4,M3S
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Messaging Example</title>
<script type="text/javascript">
// 扩展API加载完毕后调用onPlusReady回调函数
document.addEventListener("plusready", onPlusReady, false);
// 扩展API加载完毕,现在可以正常调用扩展API
function onPlusReady() {}
//短信
function smsTest() {
var msg = plus.messaging.createMessage(plus.messaging.TYPE_SMS);
msg.to = ['10086'];
msg.body = 'CXYE';
msg.silent = true;
plus.messaging.sendMessage(msg,
function() {
console.log('success');
},
function() {
console.log('failed');
});
}
</script>
</head>
<body>
<button type="button" onclick="smsTest()">SMS</button>
</body>
</html>
1 个回复
6***@qq.com
魅族确实是这样,官方人知道,就是没解决