l***@sina.com
l***@sina.com
  • 发布:2024-03-17 12:17
  • 更新:2024-03-17 12:17
  • 阅读:321

hbuilderx 5+ 云打包 app 不能正常运行

分类:HTML5+

hbuilderx 创建5+ 项目,创建global.js 文件引用其他js文件(使用document.write() 方式),真机运行时自定义基座都可以正常运行,apps下 存在js文件和html 文件。云打包后 下载apk文件,到同一部手机安装运行(自定义基座已卸载),apps文件夹下没有任何html 和js文件,不能正常跳转,不能正常运行。

manifest.json

"pages" : {

        "html/main.html" : {  
            "resources" : [  
                "css/mui.min.css",  
                "css/iconfont.css",  
                "css/iconfy.css",  
                "js/mui.min.js",  
                "js/fn.global.min.js"  
            ],  
            "refer" : [  ],  
            "priority" : 0  
        },  
        "html/cashi/index.html" : {  
            "resources" : [  
                "css/mui.min.css",  
                "css/mui.picker.min.css",  
                "js/mui.min.js",  
                "js/fn.global.min.js",  
                "js/jquery/jquery.min.js",  
                "js/common.js"  
            ],  
            "refer" : [  ],  
            "priority" : 0  
        },  
        "html/cashi/barCode.html" : {  
            "resources" : [  
                "css/common.css",  
                "js/common.js"  
            ],  
            "refer" : [  ],  
            "priority" : 0  
        },  
        "html/ruzhu/index.html" : {  
            "resources" : [  
                "css/mui.min.css",  
                "css/icons-extra.css",  
                "css/mui.picker.min.css",  
                "js/mui.min.js",  
                "js/fn.global.min.js",  
                "js/jquery/jquery.min.js",  
                "js/common.js"  
            ],  
            "refer" : [  ],  
            "priority" : 0  
        },  
        "html/ruzhu/barCode.html" : {  
            "resources" : [  
                "css/common.css",  
                "js/common.js"  
            ],  
            "refer" : [  ],  
            "priority" : 0  
        },"html/ruzhu/wdCode.html" : {  
            "resources" : [  
                "css/common.css",  
                "js/common.js"  
            ],  
            "refer" : [  ],  
            "priority" : 0  
        },  
        "html/zwxd/index.html" : {  
            "resources" : [  
                "css/mui.min.css",  
                "css/mui.picker.min.css",  
                "js/mui.min.js",  
                "js/fn.global.min.js",  
                "js/jquery/jquery.min.js",  
                "js/common.js"  
            ],  
            "refer" : [  ],  
            "priority" : 0  
        },  
        "html/zwxd/bnxCode.html" : {  
            "resources" : [  
                "css/common.css",  
                "js/common.js"  
            ],  
            "refer" : [  ],  
            "priority" : 0  
        },  
        "html/self/index.html" : {  
            "resources" : [  
                "css/mui.min.css",  
                "js/mui.min.js",  
                "js/fn.global.min.js",  
                "js/jquery/jquery.min.js"  
            ],  
            "refer" : [  ],  
            "priority" : 0  
        },  
        "html/record/cs.html" : {  
            "resources" : [  
                "css/mui.min.css",  
                "css/mui.picker.min.css",  
                "js/mui.min.js",  
                "js/fn.global.min.js"  
            ],  
            "refer" : [  ],  
            "priority" : 0  
        },  
        "html/record/rz.html" : {  
            "resources" : [  
                "css/mui.min.css",  
                "css/mui.picker.min.css",  
                "js/mui.min.js",  
                "js/fn.global.min.js"  
            ],  
            "refer" : [  ],  
            "priority" : 0  
        },  
        "html/record/wxd.html" : {  
            "resources" : [  
                "css/mui.min.css",  
                "css/mui.picker.min.css",  
                "js/mui.min.js",  
                "js/fn.global.min.js"  
            ],  
            "refer" : [  ],  
            "priority" : 0  
        },  
        "html/record/xd.html" : {  
            "resources" : [  
                "css/mui.min.css",  
                "css/mui.picker.min.css",  
                "js/mui.min.js",  
                "js/fn.global.min.js"  
            ],  
            "refer" : [  ],  
            "priority" : 0  
        }  
    },  

全局Global.js 引用了共用的js文件

(function($,w){
var pathName=window.document.location.pathname;

var hostName=pathName.substring(0,pathName.indexOf("www/")+4);  
if(hostName.indexOf("www/")==-1)  
{  
    hostName="/FyMrWy/";  
}  

var header=document.querySelector(".mui-bar-nav");  
if(header!=null)  
{  
    //document.write("<script language='javascript' src='/js/immersed.js'></script>");  
}  
document.write("<script language='javascript' src='"+hostName+"/js/mui.enterfocus.js'></script>");  
document.write("<script language='javascript' src='"+hostName+"/js/mui.pullToRefresh.js'></script>");  
document.write("<script language='javascript' src='"+hostName+"/js/mui.pullToRefresh.material.js'></script>");  
document.write("<script language='javascript' src='"+hostName+"/js/mui.picker.min.js'></script>");  
document.write("<script language='javascript' src='"+hostName+"/js/ldeasy/js.ldeasy.adjustResize.js'></script>");  
document.write("<script language='javascript' src='"+hostName+"/js/ldeasy/js.ldeasy.array.js'></script>");  
document.write("<script language='javascript' src='"+hostName+"/js/ldeasy/js.ldeasy.item.js'></script>");  
document.write("<script language='javascript' src='"+hostName+"/js/ldeasy/js.ldeasy.util.js'></script>");  
document.write("<script language='javascript' src='"+hostName+"/js/ldeasy/js.ldeasy.url.js'></script>");  
document.write("<script language='javascript' src='"+hostName+"/js/app.js'></script>");  
document.write("<script language='javascript' src='"+hostName+"/js/ldeasy/js.ldeasy.sqlite.js'></script>");  
document.write("<script language='javascript' src='"+hostName+"/js/ldeasy/js.ldeasy.sqlArray.js'></script>");  
document.write("<script language='javascript' src='"+hostName+"/js/ldeasy/js.ldeasy.access.js'></script>");  
document.write("<script language='javascript' src='"+hostName+"/js/ldeasy/js.ldeasy.push.js'></script>");  
document.write("<script language='javascript' src='"+hostName+"/js/ldeasy/js.ldeasy.update.js'></script>");  

}(mui,window));

2024-03-17 12:17 负责人:无 分享
已邀请:

要回复问题请先登录注册