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
2b433e7f
Commit
2b433e7f
authored
Jul 18, 2022
by
fengquan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复咨询师详情页兼容问题
parent
ae311e9c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
19 deletions
+34
-19
JsMethod.kt
app/src/main/java/com/ydl/component/service/web/JsMethod.kt
+1
-1
BasePhotoFragment.kt
m-consultant/src/main/java/com/yidianling/consultant/preview/BasePhotoFragment.kt
+24
-12
fragment_image_photo_layout.xml
m-consultant/src/main/res/layout/fragment_image_photo_layout.xml
+2
-1
ExpertConsultServiceItemView.kt
m-im/src/main/java/com/yidianling/uikit/custom/widget/expertConsultService/view/ExpertConsultServiceItemView.kt
+7
-5
No files found.
app/src/main/java/com/ydl/component/service/web/JsMethod.kt
View file @
2b433e7f
...
...
@@ -110,7 +110,7 @@ class JsMethod(private val webView: WebView?) {
if
(
callback
.
isNullOrBlank
())
return
true
webView
?.
post
{
when
(
type
)
{
1
->
{
//检查音频权限能力
1
,
2
->
{
//检查音频权限能力
webView
.
loadUrl
(
"javascript:$callback(1)"
)
}
else
->
{
...
...
m-consultant/src/main/java/com/yidianling/consultant/preview/BasePhotoFragment.kt
View file @
2b433e7f
...
...
@@ -95,9 +95,9 @@ class BasePhotoFragment : Fragment() {
videoView
!!
.
pause
()
if
(
ivPlay
!=
null
&&
beanViewInfo
?.
sourcesType
==
2
)
{
ivPlay
?.
visibility
=
VISIBLE
if
(
ivImg
!=
null
)
{
ivImg
?.
visibility
=
VISIBLE
}
//
if (ivImg != null) {
//
ivImg?.visibility = VISIBLE
//
}
}
else
if
(
ivPlay
!=
null
&&
beanViewInfo
?.
sourcesType
==
1
)
{
ivPlay
?.
visibility
=
GONE
if
(
ivImg
!=
null
)
{
...
...
@@ -105,6 +105,10 @@ class BasePhotoFragment : Fragment() {
}
}
stopTiming
()
}
else
if
(
isVisibleToUser
&&
beanViewInfo
!=
null
&&
beanViewInfo
?.
sourcesType
==
2
)
{
if
(
videoView
!=
null
)
{
checkNetwork
()
}
}
if
(!
isVisiable
)
{
...
...
@@ -212,7 +216,7 @@ class BasePhotoFragment : Fragment() {
)
}
}
else
if
(
beanViewInfo
?.
sourcesType
==
2
)
{
ivPlay
!!
.
visibility
=
VISIBLE
//
ivPlay!!.visibility = VISIBLE
videoContainer
!!
.
visibility
=
VISIBLE
imageView
!!
.
visibility
=
GONE
ZoomMediaLoader
.
getInstance
().
loader
.
displayImage
(
...
...
@@ -248,6 +252,14 @@ class BasePhotoFragment : Fragment() {
}
true
}
if
(
isVisiable
)
{
ivPlay
?.
visibility
=
VISIBLE
checkNetwork
()
}
else
{
ivPlay
?.
visibility
=
GONE
}
ivPlay
!!
.
setOnClickListener
{
checkNetwork
()
}
...
...
@@ -339,13 +351,13 @@ class BasePhotoFragment : Fragment() {
.
setMessage
(
"当前处于非wifi环境下,播放会消耗流量,确定继续播放?"
)
.
setLeftOnclick
(
"继续播放"
)
{
if
(!
isPrepared
)
{
loading
!!
.
visibility
=
VISIBLE
loading
?
.
visibility
=
VISIBLE
}
ivImg
!!
.
visibility
=
GONE
ivPlay
!!
.
visibility
=
GONE
ivImg
?
.
visibility
=
GONE
ivPlay
?
.
visibility
=
GONE
startTiming
()
videoView
?.
visibility
=
VISIBLE
videoView
!!
.
start
()
videoView
?
.
start
()
isCompletion
=
false
context
?.
getSharedPreferences
(
"temp_test"
,
Context
.
MODE_PRIVATE
)
?.
edit
()
...
...
@@ -362,13 +374,13 @@ class BasePhotoFragment : Fragment() {
dialog
.
show
()
}
else
{
if
(!
isPrepared
)
{
loading
!!
.
visibility
=
VISIBLE
loading
?
.
visibility
=
VISIBLE
}
ivImg
!!
.
visibility
=
GONE
ivPlay
!!
.
visibility
=
GONE
ivImg
?
.
visibility
=
GONE
ivPlay
?
.
visibility
=
GONE
startTiming
()
videoView
?.
visibility
=
VISIBLE
videoView
!!
.
start
()
videoView
?
.
start
()
isCompletion
=
false
}
}
...
...
m-consultant/src/main/res/layout/fragment_image_photo_layout.xml
View file @
2b433e7f
...
...
@@ -31,7 +31,8 @@
<ImageView
android:id=
"@+id/ivImage"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
android:layout_height=
"match_parent"
android:visibility=
"gone"
/>
<ImageView
...
...
m-im/src/main/java/com/yidianling/uikit/custom/widget/expertConsultService/view/ExpertConsultServiceItemView.kt
View file @
2b433e7f
...
...
@@ -17,6 +17,7 @@ import com.yidianling.uikit.custom.http.response.ServiceItemBean
import
com.yidianling.uikit.custom.widget.expertConsultService.callback.ConsultServiceViewCallback
import
com.yidianling.user.api.service.IUserService
import
kotlinx.android.synthetic.main.im_expert_consult_service_item_view.view.*
import
java.text.DecimalFormat
/**
* 咨询服务, 预约item
...
...
@@ -117,11 +118,12 @@ class ExpertConsultServiceItemView : LinearLayout {
val
mBean
:
ServiceItemBean
.
ProductsBean
.
ProductSpecDtosBean
=
bean
.
productSpecDtos
.
sortedWith
(
mCompare
).
last
()
//价格,取productSpecDtos数组最小价格,不保留小数
service_item_price
.
text
=
String
.
format
(
"%.0f"
,
mBean
.
price
)
// service_item_price.text = String.format(
// "%.0f",
// mBean.price
// )
val
decimalFormat
=
DecimalFormat
(
"###.##"
)
service_item_price
.
text
=
decimalFormat
.
format
(
mBean
.
price
)
service_item_price
.
paint
.
isFakeBoldText
=
true
//时间,取productSpecDtos数组最后一个的时间
...
...
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