|
|
@ -54,12 +54,12 @@ class WebViewLoginFragment : BaseFragment(R.layout.fragment_web_view_login) { |
|
|
|
|
|
|
|
|
|
|
|
@SuppressLint("SetJavaScriptEnabled") |
|
|
|
@SuppressLint("SetJavaScriptEnabled") |
|
|
|
private fun initWebView(source: BaseSource) { |
|
|
|
private fun initWebView(source: BaseSource) { |
|
|
|
val settings = binding.webView.settings |
|
|
|
binding.webView.settings.apply { |
|
|
|
settings.setSupportZoom(true) |
|
|
|
builtInZoomControls = true |
|
|
|
settings.builtInZoomControls = true |
|
|
|
javaScriptEnabled = true |
|
|
|
settings.javaScriptEnabled = true |
|
|
|
|
|
|
|
source.getHeaderMap()[AppConst.UA_NAME]?.let { |
|
|
|
source.getHeaderMap()[AppConst.UA_NAME]?.let { |
|
|
|
settings.userAgentString = it |
|
|
|
userAgentString = it |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
val cookieManager = CookieManager.getInstance() |
|
|
|
val cookieManager = CookieManager.getInstance() |
|
|
|
source.loginUrl?.let { |
|
|
|
source.loginUrl?.let { |
|
|
|