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

[插件使用] 集成有问题,请大神来解决

[复制链接]
发表于 2015-7-31 16:06:27
1、已在云之讯注册帐号,模板帐号都已经审核通过
2、已在控制台添加了模块
3、在云编译保持如下:
QQ图片20150731160336.jpg
程度代码如下所示:
  1. <!doctype html>
  2. <html>
  3. <head>
  4.     <meta charset="utf-8">
  5.     <meta name="viewport" content="initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=0, width=device-width"/>
  6.     <title>app</title>
  7.     <link rel="stylesheet" type="text/css" href="../css/api.css" />
  8.     <link rel="stylesheet" type="text/css" href="../css/common.css" />
  9.     <link rel="stylesheet" type="text/css" href="../css/aui.css" />
  10.     <style>
  11.          
  12.         </style>
  13. </head>
  14. <body>
  15. <div class="aui-content">
  16.         <p class="aui-padded-10">  注册信息</p>
  17.         <form class="aui-input-group">
  18.                 <div class="aui-input-row">
  19.                     <label> 手机号</label>
  20.                     <input type="text" name="mobelphone" id="mobelphone" placeholder="请输入手机号">
  21.                 </div>
  22.                 <div class="aui-input-row">
  23.                     <label> 密码</label>
  24.                     <input type="password" name="password" id="password" placeholder="请输入密码">
  25.                 </div>
  26.                 <div class="aui-input-row">
  27.                     <label> 验证码</label>
  28.                     <input type="text" name="code" id="code" placeholder="请输入验证码" style="width: 30%;">
  29.                     <button class="aui-btn-warning" style="margin-top:6px;" onclick="getCode();">获取验证码</button>
  30.                      
  31.                 </div>
  32.                 <div class="aui-button-row">
  33.                     <button class="aui-btn aui-btn-block aui-btn-primary" onclick="return false;">注册</button>
  34.                     <button class="aui-btn aui-btn-block aui-btn-warning" onclick="return false;">登录</button>
  35.                 </div>
  36.         </form>
  37. </div>
  38. </body>
  39. <script type="text/javascript" src="../script/api.js"></script>
  40. <script type="text/javascript" src="../script/common.js"></script>
  41. <script type="text/javascript">
  42.         apiready = function () {
  43.                  
  44.         }
  45.        
  46.     var sid="a5752083e57684347818f9b40b364f85"; //Account Sid,用户申请
  47.     var token="49454e69c2d4011f460bd592b0139eb7"; //同上
  48.     var appid="e5d91e73b31948128de51cc86e4c441f"; //注册获得的应用程序ID
  49.    
  50.         function getCode() {
  51.             // 获得签名
  52.         var uzyzxVerification = api.require("yzxVerification");
  53.         
  54. //                uzyzxVerification.getSign({
  55. //                    url: 'https://mid**.**/vfs/demo/reg.do', // 自己可以实现
  56. //                    phonenum: '15652301163'
  57. //                },function(ret,err){
  58. //                    if(ret.status){
  59. //                        api.alert({msg:'获得签名成功 sign='+ret.sign});
  60. //                    }else{
  61. //                        api.alert({msg:'获取签名失败 返回值:'+err.result});
  62. //                    }
  63. //                });

  64.                 // 发送验证码
  65.                 uzyzxVerification.getVerificationCode({
  66.                     phonenum: '15652301163',
  67.                     sid: sid,
  68.                     appid: appid,
  69.                     appname: "yzxverification"
  70.                 },function(ret,err){
  71.                     if(ret.status){
  72.                         switch (ret.type){
  73.                             case 0:
  74.                                 api.alert({msg:'验证成功'});
  75.                                 break;
  76.                             case 1:
  77.                                 api.alert({msg:'等待短信下发验证码'});
  78.                                 break;
  79.                             case 2:
  80.                                 api.alert({msg:'等待语音下发验证码'});
  81.                                 break;
  82.                         }
  83.                     }else{
  84.                         api.alert({msg:'获取验证码失败 错误码:'+err.code});
  85.                     }
  86.                 });
  87.                
  88.                 // 验证验证码
  89. //                uzyzxVerification.doVerificationCode({
  90. //                    phonenum: "18612345678",
  91. //                    verifycode: "12345",
  92. //                    sid: "4c1990a5c1ad2674bc94bc39a6fd0699",
  93. //                    appid: "efb7e1de9da649fa83881afea2841cd7"
  94. //                },function(ret,err){
  95. //                    if(ret.status){
  96. //                        api.alert({msg:'验证成功'});
  97. //                    }else{
  98. //                        api.alert({msg:'验证失败 错误码:'+err.code});
  99. //                    }
  100. //                });
  101.         }
  102.        
  103. </script>
  104. </html>
复制代码


14
帖子
0
勋章
73
Y币
冲头像,给你顶一个,虽然我也不会这个问题
11
帖子
0
勋章
259
Y币
:)
2
帖子
0
勋章
56
Y币
深呼吸 发表于 2015-7-31 16:10
冲头像,给你顶一个,虽然我也不会这个问题

然并卵啊 头像并不是我本人呀 。。
5
帖子
0
勋章
1万+
Y币
报错明显是找不到这个方法,是不是加错模块了
2
帖子
0
勋章
56
Y币
技术支持-M 发表于 2015-7-31 16:22
报错明显是找不到这个方法,是不是加错模块了

没有啊
QQ截图20150731162817.jpg
14
帖子
0
勋章
73
Y币
vimesly 发表于 2015-7-31 16:17
然并卵啊 头像并不是我本人呀 。。

是不是本人没关系,我就冲头像顶的
2
帖子
0
勋章
56
Y币
深呼吸 发表于 2015-7-31 17:14
是不是本人没关系,我就冲头像顶的

hoho 下班咯 回家吃饭咯
您需要登录后才可以回帖 登录

本版积分规则