Commit f6ba7ed2 by 徐健

同步心理咨询首页

parent 2aafb11b
...@@ -44,7 +44,7 @@ ext { ...@@ -44,7 +44,7 @@ ext {
//第三步 若干 //第三步 若干
"m-confide" : "0.0.41.2", "m-confide" : "0.0.41.2",
"m-consultant" : "0.0.51.4", "m-consultant" : "0.0.51.5",
"m-fm" : "0.0.23.4", "m-fm" : "0.0.23.4",
"m-user" : "0.0.41.1", "m-user" : "0.0.41.1",
"m-home" : "0.0.6.20", "m-home" : "0.0.6.20",
...@@ -52,7 +52,7 @@ ext { ...@@ -52,7 +52,7 @@ ext {
"m-muse" : "0.0.20.4", "m-muse" : "0.0.20.4",
"m-tests" : "0.0.15.3", "m-tests" : "0.0.15.3",
"m-course" : "0.0.34.4", "m-course" : "0.0.34.4",
"m-im" : "0.0.3.3", "m-im" : "0.0.3.5",
"m-dynamic" : "0.0.1.2", "m-dynamic" : "0.0.1.2",
...@@ -66,7 +66,7 @@ ext { ...@@ -66,7 +66,7 @@ ext {
"m-tests-api" : "0.0.1", "m-tests-api" : "0.0.1",
"m-user-api" : "0.0.9", "m-user-api" : "0.0.9",
"m-home-api" : "0.0.3", "m-home-api" : "0.0.3",
"m-im-api" : "0.0.4", "m-im-api" : "0.0.5",
"m-dynamic-api" : "0.0.1", "m-dynamic-api" : "0.0.1",
//-------------- 功能组件 -------------- //-------------- 功能组件 --------------
...@@ -74,7 +74,7 @@ ext { ...@@ -74,7 +74,7 @@ ext {
"ydl-platform" : "0.0.29.3", "ydl-platform" : "0.0.29.3",
//第二步 若干 //第二步 若干
"ydl-webview" : "0.0.28.9", "ydl-webview" : "0.0.28.11",
"ydl-media" : "0.0.14.4", "ydl-media" : "0.0.14.4",
"ydl-pay" : "0.0.11.5", "ydl-pay" : "0.0.11.5",
"m-audioim" : "0.0.40.4", "m-audioim" : "0.0.40.4",
...@@ -111,7 +111,7 @@ ext { ...@@ -111,7 +111,7 @@ ext {
"m-tests-api" : "0.0.1", "m-tests-api" : "0.0.1",
"m-user-api" : "0.0.9", "m-user-api" : "0.0.9",
"m-home-api" : "0.0.3", "m-home-api" : "0.0.3",
"m-im-api" : "0.0.4", "m-im-api" : "0.0.5",
"m-dynamic-api" : "0.0.1", "m-dynamic-api" : "0.0.1",
//-------------- 功能组件 -------------- //-------------- 功能组件 --------------
...@@ -119,7 +119,7 @@ ext { ...@@ -119,7 +119,7 @@ ext {
"ydl-platform" : "0.0.29.3", "ydl-platform" : "0.0.29.3",
//第二步 若干 //第二步 若干
"ydl-webview" : "0.0.28.6", "ydl-webview" : "0.0.28.9",
"ydl-media" : "0.0.14.4", "ydl-media" : "0.0.14.4",
"ydl-pay" : "0.0.11.5", "ydl-pay" : "0.0.11.5",
"m-audioim" : "0.0.40.4", "m-audioim" : "0.0.40.4",
......
...@@ -63,10 +63,12 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>() ...@@ -63,10 +63,12 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
* tablayou上次选中的tab下标 * tablayou上次选中的tab下标
*/ */
private var confideLastSelectPosition = 0 private var confideLastSelectPosition = 0
private var confideLastSelectType = ""
/** /**
* 咨询tablayout上次选中的西边 * 咨询tablayout上次选中的西边
*/ */
private var consultLastSelectPosition = 0 private var consultLastSelectPosition = 0
private var consultLastSelectType= ""
/** /**
* 悬浮tablayout监听事件 * 悬浮tablayout监听事件
*/ */
...@@ -177,11 +179,13 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>() ...@@ -177,11 +179,13 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
*/ */
override fun getConfideData(type: String, selectPosition: Int) { override fun getConfideData(type: String, selectPosition: Int) {
confideLastSelectPosition = selectPosition confideLastSelectPosition = selectPosition
confideLastSelectType = type
mPresenter?.getConfideData(type, selectPosition) mPresenter?.getConfideData(type, selectPosition)
} }
override fun getConsultData(type: String, selectPosition: Int) { override fun getConsultData(type: String, selectPosition: Int) {
consultLastSelectPosition = selectPosition consultLastSelectPosition = selectPosition
consultLastSelectType = type
mPresenter?.getConsultData(type, selectPosition) mPresenter?.getConsultData(type, selectPosition)
} }
...@@ -261,6 +265,13 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>() ...@@ -261,6 +265,13 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
//每次全局更新后重置下标位 //每次全局更新后重置下标位
confideLastSelectPosition = 0 confideLastSelectPosition = 0
consultLastSelectPosition = 0 consultLastSelectPosition = 0
for (bean in list) {
//咨询模块
if (bean.type == YdlHomeViewHolderConstract.BUTTON_BANNER_VIEW) {
consultLastSelectType = bean.headerBean!!.consultCategoryData!![0].id.toString()
}
}
} }
private fun initHeader(list: MutableList<HomePagerDataBean>) { private fun initHeader(list: MutableList<HomePagerDataBean>) {
...@@ -388,7 +399,10 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>() ...@@ -388,7 +399,10 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
override fun onResume() { override fun onResume() {
super.onResume() super.onResume()
if (userVisibleHint) { if (userVisibleHint) {
mPresenter?.loadHomeData()
mPresenter?.getConsultData(consultLastSelectType, consultLastSelectPosition)
mPresenter?.getConfideData(confideLastSelectType, confideLastSelectPosition)
mPresenter?.prepareCoupon(activity) mPresenter?.prepareCoupon(activity)
//走咨询助理浮层展示逻辑,是否展示由内部条件与接口判断 //走咨询助理浮层展示逻辑,是否展示由内部条件与接口判断
......
...@@ -294,7 +294,7 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>() ...@@ -294,7 +294,7 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
consultLastSelectPosition = 0 consultLastSelectPosition = 0
//初始化fragment中的tablayout布局,悬停效果使用 //初始化fragment中的tablayout布局,悬停效果使用
for (bean in list) { for (bean in list) {
//倾述模块 //咨询模块
if (bean.type == YdlHomeViewHolderConstract.PAGER_BANNER_VIEW) { if (bean.type == YdlHomeViewHolderConstract.PAGER_BANNER_VIEW) {
initTabLayout(bean.headerBean!!.listenCategoryDate) initTabLayout(bean.headerBean!!.listenCategoryDate)
initConsultTabLayout(bean.headerBean!!.consultCategoryData) initConsultTabLayout(bean.headerBean!!.consultCategoryData)
......
...@@ -24,7 +24,7 @@ modular { ...@@ -24,7 +24,7 @@ modular {
groupId = "com.ydl" groupId = "com.ydl"
artifactId = "m-im-api" artifactId = "m-im-api"
//开发时注释掉版本号,发布api时打开 //开发时注释掉版本号,发布api时打开
// version = rootProject.ext.ydlPublishVersion[childProject.getName()+"-api"] version = rootProject.ext.ydlPublishVersion[childProject.getName()+"-api"]
// API 层打包时需要引入的依赖 // API 层打包时需要引入的依赖
apiDependencies { apiDependencies {
implementation "com.google.code.gson:gson:2.8.2" implementation "com.google.code.gson:gson:2.8.2"
......
...@@ -58,7 +58,7 @@ public class MsgReceiveHelper { ...@@ -58,7 +58,7 @@ public class MsgReceiveHelper {
int sum = 0; int sum = 0;
for (int i=0;i<list.length;i++) { for (int i=0;i<list.length;i++) {
try { try {
sum += Integer.parseInt(list[0].toString()); sum += Integer.parseInt(list[i].toString());
}catch (Exception e) { }catch (Exception e) {
sum += 0; sum += 0;
} }
......
...@@ -45,8 +45,13 @@ class MoreClickView @JvmOverloads constructor(private val mContext: Context, att ...@@ -45,8 +45,13 @@ class MoreClickView @JvmOverloads constructor(private val mContext: Context, att
msg_new.setVisibility(View.INVISIBLE) msg_new.setVisibility(View.INVISIBLE)
}*/ }*/
un_read_num.text = ModularServiceManager.provide(IImService::class.java).getAllUnReadNum().toString() var unreadNum = ModularServiceManager.provide(IImService::class.java).getAllUnReadNum()
if (unreadNum <= 0) {
un_read_num.visibility = View.GONE
}
else {
un_read_num.text = unreadNum.toString()
}
} }
......
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
android:id="@+id/un_read_num" android:id="@+id/un_read_num"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="14dp" android:layout_height="14dp"
android:minWidth="14dp"
android:textSize="10dp" android:textSize="10dp"
tools:text="10" tools:text="10"
android:textColor="#ffffff" android:textColor="#ffffff"
......
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