如何最小化Apache Cordova App加载时间

时间:2016-10-02 06:38:09

标签: javascript html cordova sapui5 sap-fiori

我是Cordova应用程序的新用户,现在我正在使用cordova在SAPUI5上开发一个应用程序,当我在android上运行它需要7-8秒加载时,我尝试了缩小css和js但它没有做到help.Here是我的HTML代码。

`<!DOCTYPE HTML>
<html>
    <head>
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta http-equiv='Content-Type' content='text/html;charset=UTF-8'/>

        <script src="resources/sap-ui-core.js"
                id="sap-ui-bootstrap"
                data-sap-ui-libs="sap.m"
                data-sap-ui-theme="sap_bluecrystal">
        </script>
        <!-- only load the mobile lib "sap.m" and the "sap_bluecrystal" theme -->

        <link rel="stylesheet" type="text/css" href="Style/myCSS.css">

        <script>
        var user = "xxxx";
        var pass = "xxxx";
        var gatewayLoginLink = "proxy/http/xxxxxx/sap/opu/odata/sap/xxxxx";
        sap.ui.getCore().setModel(new sap.ui.model.odata.ODataModel( gatewayLoginLink, true, user, pass));

        </script>


        <script>
                sap.ui.localResources("qrcode");
                var app = new sap.m.App({initialPage:"idqrcode1"});
                var page = sap.ui.view({id:"idqrcode1", viewName:"qrcode.qrcode", type:sap.ui.core.mvc.ViewType.XML});
                app.addPage(page);
                app.placeAt("content");
        </script>   
     <script type="text/javascript" src="cordova.js"></script>

    </head>
    <body class="sapUiBody" role="application">
        <div id="content"></div>
    </body>
</html>`

请帮忙。

0 个答案:

没有答案