Ionic inappbrowser从外部链接返回后无法工作



我有一个带有ios、android和浏览器的ionic项目。问题出现在IOS和Android中:从tab1.page.html,在IOS浏览器中打开登录页面(在外部服务器中(后,没有任何问题,该外部页面有一个指向ionic项目(到map.component.html(的链接,该链接打开得很好,但页面中应该再次打开浏览器的按钮将无法工作,没有错误,没有任何错误,只是没有任何操作。

如果我直接从离子项目内部打开map.component.html,按钮会正常工作,浏览器也会打开。只有当按钮不起作用时,我才能从外部页面返回。

任何帮助都将不胜感激,我的头已经撞到墙上好几天了。。。

tab1.page.html

<div>
<a href="#" routerLink="/login" routerDirection="root"><ion-ripple-effect></ion-ripple-effect><img src="../../assets/images/top-btn-reserve.png" class="drop-shadow" alt="login"></a>
</div>

登录page.ts

private  loginUrl = 'https://test.blabla.reservation/index';
constructor(
private inAppBrowser: InAppBrowser
) {
}
ngOnInit() {
const browser = this.inAppBrowser.create(this.loginUrl, '_self', {location: 'no', zoom: 'no', toolbar: 'no'});
}

应用程序例程模块

{ path: 'guidance', loadChildren: './guidance/tab2.module#Tab2PageModule',pathMatch: 'full'},

map.component.ts

openMapApp() {
console.log("In openMAPPPP");
const browser = this.inAppBrowser.create('https://www.google.com', '_system', {location: 'yes', zoom: 'no', toolbar: 'no'});
}

map.component.html

<ion-button  id="navigation_icon" class="navigation_icon" shape="round" size="default" color="light" (click)="openMapApp()">GoogleMapsで見る</ion-button>

Ionic:
Ionic CLI                     : 6.18.1 (/Users/allround/.nvm/versions/node/v12.22.6/lib/node_modules/@ionic/cli)
Ionic Framework               : @ionic/angular 4.11.5
@angular-devkit/build-angular : 0.13.10
@angular-devkit/schematics    : 8.3.19
@angular/cli                  : 7.3.10
@ionic/angular-toolkit        : 1.5.1
Capacitor:
Capacitor CLI      : 1.5.1
@capacitor/android : not installed
@capacitor/core    : 1.5.1
@capacitor/ios     : 1.5.2
Cordova:
Cordova CLI       : 10.0.0 (cordova-lib@10.1.0)
Cordova Platforms : browser 6.0.0, ios 6.2.0
Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 5.0.0, (and 12 other plugins)

在外部浏览器中打开后回调URL。

Ex

this.iabRef = this.iab.create("https://stackoverflow.com/", "_blank", "beforeload=yes,location=no");

this.iab.create(event.url, "_system");
this.iabRef._loadAfterBeforeload(event.url);

最新更新