Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
ShenghuoquanBusiness
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bp
ShenghuoquanBusiness
Commits
1841f98b
Commit
1841f98b
authored
Jul 15, 2021
by
shiyl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新发布优惠券页面title取js中的title
parent
feea04d3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
CommonWebViewActivity.kt
...an/shenghuoquan/xbirdbusiness/ui/CommonWebViewActivity.kt
+11
-2
No files found.
Components/xbirdbusiness/src/main/java/com/yidian/shenghuoquan/xbirdbusiness/ui/CommonWebViewActivity.kt
View file @
1841f98b
...
...
@@ -47,7 +47,7 @@ class CommonWebViewActivity : BaseMvvmActivity<XbridActivityCommonWebViewBinding
}
url
=
webViewUrl
Timber
.
e
(
"页面的URL : $webViewUrl"
)
// 判断目的页面
// 判断目的页面
,getXBridPageName 仅支持config文件中有的url,不支持ip+端口
when
(
XBridManager
.
getXBridPageName
(
webViewUrl
))
{
XBirdPageConstants
.
COMMODITY_PUBLISH_COMMODITY
->
initPublishCommodityWebView
(
webViewUrl
)
else
->
{
...
...
@@ -61,11 +61,20 @@ class CommonWebViewActivity : BaseMvvmActivity<XbridActivityCommonWebViewBinding
* 初始化发布商品页面
*/
private
fun
initPublishCommodityWebView
(
webViewUrl
:
String
)
{
initTitleBar
(
binding
.
include
.
toolbar
,
binding
.
include
.
tvTitle
,
"发布商品"
)
webView
=
XBridManager
.
getWebView
(
this
,
"testidenfier"
,
binding
.
commonWebView
)
webView
.
loadUrl
(
webViewUrl
)
Timber
.
tag
(
"CommonWebView"
).
e
(
" 请求地址: $webViewUrl"
)
webView
.
webChromeClient
=
object
:
WebChromeClient
()
{
override
fun
onReceivedTitle
(
view
:
WebView
?,
title
:
String
?)
{
super
.
onReceivedTitle
(
view
,
title
)
if
(!
title
.
isNullOrBlank
())
{
Timber
.
tag
(
"CommonWebView"
).
e
(
" 页面title: $title"
)
initTitleBar
(
binding
.
include
.
toolbar
,
binding
.
include
.
tvTitle
,
title
)
}
}
override
fun
onProgressChanged
(
view
:
WebView
?,
newProgress
:
Int
)
{
super
.
onProgressChanged
(
view
,
newProgress
)
if
(
newProgress
==
100
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment