function ajax(type, url, data, dataType, callback) {
$.ajax({
type: type,
url: url,
data: data,
async: true,
dataType: dataType,
success: callback,
error: function(json) {
jumpPage(app.config.cryptionKey ? CR.encrypt('error') : 'error');
}
});
}
//调用
function jumpPage(){
ajax('get', pageUrl, null, 'html', function(html) {})
}

- 发布:2020-10-22 11:20
- 更新:2020-10-22 11:20
- 阅读:534
产品分类: HbuilderX
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: win7
HBuilderX版本号: 2.9.3
示例代码:
操作步骤:
引入native-->配置manifest-->打包
引入native-->配置manifest-->打包
预期结果:
加载出url页面
加载出url页面
实际结果:
进入error回调,加载不出url的页面
进入error回调,加载不出url的页面
bug描述:
用hd打包ok,hdx打包后ajax加载不了当前项目的html,但是hd打包的sdk低了