com_cn
com_cn
  • 发布:2016-11-11 10:15
  • 更新:2016-11-11 10:15
  • 阅读:2659

后台自动发送短信如何知道发送短信的手机号码?

分类:HTML5+

我有两个疑问,希望得到解答,谢谢,
1,使用后台自动发送短信,短信发送过后怎么知道发送短信的手机号码是多少?按道理说后台自动发送是可以知道的,但不知道怎么获取这个号码。
2,看代码逻辑,后台自动发送短信是不支持IOS吗?有没有办法支持?
H5+的模板代码如下:

function slientSMS(){  
    outSet("后台发送短信:");  
    if ( plus.os.name == "Android" ) {  
        var bts=["发送到10086","发送到10010","发送到10000"];  
        plus.nativeUI.prompt("短信内容",function(e){  
            var to=null;  
            switch(e.index){  
                case 0:  
                to=['10086'];  
                break;  
                case 1:  
                to=['10086'];  
                break;  
                case 2:  
                to=['10086'];  
                break;  
                default:  
                return;  
                break;  
            }  
            var msg = plus.messaging.createMessage(plus.messaging.TYPE_SMS);  
            msg.to=to;  
            msg.body=e.value;  
            msg.silent=true;  
            plus.messaging.sendMessage( msg );  
            outLine( "\""+e.value+"\""+bts[e.index] );  
        },"发送短信","CXYE",bts);  
    } else {  
        outLine("此平台不支持后台发送短信功能!");  
        plus.nativeUI.alert("此平台不支持后台发送短信功能!");  
    }  
}
2016-11-11 10:15 负责人:无 分享
已邀请:

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