Commit b1fbfa5c by 霍志良

feat:BUG修改

parent 6d1ecf5d
...@@ -14,7 +14,7 @@ buildscript { ...@@ -14,7 +14,7 @@ buildscript {
ydlrouter_version = '1.2.3' ydlrouter_version = '1.2.3'
constrait_support_version = '1.0.2' constrait_support_version = '1.0.2'
componentVersion = "0.3.0.21-SNAPSHOT" componentVersion = "0.3.0.23-SNAPSHOT"
} }
repositories { repositories {
mavenCentral() mavenCentral()
......
...@@ -50,6 +50,7 @@ import com.yidianling.common.tools.ToastUtil ...@@ -50,6 +50,7 @@ import com.yidianling.common.tools.ToastUtil
import com.yidianling.consultant.adapter.ExpertSearchAdapter import com.yidianling.consultant.adapter.ExpertSearchAdapter
import com.yidianling.consultant.bean.ConsultantRecentCity import com.yidianling.consultant.bean.ConsultantRecentCity
import com.yidianling.consultant.constants.ConsultBIConstants import com.yidianling.consultant.constants.ConsultBIConstants
import com.yidianling.consultant.constants.ConsultBIConstants.ConsultantLocationAuth.Companion.REFUSE_ALREADY
import com.yidianling.consultant.constants.ConsultBIConstants.ConsultantLocationAuth.Companion.WHETHER_LOCATION_AUTH import com.yidianling.consultant.constants.ConsultBIConstants.ConsultantLocationAuth.Companion.WHETHER_LOCATION_AUTH
import com.yidianling.consultant.listener.* import com.yidianling.consultant.listener.*
import com.yidianling.consultant.dialog.ConsultSubPayDialog import com.yidianling.consultant.dialog.ConsultSubPayDialog
...@@ -920,11 +921,14 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres ...@@ -920,11 +921,14 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
if (MMKV.defaultMMKV().decodeBool(WHETHER_LOCATION_AUTH)) { if (MMKV.defaultMMKV().decodeBool(WHETHER_LOCATION_AUTH)) {
//同意定位授权 //同意定位授权
showAreaPopupWindow(true) showAreaPopupWindow(true)
} else if (MMKV.defaultMMKV().decodeBool(REFUSE_ALREADY)) {
showAreaPopupWindow(false)
} else { } else {
val dialog = CommonDialog(mContext) val dialog = CommonDialog(mContext)
.setTitle("温馨提示") .setTitle("温馨提示")
.setMessage("建议您授权定位权限,就能轻松获取周边优秀咨询师和其他服务") .setMessage("建议您授权定位权限,就能轻松获取周边优秀咨询师和其他服务")
.setLeftOnclick("暂不") { v1 -> .setLeftOnclick("暂不") { v1 ->
MMKV.defaultMMKV().encode(REFUSE_ALREADY, true)
showAreaPopupWindow(false) showAreaPopupWindow(false)
}.setRightClick("授权") { v12 -> }.setRightClick("授权") { v12 ->
MMKV.defaultMMKV().encode(WHETHER_LOCATION_AUTH, true) MMKV.defaultMMKV().encode(WHETHER_LOCATION_AUTH, true)
......
...@@ -98,6 +98,7 @@ class ConsultBIConstants { ...@@ -98,6 +98,7 @@ class ConsultBIConstants {
class ConsultantLocationAuth { class ConsultantLocationAuth {
companion object { companion object {
const val WHETHER_LOCATION_AUTH = "whether_location_auth" const val WHETHER_LOCATION_AUTH = "whether_location_auth"
const val REFUSE_ALREADY = "refuse_already"
const val RECENT_CITY = "recent_city" const val RECENT_CITY = "recent_city"
} }
} }
......
...@@ -81,12 +81,16 @@ class PricePopupWindow( ...@@ -81,12 +81,16 @@ class PricePopupWindow(
max_Price = infiniteText max_Price = infiniteText
SeekBarRightValue = 100f SeekBarRightValue = 100f
} else { } else {
max_Price = tempFilter.priceRanges?.max_price.toString() + "元" max_Price = tempFilter.priceRanges?.max_price.toString()
SeekBarRightValue = SeekBarRightValue =
(tempFilter.priceRanges?.max_price.toString().toFloat() / maxPriceValue) * 100f (tempFilter.priceRanges?.max_price.toString().toFloat() / maxPriceValue) * 100f
} }
if (SeekBarRightValue > 100f) SeekBarRightValue = 100f if (SeekBarRightValue > 100f) SeekBarRightValue = 100f
contentView.tv_start_end_price.text = "$min_Price-$max_Price" if (max_Price == infiniteText) {
contentView.tv_start_end_price.text = "$min_Price-$max_Price"
} else {
contentView.tv_start_end_price.text = "$min_Price-$max_Price" + "元"
}
contentView.range_price_seekbar.setProgress(SeekBarLeftValue, SeekBarRightValue) contentView.range_price_seekbar.setProgress(SeekBarLeftValue, SeekBarRightValue)
} else { } else {
...@@ -121,6 +125,8 @@ class PricePopupWindow( ...@@ -121,6 +125,8 @@ class PricePopupWindow(
private fun reset() { private fun reset() {
tempFilter.priceRangesView = null tempFilter.priceRangesView = null
tempFilter.priceRanges = null tempFilter.priceRanges = null
min_Price = ""
max_Price = ""
contentView?.tv_start_end_price?.text = "0-无限" contentView?.tv_start_end_price?.text = "0-无限"
for (v in priceRangeViews) { for (v in priceRangeViews) {
v.isSelected = false v.isSelected = false
...@@ -161,8 +167,6 @@ class PricePopupWindow( ...@@ -161,8 +167,6 @@ class PricePopupWindow(
textView.setSingleLine(false) textView.setSingleLine(false)
textView.setLineSpacing(1.0f, 1.2f) textView.setLineSpacing(1.0f, 1.2f)
priceRangeViews.add(textView) priceRangeViews.add(textView)
if (priceRangesItem == tempFilter.priceRanges) { if (priceRangesItem == tempFilter.priceRanges) {
textView.isSelected = true textView.isSelected = true
textView.background = context.getDrawable(R.drawable.consult_price_expert_selected) textView.background = context.getDrawable(R.drawable.consult_price_expert_selected)
...@@ -207,15 +211,18 @@ class PricePopupWindow( ...@@ -207,15 +211,18 @@ class PricePopupWindow(
max_Price = infiniteText max_Price = infiniteText
SeekBarRightValue = 100f SeekBarRightValue = 100f
} else { } else {
max_Price = priceRangesItem.max_price.toString() + "元" max_Price = priceRangesItem.max_price.toString()
SeekBarRightValue = SeekBarRightValue =
(priceRangesItem.max_price.toString().toFloat() / maxPriceValue) * 100f (priceRangesItem.max_price.toString().toFloat() / maxPriceValue) * 100f
} }
if (SeekBarRightValue > 100f) SeekBarRightValue = 100f if (SeekBarRightValue > 100f) SeekBarRightValue = 100f
contentView.range_price_seekbar.setProgress(SeekBarLeftValue, SeekBarRightValue) contentView.range_price_seekbar.setProgress(SeekBarLeftValue, SeekBarRightValue)
contentView.tv_start_end_price.text = "$min_Price-$max_Price" if (max_Price == infiniteText) {
contentView.tv_start_end_price.text = "$min_Price-$max_Price"
} else {
contentView.tv_start_end_price.text = "$min_Price-$max_Price" + "元"
}
} }
} }
contentView.flPriceRangeView.addView(textView) contentView.flPriceRangeView.addView(textView)
} }
......
...@@ -270,10 +270,17 @@ open class HomeBaseImpl : IHomeBaseEvent { ...@@ -270,10 +270,17 @@ open class HomeBaseImpl : IHomeBaseEvent {
EventBus.getDefault().post(HomeModuleTabEvent(2)) EventBus.getDefault().post(HomeModuleTabEvent(2))
} else if (data.goType.equals("h5")) { } else if (data.goType.equals("h5")) {
NewH5Activity.start(mContext, H5Params(data.goUrl.toString(), "")) NewH5Activity.start(mContext, H5Params(data.goUrl.toString(), ""))
} else if (data.goType.equals("special_categories")) {
ARouter.getInstance().build("/consult/list")
.withString(IYDLRouterConstant.EXTRA_CATEID, "0")
.withInt(IYDLRouterConstant.EXTRA_SHOWTYPE, 0)
.withString(IYDLRouterConstant.EXTRA_CATETITLE, data.title)
.withSerializable(IYDLRouterConstant.GO_CRITERIA, data.goCriteriaMap)
.navigation()
} else { } else {
ARouter.getInstance().build("/consult/list") ARouter.getInstance().build("/consult/list")
.withString(IYDLRouterConstant.EXTRA_CATEID, data.id) .withString(IYDLRouterConstant.EXTRA_CATEID, data.id)
.withString(IYDLRouterConstant.EXTRA_SHOWTYPE, "0") .withInt(IYDLRouterConstant.EXTRA_SHOWTYPE, 0)
.withString(IYDLRouterConstant.EXTRA_CATETITLE, data.title) .withString(IYDLRouterConstant.EXTRA_CATETITLE, data.title)
.withSerializable(IYDLRouterConstant.GO_CRITERIA, data.goCriteriaMap) .withSerializable(IYDLRouterConstant.GO_CRITERIA, data.goCriteriaMap)
.navigation() .navigation()
......
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