帖子
帖子
用户
博客
课程
显示全部楼层
14
帖子
0
勋章
58
Y币

[插件使用] 购买的sendSms模块不能正常使用

[复制链接]
发表于 2015-7-22 16:08:03
购买的sendSms模块不能正常使用!!!
app集成了sendSms模块,我一直用我的手机测试,偶尔用同事的手机测试也都能收到短信验证码。
但是昨天对注册进行测试的时候发现,除过我的手机能发送,并且成功接受验证码以外,其他同事的手机均不能发送,收到验证码
好着急啊,又好气,花了500多买的模块不能正常使用连找谁都不知道。
  1. function reg(){
  2.                 var sendsms = api.require('sendSms');
  3.                 var param = {
  4.                         appkey:"xxx",
  5.                         appsecret:"xxx"
  6.                 };

  7.                 sendsms.regSms(param);
  8.                 api.alert({
  9.                         msg:"reg phone sms"
  10.         },function(ret,err){
  11.                 //coding...
  12.         });
  13.         }

  14.         function sendCode(phonenum,isresend){
  15.                 reg();
  16.                 var sendsms = api.require('sendSms');
  17.                 var param = {
  18.                         phone:phonenum
  19.                 };
  20.                 sendsms.sendMessage(param,function(ret,err){
  21.                         api.alert({
  22.                                 msg:"sendMessage start!!!"
  23.             },function(ret,err){
  24.                     //coding...
  25.             });
  26.                         if(ret.result == "ok"){
  27.                                 maxtime = 90;
  28.                                 timer1 = setInterval("send_code_jishi();", 1000);
  29.                                 api.toast({
  30.                                         msg: '短信发送成功',
  31.                                         duration: 2000,
  32.                                         location: 'middle'
  33.                                 });
  34.                         }else{
  35.                                 api.toast({
  36.                                         msg: ret.result+"--"+err,
  37.                                         duration: 2000,
  38.                                         location: 'middle'
  39.                                 });
  40.                         }
  41.                         api.alert({
  42.                                 msg:"sendMessage end!!!"
  43.             },function(ret,err){
  44.                     //coding...
  45.             });
  46.                 });
  47.                 if(!isresend){
  48.                         showStep();
  49.                 }
  50.         }

  51.         function checkCode(code){
  52.                 //mycode表示收到的验证码
  53.                 sendsms = api.require('sendSms');
  54.                 var param={code:code};
  55.                 sendsms.enterCode(param,function(ret,err){
  56.                         if(ret.result == "ok"){
  57.                                 api.toast({
  58.                                         msg: '验证成功',
  59.                                         duration: 2000,
  60.                                         location: 'middle'
  61.                                 });
  62.                                 showStep();
  63.                         }else{
  64.                                 api.toast({
  65.                                         msg: '验证失败',
  66.                                         duration: 2000,
  67.                                         location: 'middle'
  68.                                 });
  69.                         }
  70.                 });
  71.         }
复制代码
我这种写法应该没什么问题吧???但是为什么只有我能收到验证码??



10
帖子
0
勋章
86
Y币
你的写法有问题!   如果你上面的代码是一个html页面的.  var sendsms = api.require('sendSms');  这个代码写一次就够了, 一个html页面共用sendsms变量.  
14
帖子
0
勋章
58
Y币
qlgyl 发表于 2015-7-30 10:11
你的写法有问题!   如果你上面的代码是一个html页面的.  var sendsms = api.require('sendSms');  这个代 ...

如果是写法的问题,为什么我的手机一直能收发??而别人的不行呢
10
帖子
0
勋章
86
Y币
jacobzheng 发表于 2015-7-31 15:51
如果是写法的问题,为什么我的手机一直能收发??而别人的不行呢

这个.. 我就不好说了.  我项目不用sendsms了. 这个接口很不稳定, 而且不好判断短信收发状态.
您需要登录后才可以回帖 登录

本版积分规则