Commit 2cc79821 by 霍志良

feat:首页金刚位跳转传递参数

parent 9c5f7d00
......@@ -8,6 +8,7 @@ import android.app.Activity
import android.content.Context
import android.content.Intent
import android.graphics.Typeface
import android.os.Bundle
import android.os.Handler
import android.text.TextUtils
import android.view.View
......@@ -20,6 +21,7 @@ import androidx.core.content.ContextCompat
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
import com.alibaba.android.arouter.facade.annotation.Autowired
import com.alibaba.android.arouter.facade.annotation.Route
import com.alibaba.android.arouter.launcher.ARouter
import com.google.android.material.appbar.AppBarLayout
......@@ -199,7 +201,8 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
private var hasMore = true
private var initCategory = "0"
private var initShowType: Int = 1
private lateinit var mapFilter: HashMap<String, Any>
var mapFilter: Map<String, Any>? = null
private lateinit var doctorAdapter: ExpertSearchAdapter
private lateinit var onScrollListener: EndlessRecyclerViewScrollListener
private var headData: HeadData? = null //筛选数据
......@@ -391,13 +394,7 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
initCategory = mIntent.getStringExtra(EXTRA_CATEGORY) ?: ""
initShowType = mIntent.getIntExtra(EXTRA_SHOW_TYPE, 0)
//首页金刚位传递过来的动态Map参数
val jsonObject: JSONObject = JSONObject(mIntent.getStringExtra(GO_CRITERIA))
mapFilter = HashMap<String, Any>()
val iterator = jsonObject.keys()
while (iterator.hasNext()) {
val key = iterator.next()
mapFilter[key] = jsonObject[key]
}
mapFilter = mIntent.getSerializableExtra(GO_CRITERIA) as HashMap<String, Any>
initCategory = mIntent.getStringExtra("cateId")
cateName = mIntent.getStringExtra("cateTitle")
mSign2 = cateName!!
......
......@@ -8,6 +8,7 @@ import com.ydl.ydlcommon.data.http.RxUtils
import com.ydl.ydlcommon.data.http.ThrowableConsumer
import com.ydl.ydlcommon.modular.ModularServiceManager
import com.ydl.ydlcommon.mvp.base.SimplePresenter
import com.ydl.ydlcommon.utils.AnimUtils
import com.ydl.ydlcommon.utils.RxLifecycleUtils
import com.ydl.ydlcommon.utils.remind.HttpErrorUtils
import com.yidianling.common.tools.RxAppTool
......@@ -63,7 +64,7 @@ class ExpertSearchPresenter : SimplePresenter<IExpertSearchView>() {
}
@SuppressLint("CheckResult")
fun fetchListData(allFilter: AllFilter, extras: Extras?, mapFilter: HashMap<String, Any>?) {
fun fetchListData(allFilter: AllFilter, extras: Extras?, mapFilter: Map<String, Any>?) {
//是否亲子教育字段
// ConsultAssistantDialogUtils.REALATION_EDUCATION = allFilter.categories.size == 1 && allFilter.categories[0].cateId == "23"
......
......@@ -267,34 +267,14 @@ open class HomeBaseImpl : IHomeBaseEvent {
)*/
//因心理咨询迁移新系统,跳转咨询列表页
EventBus.getDefault().post(HomeModuleTabEvent(2))
} else if (data.goType.equals("h5")) {
NewH5Activity.start(mContext, H5Params(data.goUrl.toString(), ""))
} else {
//跳转咨询频道页 服务入口
/* YDLRouterManager.router(
IYDLRouterConstant.ROUTER_CONSULT_LIST,
data.goCriteria?.let {
YDLRouterParams().putExtra(
IYDLRouterConstant.EXTRA_CATEID,
data.id.toString()
).putExtra(
IYDLRouterConstant.EXTRA_CATETITLE, data.title.toString()
).putExtra(
IYDLRouterConstant.GO_CRITERIA, it)
.putExtra(
IYDLRouterConstant.EXTRA_SHOWTYPE, "0"
)
}
)*/
// YDLRouterManager.Companion.router(ROUTER_MUSE_PLAY,
// new YDLRouterParams().putExtra("MEDITATION_ID", String.valueOf(meditationId))
// .putExtra("MEDIA_ID", String.valueOf(mediaId))
// .putExtra("MEDITATION_TYPE", String.valueOf(meditationType))
// .putExtra("MEDIA_COVER_URL", mediaCoverUrl));
ARouter.getInstance().build("/consult/list")
.withString(IYDLRouterConstant.EXTRA_CATEID, data.id)
.withString(IYDLRouterConstant.EXTRA_SHOWTYPE, "0")
.withString(IYDLRouterConstant.EXTRA_CATETITLE, data.title)
.withString(IYDLRouterConstant.GO_CRITERIA, data.goCriteria)
.withSerializable(IYDLRouterConstant.GO_CRITERIA, data.goCriteriaMap)
.navigation()
}
}
......
......@@ -2,6 +2,7 @@ package com.yidianling.home.model.bean
import com.google.gson.annotations.SerializedName
import com.yidianling.consultant.bean.Keyworks
import java.io.Serializable
/**
* Created by haorui on 2019/2/14.
......@@ -68,8 +69,8 @@ class HomeHeaderBean : HomeItemBaseBean {
var icon: String? = "",
var goType: String? = "",
var goUrl: String? = "",
var goCriteria: String? = ""
)
var goCriteriaMap: HashMap<String, Any>? = null
) : Serializable
class AskCategoryDataBean {
/**
......
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