【发布时间】:2018-02-24 19:20:46
【问题描述】:
我在 ionic 中使用 InAppBrowser 时遇到问题。我的应用程序是使用 ionic1 和 Cordova 插件开发的。我已经安装了cordova plugin add cordova-plugin-inappbrowser 并注入了我的控制器并使用了以下代码
$ionicPlatform.ready(function() {
var options = {
location: 'yes',
clearcache: 'yes',
toolbar: 'yes',
closebuttoncaption: 'DONE?'
};
$cordovaInAppBrowser.open($scope.submiturl, '_blank', options)
.then(function(event) {
// success
})
.catch(function(event) {
// error
});
});
错误报告显示,
THREAD WARNING: ['InAppBrowser'] took '175.479736' ms. Plugin should use a background thread.
以上代码在 android 中运行良好,但在 ios 中显示错误。请帮助任何人解决此问题。我在此链接上打开支付网关 url。即使经过大量的研发,我也找不到解决方案。
【问题讨论】:
-
这只是一个警告,不用担心。
-
我认为这是简单的警告,但只有白屏显示,不显示实际屏幕
-
那么您的代码中的其他地方可能存在问题。
-
是的,网址有问题。在 ios 应用内浏览器中,无法在查询字符串中使用数组数据。我用过这样的 url url?firstname=Vinoth&lastname=&phone=852642399&amou…{"scheme_type":"0","amount":1000,"pay_amt":1000,"charge":"0.00","charge_head":"便利费","firstname" :"Vinoth","lastname":"","Zipcode":"","email":"rvk1995@gmail.com","phone":"852642399","productinfo":"JSA","udf1" :"3637","udf2":"","udf3":"","udf4":"","udf5":"","discount":"","chit_number":"JSA 未分配"} ]
标签: ios angularjs cordova ionic-framework