Commit b1fbfa5c by 霍志良

feat:BUG修改

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