|
由于apploader对于调用模块开发,得保证apploader有对应的模块功能,比如要用融云模块,必须用带有融云功能的apploader。否则就不能调试,会抛出init方法不可用的错误。于是乎我就想到了一个方法(可能你们都在用),既能方便调试,又保证所有功能正常:
1、安装一个web服务,比如Apache、nginx、IIS等,保证自己正在开发的App能够正常的访问,并记录下来访问地址,填入第二步代码红色部分。
2、做一个空盒的APP,我使用就是默认的HelloApp,首页改成
- <!doctype html>
- <html>
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
- <title>本地学习测试</title>
- </head>
- <body style="margin-top:100px;">
- <input type="text" value="<font color="Red">正在做的app的访问地址</font>" id="url" style="width:100%;height:50px;line-height:50px;font-size:24px;">
- <button id="into" style="width:100%;height:50px;line-height:50px;font-size:24px;margin-top:20px;">进入</button>
- </body>
- <script type="text/javascript">
- apiready = function() {
- api.clearCache();
- };
- document.getElementById("into").onclick = function(event) {
- api.openWin({
- name: 'cjn',
- url: 'http://'+document.getElementById("url").value+'/'
- });
- }
- </script>
- </html>
复制代码 提交SVN。
3、去apicloude对于控制台,把创建这个空盒APP(或者HelloApp)的模块页面,勾选出自己需要的模块。
4、通过云编译打包好,然后安装到自己的测试机,这样就是自己专有的一个调试器。
5、新增模块也很简单,只需把空盒APP的模块勾选,重新云编译。正在开发的APP就可以正常使用了。
|
|