Webview屏幕什么也不显示

问题描述 投票:-1回答:1

我有一个话题。

我在离子应用程序中有一个webview,它可以正常使用我理解的所有使用https的页面。但是,当我使用此链接时:https://portal.argos.com.do/,因为屏幕变为空白,什么也没说。当我将其用作_self时会发生这种情况。有人知道为什么吗?

代码:

openurl(url: string) {
    const options: InAppBrowserOptions = {
      zoom: 'no'
    };    
    const bro = this.browser.create(url, '_self', options);
}
<?xml version='1.0' encoding='utf-8'?>
<manifest android:hardwareAccelerated="true" 
          android:versionCode="1" android:versionName="0.0.1"
          package="io.ionic.starter"
          xmlns:android="http://schemas.android.com/apk/res/android">
    <supports-screens android:anyDensity="true" 
                      android:largeScreens="true" 
                      android:normalScreens="true"
                      android:resizeable="true"
                      android:smallScreens="true"
                      android:xlargeScreens="true" />
    <uses-permission android:name="android.permission.INTERNET" />
    <application 
            android:hardwareAccelerated="true" 
            android:icon="@mipmap/ic_launcher" 
            android:label="@string/app_name" 
            android:networkSecurityConfig="@xml/network_security_config" 
            android:supportsRtl="true" 
            android:usesCleartextTraffic="true">
        <activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode"
                  android:label="@string/activity_name"
                  android:launchMode="singleTop" android:name="MainActivity"
                  android:theme="@android:style/Theme.DeviceDefault.NoActionBar"
                  android:windowSoftInputMode="adjustResize">
            <intent-filter android:label="@string/launcher_name">
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
</manifest>
angular cordova ionic-framework inappbrowser
1个回答
0
投票

发生的结果是即使该页面显示https也不完全安全,因为该服务器现在使用的是TLS 1.0,而不是更新的TLS。您可以找到一些页面来验证您的SSL证书,以防万一:

https://www.dondomain.com/products/ssl/tools/ssl-checker/

https://www.ssllabs.com/ssltest/analyze.html

然后解决方案是忽略页面的SSL。

[一种测试和更深入了解的方法是(以我为例)在android studio中查看我的应用程序的仿真器日志,并使用此代码忽略SSL,并在这里知道它的原因是:

https://stackoverflow.com/a/49786820/11150506

因此,在离子模式下,应该忽略SSL并显示页面,但是Play商店可能不允许它,因此它应该为用户提供一种取消进入页面的操作的方法是或否。

© www.soinside.com 2019 - 2024. All rights reserved.