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
71169205
Commit
71169205
authored
May 30, 2022
by
霍志良
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:富文本相关标签联调
parent
1d9a3575
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
17 deletions
+29
-17
DemoGlobalConfig.java
app/src/main/java/com/ydl/component/base/DemoGlobalConfig.java
+2
-2
YDLMessageFragment.java
m-im/src/main/java/com/yidianling/uikit/business/session/fragment/YDLMessageFragment.java
+3
-1
ExpertConsultServiceListDialog.kt
m-im/src/main/java/com/yidianling/uikit/custom/widget/expertConsultService/view/ExpertConsultServiceListDialog.kt
+3
-2
ExpertConsultWebview.kt
m-im/src/main/java/com/yidianling/uikit/custom/widget/expertConsultService/view/ExpertConsultWebview.kt
+21
-12
No files found.
app/src/main/java/com/ydl/component/base/DemoGlobalConfig.java
View file @
71169205
...
...
@@ -21,9 +21,9 @@ import java.util.List;
public
final
class
DemoGlobalConfig
implements
IConfigModule
{
String
APP_DOMAIN
=
"https://api.github.com/"
;
// public static String appEnv = YDLConstants.ENV_AUTO_TEST;
//
public static String appEnv = YDLConstants.ENV_TEST;
public
static
String
appEnv
=
YDLConstants
.
ENV_TEST
;
// public static String appEnv = YDLConstants.ENV_NEW_TEST;//配置未上传到maven库
public
static
String
appEnv
=
YDLConstants
.
ENV_PROD
;
//
public static String appEnv = YDLConstants.ENV_PROD;
@Override
public
void
injectAppLifecycle
(
@NotNull
Context
context
,
@NotNull
List
<
IAppLifecycles
>
lifecycles
)
{
lifecycles
.
add
(
new
DemoAppLifecycles
());
...
...
m-im/src/main/java/com/yidianling/uikit/business/session/fragment/YDLMessageFragment.java
View file @
71169205
...
...
@@ -916,7 +916,9 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
.
subscribe
(
res
->
{
if
(
res
.
data
!=
null
&&
res
.
data
.
size
()
>
0
)
{
if
(
getActivity
()
!=
null
&&
expertConsultServiceListDialog
==
null
)
{
expertConsultServiceListDialog
=
new
ExpertConsultServiceListDialog
(
getActivity
(),
res
.
data
,
isBusy
,
sessionId
);
expertConsultServiceListDialog
=
new
ExpertConsultServiceListDialog
(
getActivity
(),
res
.
data
,
isBusy
,
sessionId
,
ActionHandlerStorage
.
getL
(
sessionId
).
getInfo
().
doctorId
);
expertConsultServiceListDialog
.
show
();
}
}
else
{
...
...
m-im/src/main/java/com/yidianling/uikit/custom/widget/expertConsultService/view/ExpertConsultServiceListDialog.kt
View file @
71169205
...
...
@@ -32,7 +32,7 @@ import kotlinx.android.synthetic.main.im_expert_consult_service_list_dialog_layo
*
* @param mIsBusy 咨询师是否是繁忙状态
*/
class
ExpertConsultServiceListDialog
(
val
mContext
:
Context
,
val
mList
:
List
<
ServiceItemBean
>,
val
mIsBusy
:
Boolean
,
val
toUid
:
String
):
Dialog
(
mContext
,
R
.
style
.
dialog_default_style
)
{
class
ExpertConsultServiceListDialog
(
val
mContext
:
Context
,
val
mList
:
List
<
ServiceItemBean
>,
val
mIsBusy
:
Boolean
,
val
toUid
:
String
,
val
doctorID
:
String
):
Dialog
(
mContext
,
R
.
style
.
dialog_default_style
)
{
private
var
mConsultServiceListView
:
ExpertConsultServiceView
?
=
null
private
var
mConsultServiceDetailView
:
ExpertConsultServiceDetailView
?
=
null
...
...
@@ -70,6 +70,7 @@ class ExpertConsultServiceListDialog(val mContext: Context, val mList: List<Serv
// mConsultServiceDetailView?.updateData(serviceBean)
// dialog_bottom_scroll_view.currentItem = 1
// }
mWebviewView
?.
setData
(
serviceBean
)
dialog_bottom_scroll_view
.
currentItem
=
1
}
...
...
@@ -107,7 +108,7 @@ class ExpertConsultServiceListDialog(val mContext: Context, val mList: List<Serv
},
mIsBusy
,
toUid
)
// mViewList.add(mConsultServiceDetailView as View)
mWebviewView
=
ExpertConsultWebview
(
mContext
)
mWebviewView
=
ExpertConsultWebview
(
mContext
,
doctorID
=
doctorID
)
mViewList
.
add
(
mWebviewView
as
View
)
dialog_bottom_scroll_view
.
adapter
=
ConsultServicePagerAdapter
()
...
...
m-im/src/main/java/com/yidianling/uikit/custom/widget/expertConsultService/view/ExpertConsultWebview.kt
View file @
71169205
...
...
@@ -17,32 +17,42 @@ import com.ydl.ydlcommon.base.config.HttpConfig
import
com.yidianling.common.tools.RxDeviceTool
import
com.yidianling.common.tools.ToastUtil
import
com.yidianling.im.R
import
com.yidianling.uikit.custom.http.response.ServiceItemBean
import
com.yidianling.uikit.custom.widget.expertConsultService.callback.ConsultServiceViewCallback
class
ExpertConsultWebview
:
RelativeLayout
{
constructor
(
context
:
Context
)
:
super
(
context
)
{
private
var
doctorID
:
String
private
lateinit
var
productBean
:
ServiceItemBean
.
ProductsBean
private
var
jumpUrl
=
""
private
lateinit
var
wv_content
:
ProgressWebView
constructor
(
context
:
Context
,
doctorID
:
String
)
:
super
(
context
)
{
mContext
=
context
this
.
doctorID
=
doctorID
initView
()
}
private
var
mContext
:
Context
?
=
null
private
fun
initView
()
{
val
mWidth
:
Int
=
RxDeviceTool
.
getScreenWidth
(
mContext
)
val
mHeight
:
Int
=
LayoutParams
.
MATCH_PARENT
val
params
=
LayoutParams
(
mWidth
,
mHeight
)
params
.
height
=
mHeight
layoutParams
=
params
var
view
=
View
.
inflate
(
mContext
,
R
.
layout
.
im_expert_consult_webview_view
,
this
)
wv_content
=
view
.
findViewById
<
ProgressWebView
>(
R
.
id
.
wv_content
)
webViewInit
(
wv_content
,
doctorID
)
}
var
view
=
View
.
inflate
(
mContext
,
R
.
layout
.
im_expert_consult_webview_view
,
this
)
webViewInit
(
view
.
findViewById
<
ProgressWebView
>(
R
.
id
.
wv_content
))
fun
setData
(
productBean
:
ServiceItemBean
.
ProductsBean
)
{
this
.
productBean
=
productBean
jumpUrl
=
HttpConfig
.
MH5_URL
+
"wb/product/chat/template?doctorId=${doctorID}{&cateId=634&productId=${productBean.productDto.id}"
wv_content
.
loadUrl
(
jumpUrl
)
}
private
fun
shouldOverridePayUrl
(
view
:
WebView
,
url
:
String
):
Boolean
{
if
(
url
.
startsWith
(
"weixin://"
))
{
return
try
{
...
...
@@ -100,7 +110,8 @@ class ExpertConsultWebview : RelativeLayout {
}
return
false
}
fun
webViewInit
(
wv_content
:
ProgressWebView
)
{
fun
webViewInit
(
wv_content
:
ProgressWebView
,
doctorID
:
String
)
{
val
setting
:
WebSettings
=
wv_content
?.
settings
!!
//支持js
//支持js
...
...
@@ -121,11 +132,9 @@ class ExpertConsultWebview : RelativeLayout {
.
getJavascripHandler
(
mContext
as
Activity
,
tellData
=
TellData
())
wv_content
!!
.
addJavascriptInterface
(
jtoJHandle
,
"javascriptHandler"
)
var
jumpurl
=
HttpConfig
.
MH5_URL
+
"wb/product/chat/template?doctorId=${111}{&cateId=634&productId=${111}"
val
url
=
WebUrlParamsUtils
.
getSuffix
(
jumpurl
,
jtoJHandle
.
getUriAppendSuffix
())
val
url
=
WebUrlParamsUtils
.
getSuffix
(
jumpUrl
,
jtoJHandle
.
getUriAppendSuffix
())
wv_content
.
loadUrl
(
url
)
// wv_content.loadUrl(jumpUrl)
wv_content
.
webViewClient
=
object
:
WebViewClient
()
{
override
fun
shouldOverrideUrlLoading
(
webview
:
WebView
,
url
:
String
?):
Boolean
{
if
(
url
.
isNullOrBlank
())
return
false
...
...
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