javascript - 我的 Cordova 应用程序会被拒绝吗?从 json 响应加载外部数据

标签 javascript ios cordova store

我已经为 iOS 设备创建了一个 Cordova 应用程序,但我有一个简单的问题。例如,我以这种方式(使用 Ajax)从我的 API (php) 加载 ul 列表中的对象:

$('#abc').html(data.abc2);

在服务器端我有 while 循环。 json 响应中这些循环的结果是这样的(X 个结果):

<li style="margin-left: 31px;">
                        <div class="commmtodeletef>
                          <a href="#" class="item item-content">
                            <div class="item-media" style="width: 51px;"><img style="border-radius: 50%;height: 40px;width: 40px;" src="img" alt=""></div>
                            <div class="item-inner" style="margin-top: 20px;margin-left: 4px;">
                              <div class="item-title-row" style="margin-bottom:0px;">
                                <div class="item-title" style="margin-bottom: 0px;font-size: 16px;">fname lname</div>
                              </div>
                              <div class="item-text" style="font-size: 15px;color:#000;font-weight: 300;">abc</div>
                              <div class="item-subtitle bottom-subtitle row" style="font-size: 12px;"><div class="timdvcl" style="color: #8e8e93;"><i class="icon ion-md-time"></I>tm</div> <div id="imgdelcomm" data-id="" style="display:none;"><img  src="img/loader.gif" width="20px" /></div>
                              </div>
                            </div>
                          </a>
                            </div>
                        </li>

换句话说,循环是在服务器端执行的,我得到 json 响应,然后填充 ul,而不是在 app.js 中作为成功响应的 Ajax 循环。这是正确的方法还是我应该在 app.js 中使用 Ajax 循环?使用应用程序外部的循环在 App Store 上提交应用程序时会遇到问题吗?

最佳答案

我在这里并没有真正看到 JSON 响应,但我只是要回答主要问题:提交应用应该没有任何问题。许多应用程序都有 Ajax 调用。

关于javascript - 我的 Cordova 应用程序会被拒绝吗?从 json 响应加载外部数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52918628/

相关文章:

ios - 使用自动布局约束 swift 2.1 从中心到顶部为 UIView 设置动画

jquery - 我可以在 phonegap 中应用不同的样式表吗

javascript - 使用字符串方法更改 Javascript 对象中的 DOM 元素参数

ios - 在 Mac 10.5.8 上开发 iOS 应用程序

javascript - mongoose mongodb nodejs 的 bodyparser 错误

javascript - 如何将我的 expo 应用程序发布到 Apple 应用商店?

html - 在 phonegap 应用程序中打开新的 html 页面

javascript - 名称 :function(parms) - strange way to define a JavaScript function?

javascript - Facebook JS API 错误

javascript - ES7 async/await 概念问题