Commit 56fed7ff by 霍志良

feat:UI修改BUG修改

parent f1271f4c
......@@ -20,8 +20,8 @@ import java.util.List;
*/
public final class DemoGlobalConfig implements IConfigModule {
String APP_DOMAIN = "https://api.github.com/";
// public static String appEnv = YDLConstants.ENV_TEST;
public static String appEnv = YDLConstants.ENV_PROD;
public static String appEnv = YDLConstants.ENV_TEST;
// public static String appEnv = YDLConstants.ENV_PROD;
// public static String appEnv = YDLConstants.ENV_NEW_TEST;//配置未上传到maven库
@Override
......
......@@ -128,6 +128,7 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
const val EXTRA_CATEGORY_NAME = "category_name"
const val EXTRA_SHOW_TYPE = "showType"
const val EXTRA_FROM_PAGE = "fromPage"
const val CATEID3IN = "cateid3in"
const val HOT_SEARCH_DOCTOR_NAME = "hot_search_doctor_name"
private const val EXTRA_IS_SHOW_HOT = "isInitShowHot"
private const val EXTRA_SEARCH_WORD = "searchWord"
......@@ -414,7 +415,7 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
mapFilter = mIntent.getSerializableExtra(GO_CRITERIA) as HashMap<String, Any>
}
initCategory = mIntent.getStringExtra("cateId") ?: ""
initCategoryCateid3 = mIntent.getStringExtra("cateid3in") ?: ""
initCategoryCateid3 = mIntent.getStringExtra(CATEID3IN) ?: ""
if (!TextUtils.isEmpty(initCategoryCateid3) && initCategoryCateid3 != "0") {
allFilter.categoryId3List.add(initCategoryCateid3)
}
......@@ -1694,6 +1695,7 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
* 新增逻辑:当主题选择后,需要判断热门筛选中是否也有该主题,如果有,也需要同步更新选中状态
*/
override fun onCategoriesSelected(signLit: ArrayList<String>) {
eightcategoryPopup.dismiss()
if (signLit.isNotEmpty()) {
val sign1 = signLit.joinToString(",") { it }
ActionCountUtils.baiDuCountSign3(
......
......@@ -127,6 +127,9 @@ class ExpertSearchPresenter : SimplePresenter<IExpertSearchView>() {
}
if (allFilter.sub.code != null&&allFilter.sub.code!=allFilter.region.code) {
filterMap["city_code"] = allFilter.sub.code
if (allFilter.sub.provinceCode.isNotEmpty()) {
filterMap["province_code"] = allFilter.sub.provinceCode
}
}
}
// 咨询方式
......
......@@ -15,5 +15,6 @@ data class SubItem(
@field:SerializedName("code")
var code: String? = null,
var locationCode: String? = ""
var locationCode: String? = "",
var provinceCode: String = ""
) : Parcelable
\ No newline at end of file
......@@ -140,6 +140,9 @@ class AreaPopupWindow(
//倒序保留最近五次的搜索历史记录并去重
private fun saveCitySearchRecord(data: SubItem) {
if (data.value == "不限") return
if (selectedRegion.code.toString() != "0") data.provinceCode =
selectedRegion.code.toString()
recentCityBean?.let {
if (it.recentCity.size < 5) {
it.recentCity.add(0, data)
......
......@@ -28,8 +28,7 @@ import kotlinx.android.synthetic.main.consultant_ui_price_popup_window.view.*
/**
* 排序弹窗
* Created by zqk on 17-9-15.
* 价格筛选弹窗
*/
class PricePopupWindow(
val context: Context,
......
......@@ -13,6 +13,7 @@ import com.alibaba.android.arouter.launcher.ARouter
import com.ydl.ydlcommon.base.BaseActivity
import com.ydl.ydlcommon.router.IYDLRouterConstant
import com.yidianling.common.tools.RxImageTool
import com.yidianling.consultant.ExpertSearchActivity
import com.yidianling.consultant.R
import com.yidianling.consultant.adapter.CategoryDetailAdapter
import com.yidianling.consultant.adapter.EightCategoryAdapter
......@@ -233,31 +234,36 @@ class EightCategoryView : LinearLayout, CategoryDetailAdapter.OutAdapterClicklis
signList.remove(mutableList?.get(outPosition)?.get(inPosition)?.cate_name)
}
}
mutableList?.forEachIndexed { index, mutableList ->
eightCategoryListBean.get(index).hasData = false
mutableList.forEachIndexed { indexin, childrenBean ->
if (childrenBean.isSelected) {
eightCategoryListBean.get(index).hasData = true
return@forEachIndexed
}
}
}
leftHasData()
eightCategoryAdapter.notifyDataSetChanged()
categoryRightAdapter.notifyDataSetChanged()
} else {
//单选跳转咨询列表页
ARouter.getInstance().build("/consult/list")
.withInt(IYDLRouterConstant.EXTRA_SHOWTYPE, 0)
.withString("cateid3in", mutableList?.get(outPosition)?.get(inPosition)?.cate_id)
.withString(
ExpertSearchActivity.CATEID3IN,
mutableList?.get(outPosition)?.get(inPosition)?.cate_id
)
.withString(
IYDLRouterConstant.EXTRA_CATETITLE,
mutableList?.get(outPosition)?.get(inPosition)?.cate_name
)
.navigation()
(context as BaseActivity).finish()
}
}
private fun leftHasData() {
mutableList?.forEachIndexed { index, mutableList ->
eightCategoryListBean.get(index).hasData = false
mutableList.forEachIndexed { indexin, childrenBean ->
if (childrenBean.isSelected) {
eightCategoryListBean.get(index).hasData = true
return@leftHasData
}
}
}
}
override fun onLeftClick(leftPosition: Int) {
......
......@@ -9,9 +9,9 @@
android:background="@drawable/consult_price_expert_unseleted"
android:gravity="center"
android:minHeight="@dimen/platform_dp_40"
android:paddingStart="@dimen/platform_dp_18"
android:paddingStart="@dimen/platform_dp_15"
android:paddingTop="@dimen/platform_dp_6"
android:paddingRight="@dimen/platform_dp_18"
android:paddingRight="@dimen/platform_dp_15"
android:paddingBottom="@dimen/platform_dp_6"
android:textColor="@color/platform_color_333333"
android:textSize="@dimen/platform_sp_12"
......
......@@ -165,6 +165,7 @@
android:layout_width="45dp"
android:layout_height="@dimen/platform_dp_22"
android:visibility="visible"
android:layout_marginStart="@dimen/platform_dp_8"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
......
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