Commit 2b433e7f by fengquan

fix: 修复咨询师详情页兼容问题

parent ae311e9c
......@@ -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 -> {
......
......@@ -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
}
}
......
......@@ -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
......
......@@ -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数组最后一个的时间
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment