IBM Worklight 6.0 - WL.Client.reloadApp()在Windows Phone 8中不起作用 [英] IBM Worklight 6.0 - WL.Client.reloadApp() not working in Windows Phone 8
问题描述
我们正在使用Worklight 6.0.0企业版,目前正在为Android,BB,Windows Phone 8和iOS构建混合应用程序。
We are using Worklight 6.0.0 enterprise edition and currently building hybrid apps for android, BB, Windows Phone 8 and iOS.
我们目前收到以下错误单击注销按钮时调用 WL.Client.reloadApp()
时。这适用于除WP8之外的所有操作系统。
We are currently getting the below error when invoking WL.Client.reloadApp()
when clicking on a logout button. This works fine all OSs except for WP8.
CordovaBrowser_NavigationFailed ::
/// www / default / www / default / pages / www / default / pages / www / default / pages / www / default / pages / myaccount.html
错误:InvokeScriptCallback中的异常::未知错误发生
。错误:80020006。错误:InvokeScriptCallback中的异常::
发生了未知错误。错误:80020006。
CordovaBrowser_NavigationFailed :: ///www/default/www/default/pages/www/default/pages/www/default/pages/www/default/pages/myaccount.html ERROR: Exception in InvokeScriptCallback :: An unknown error has occurred. Error: 80020006. ERROR: Exception in InvokeScriptCallback :: An unknown error has occurred. Error: 80020006.
这是我们的退出功能:
logout() {
window.localStorage.clear();
$.mobile.changePage("../MainPage.html");
$('#username').val('');
$('#password').val('');
$("#Footer").show();
$("#ui_logoutlst").hide();
$("#homeBt_menu").hide();
$('ul#QuickLinks li').width('50%');
};
推荐答案
2014年4月8日更新
我使用了样本我在之前的回答中提供了项目。
这是一个更新版本: WindowsTestApp
我做了什么:
-
在
wlCommonInit()
中删除了路径
变量的使用。
Removed use of the
path
variable inwlCommonInit()
.
将 changeHash:false
选项添加到 $ .mobile.changePage()
。
例如: $ .mobile.changePage(Pages / MyAccount.html,{changeHash:false});
在WindowTestApp.html中
In WindowTestApp.html
从<$ c $中移除此行c> HEAD 元素:
< script> window。$ = window.jQuery = WLJQ;< /脚本>
在js\jquery-1.10.2.js中:
In js\jquery-1.10.2.js:
查找
xhr.open(s.type,s.url,s.async);
xhr.open(s.type, s.url, s.async);
更改为
s.url = s.url.replace(x-wmapp0:///, );
xhr.open(s.type,s.url,s.async);
s.url = s.url.replace("x-wmapp0:///", "");
xhr.open(s.type, s.url, s.async);
如果使用 WL,步骤3正确使用
。 changePage
.Client.reloadApp()
Step 3 is correct use of changePage
in case of using WL.Client.reloadApp()
.
步骤4似乎是jQuery / jQuery Mobile中的一个错误,特定于处理Windows Phone中的文件位置。
Step 4 seems to be a bug in jQuery/jQuery Mobile specific to handling to file location in Windows Phone.
这篇关于IBM Worklight 6.0 - WL.Client.reloadApp()在Windows Phone 8中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!