Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YDL-Component-Medical
Overview
Overview
Details
Activity
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
杨凯
YDL-Component-Medical
Commits
bda0ea8e
Commit
bda0ea8e
authored
Jul 19, 2022
by
YKai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 代码优化
parent
483590e8
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
11 additions
and
101 deletions
+11
-101
build.gradle
app/build.gradle
+1
-1
config.gradle
config.gradle
+1
-0
im_ic_launcher.png
m-im/src/xlzx/res/mipmap-xhdpi/im_ic_launcher.png
+0
-0
colors.xml
m-im/src/xlzx/res/values/colors.xml
+0
-4
im_ic_launcher.png
m-im/src/ydl/res/mipmap-xhdpi/im_ic_launcher.png
+0
-0
colors.xml
m-im/src/ydl/res/values/colors.xml
+0
-4
NewH5Activity.java
ydl-webview/src/main/java/com/ydl/webview/NewH5Activity.java
+9
-92
No files found.
app/build.gradle
View file @
bda0ea8e
...
...
@@ -202,7 +202,7 @@ dependencies {
implementation
project
(
':ydl-webview'
)
implementation
project
(
':ydl-media'
)
implementation
project
(
':m-muse'
)
implementation
project
(
':m-im'
)
implementation
rootProject
.
ext
.
dependencies
[
"m-im-medical"
]
implementation
modularPublication
(
'com.ydl:m-im-api'
)
implementation
project
(
':m-dynamic'
)
implementation
project
(
':m-course'
)
...
...
config.gradle
View file @
bda0ea8e
...
...
@@ -285,6 +285,7 @@ ext {
"ydl-pay"
:
"com.ydl:ydl-pay:${ydlCompileVersion["
ydl
-
pay
"]}@aar"
,
"ydl-medical-pay"
:
"com.ydl:ydl-medical-pay:${ydlCompileVersion["
ydl
-
medical
-
pay
"]}@aar"
,
"m-audioim"
:
"com.ydl:m-audioim:${ydlCompileVersion["
m
-
audioim
"]}@aar"
,
"m-im-medical"
:
"com.ydl:m-im-module-medical:${ydlCompileVersion["
m
-
im
-
medical
"]}"
,
//业务组件 <<--- 最后发这些(只发改过的)
"ydl-m-user-api"
:
"com.ydl:m-user-api:${ydlCompileVersion["
m
-
user
-
api
"]}"
,
...
...
m-im/src/xlzx/res/mipmap-xhdpi/im_ic_launcher.png
deleted
100644 → 0
View file @
483590e8
21.3 KB
m-im/src/xlzx/res/values/colors.xml
deleted
100644 → 0
View file @
483590e8
<?xml version="1.0" encoding="utf-8"?>
<resources>
</resources>
m-im/src/ydl/res/mipmap-xhdpi/im_ic_launcher.png
deleted
100644 → 0
View file @
483590e8
34.7 KB
m-im/src/ydl/res/values/colors.xml
deleted
100644 → 0
View file @
483590e8
<?xml version="1.0" encoding="utf-8"?>
<resources>
</resources>
ydl-webview/src/main/java/com/ydl/webview/NewH5Activity.java
View file @
bda0ea8e
...
...
@@ -386,7 +386,7 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
return
;
}
setUrlHeightParams
();
//
setUrlHeightParams();
EventBus
.
getDefault
().
register
(
this
);
jtoJHandle
=
WebModularServiceUtils
.
Companion
.
getWebService
().
getJavascripHandler
(
this
,
tellData
=
tellData
);
...
...
@@ -409,93 +409,6 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
initTimeOutHandler
();
}
/**
* 专家详情页改版 需要url后面拼接状态栏高度 并且隐藏导航栏
*/
private
void
setUrlHeightParams
()
{
String
url
=
h5Params
.
getUrl
();
//兼容课程详情页url
if
(!
TextUtils
.
isEmpty
(
url
)
&&
url
.
contains
(
"course/Detail/"
)
&&
!
url
.
contains
(
"course/Detail/v2/"
))
{
url
=
url
.
replace
(
"course/Detail/"
,
"course/Detail/v2/"
);
//再次替换 方哥那边解决不了域名的问题 app中强行匹配修改
if
(
url
.
contains
(
"fe-app-yidianling"
))
{
int
index
=
url
.
indexOf
(
"course/Detail"
);
String
newUrl
=
url
.
substring
(
index
,
url
.
length
());
if
(
url
.
contains
(
"test"
))
{
newUrl
=
"https://testnewm.ydl.com/"
+
newUrl
;
}
else
{
newUrl
=
"https://m.ydl.com/"
+
newUrl
;
}
url
=
newUrl
;
}
}
url
=
pinjie
(
url
);
h5Params
.
setUrl
(
url
);
}
/**
* 专家详情页改版 需要url后面拼接状态栏高度 并且隐藏导航栏
*
* @param url
* @return
*/
private
String
setUrlHeightParams
(
String
url
)
{
String
resultUrl
=
url
;
try
{
Uri
uri
=
Uri
.
parse
(
url
);
String
host
=
uri
.
getHost
();
if
(!
TextUtils
.
isEmpty
(
host
)
&&
host
.
contains
(
"nodeapi.ydl"
))
{
//马亮的需求,在nodeapi.ydl.com 地址后面拼上公共参数,用于判断是否为app
String
uriAppendSuffix
=
jtoJHandle
.
getUriAppendSuffix
();
resultUrl
=
WebUrlParamsUtils
.
getSuffix
(
url
,
uriAppendSuffix
);
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
pinjie
(
resultUrl
);
}
private
String
pinjie
(
String
jumpUrl
)
{
if
(
jumpUrl
.
contains
(
"hideNavBar=1"
))
{
hideJavaTitleBar
();
return
jumpUrl
;
}
else
if
(
jumpUrl
.
contains
(
"hideNavBar=2"
))
{
showTitleBar
();
return
jumpUrl
;
}
String
useUrl
=
new
StringBuffer
().
append
(
jumpUrl
).
toString
();
Resources
res
=
getResources
();
String
[]
doctorUrlArray
=
res
.
getStringArray
(
R
.
array
.
platform_doctorUrls
);
for
(
String
url
:
doctorUrlArray
)
{
if
(
useUrl
.
contains
(
url
))
{
String
lastUrl
=
useUrl
.
replaceAll
(
url
,
""
);
if
(
lastUrl
.
contains
(
"?"
))
{
lastUrl
=
lastUrl
.
substring
(
0
,
lastUrl
.
indexOf
(
"?"
));
}
try
{
//不报错就说明可以转成long,就说明是专家详情页地址
Long
.
parseLong
(
lastUrl
);
if
(!
lastUrl
.
contains
(
"/"
))
{
if
(
useUrl
.
endsWith
(
"?"
))
{
useUrl
=
useUrl
.
substring
(
0
,
useUrl
.
indexOf
(
"?"
));
}
if
(!
useUrl
.
contains
(
"barHeight"
))
{
String
paramsStr
=
useUrl
.
contains
(
"?"
)
?
"&barHeight="
+
String
.
valueOf
(
StatusBarUtils
.
Companion
.
getStatusBarHeight
(
NewH5Activity
.
this
))
:
"?barHeight="
+
String
.
valueOf
(
StatusBarUtils
.
Companion
.
getStatusBarHeight
(
NewH5Activity
.
this
));
useUrl
=
new
StringBuffer
().
append
(
useUrl
).
append
(
paramsStr
).
toString
();
}
hideJavaTitleBar
();
}
}
catch
(
NumberFormatException
e
)
{
e
.
printStackTrace
();
}
}
}
return
useUrl
;
}
public
void
hasShowDownRefresh
(
boolean
isVisible
)
{
store_house_ptr_frame
.
post
(()
->
store_house_ptr_frame
.
setEnabled
(
isVisible
));
...
...
@@ -757,10 +670,12 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
Intent
intent
=
new
Intent
(
Intent
.
ACTION_VIEW
,
Uri
.
parse
(
url
));
startActivity
(
intent
);
}
else
if
(!
TextUtils
.
isEmpty
(
url
)
&&
url
.
startsWith
(
"http"
))
{
loadUrl
(
setUrlHeightParams
(
url
));
// loadUrl(setUrlHeightParams(url));
loadUrl
(
url
);
}
else
{
if
(!
YDLRouterManager
.
Companion
.
router
(
url
))
{
loadUrl
(
setUrlHeightParams
(
url
));
// loadUrl(setUrlHeightParams(url));
loadUrl
(
url
);
}
}
return
true
;
...
...
@@ -839,10 +754,12 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
Intent
intent
=
new
Intent
(
Intent
.
ACTION_VIEW
,
Uri
.
parse
(
url
));
startActivity
(
intent
);
}
else
if
(!
TextUtils
.
isEmpty
(
url
)
&&
url
.
startsWith
(
"http"
))
{
loadUrl
(
setUrlHeightParams
(
url
));
// loadUrl(setUrlHeightParams(url));
loadUrl
(
url
);
}
else
{
if
(!
YDLRouterManager
.
Companion
.
router
(
url
))
{
loadUrl
(
setUrlHeightParams
(
url
));
// loadUrl(setUrlHeightParams(url));
loadUrl
(
url
);
}
}
return
true
;
...
...
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