Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YDL-Component-Medical
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨凯
YDL-Component-Medical
Commits
44c7d0a2
Commit
44c7d0a2
authored
Apr 13, 2020
by
ydl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复导医和增加心理咨询华为渠道的判断
parent
868c667b
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
227 additions
and
34 deletions
+227
-34
config.gradle
config.gradle
+2
-2
ExpertSearchFragment.kt
m-consultant/src/main/java/com/yidianling/consultant/ExpertSearchFragment.kt
+5
-1
YdlHomeFragment.kt
m-home/src/xlzx/java/com/yidianling/home/ui/fragment/YdlHomeFragment.kt
+18
-0
HomeButtonBannerView.kt
m-home/src/xlzx/java/com/yidianling/home/ui/view/HomeButtonBannerView.kt
+33
-26
home_button_banner_view.xml
m-home/src/xlzx/res/layout/home_button_banner_view.xml
+5
-5
home_button_banner_view_huawei.xml
m-home/src/xlzx/res/layout/home_button_banner_view_huawei.xml
+149
-0
YdlHomeFragment.kt
m-home/src/ydl/java/com/yidianling/home/ui/fragment/YdlHomeFragment.kt
+15
-0
No files found.
config.gradle
View file @
44c7d0a2
...
...
@@ -43,10 +43,10 @@ ext {
// -------------- 业务模块 --------------
//第三步 若干
"m-confide"
:
"0.0.48.12"
,
"m-consultant"
:
"0.0.59.
5
"
,
"m-consultant"
:
"0.0.59.
6
"
,
"m-fm"
:
"0.0.29.3"
,
"m-user"
:
"0.0.60.4"
,
"m-home"
:
"0.0.21.
6
"
,
"m-home"
:
"0.0.21.
9
"
,
"m-im"
:
"0.0.18.0"
,
"m-dynamic"
:
"0.0.7.5"
,
...
...
m-consultant/src/main/java/com/yidianling/consultant/ExpertSearchFragment.kt
View file @
44c7d0a2
...
...
@@ -307,10 +307,14 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
override
fun
setUserVisibleHint
(
isVisibleToUser
:
Boolean
)
{
super
.
setUserVisibleHint
(
isVisibleToUser
)
if
(
isVisibleToUser
&&
isResumed
)
{
showConsultAssistantDialog
()
}
else
{
hideConsultAssistantDialog
()
}
if
(
isVisibleToUser
&&
isResumed
)
{
onResume
()
}
}
private
fun
showConsultAssistantDialog
()
{
...
...
m-home/src/xlzx/java/com/yidianling/home/ui/fragment/YdlHomeFragment.kt
View file @
44c7d0a2
...
...
@@ -387,10 +387,24 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
override
fun
setUserVisibleHint
(
isVisibleToUser
:
Boolean
)
{
super
.
setUserVisibleHint
(
isVisibleToUser
)
if
(
isVisibleToUser
&&
isResumed
)
{
showConsultAssistantDialog
()
}
else
{
hideConsultAssistantDialog
()
}
if
(
isVisibleToUser
&&
isResumed
)
{
onResume
()
}
}
private
fun
showConsultAssistantDialog
()
{
ModularServiceManager
.
provide
(
IConsultantService
::
class
.
java
)
.
showConsultAssistantDialog
(
activity
)
}
private
fun
hideConsultAssistantDialog
()
{
ModularServiceManager
.
provide
(
IConsultantService
::
class
.
java
).
hideConsultAssistantDialog
()
}
override
fun
onResume
()
{
super
.
onResume
()
if
(
userVisibleHint
)
{
...
...
@@ -404,6 +418,9 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
}
mPresenter
?.
prepareCoupon
(
activity
)
//走咨询助理浮层展示逻辑,是否展示由内部条件与接口判断
showConsultAssistantDialog
()
}
}
}
\ No newline at end of file
m-home/src/xlzx/java/com/yidianling/home/ui/view/HomeButtonBannerView.kt
View file @
44c7d0a2
...
...
@@ -6,14 +6,13 @@ import android.support.v7.widget.RecyclerView
import
android.text.TextUtils
import
android.view.View
import
android.view.ViewGroup
import
android.widget.FrameLayout
import
android.widget.LinearLayout
import
android.widget.*
import
com.ydl.ydlcommon.data.PlatformDataManager
import
com.yidianling.common.tools.RxImageTool
import
com.yidianling.home.R
import
com.yidianling.home.event.IHomeBaseEvent
import
com.yidianling.home.model.bean.HomeHeaderBean
import
kotlinx.android.synthetic.xlzx.home_button_banner_view.view.*
import
com.yidianling.home.ui.widget.HomeModuleCategoryView
/**
* @author <a href="https://www.jianshu.com/u/c1e5310dd724">xujian</a>
...
...
@@ -38,6 +37,8 @@ class HomeButtonBannerView(private val mContext: Context, private var homeEvent:
*/
var
hasRealTestView
:
Boolean
=
false
var
mView
:
View
?
=
null
private
var
realTestView
:
HomePagerBannerRealView
?
=
null
/**
* 线
...
...
@@ -55,42 +56,48 @@ class HomeButtonBannerView(private val mContext: Context, private var homeEvent:
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
)
layoutParams
=
params
View
.
inflate
(
mContext
,
R
.
layout
.
home_button_banner_view
,
this
)
val
ffrom
=
PlatformDataManager
.
getRam
().
getChannelName
()
if
(!
TextUtils
.
isEmpty
(
ffrom
)
&&
ffrom
.
endsWith
(
"huawei"
))
{
mView
=
View
.
inflate
(
mContext
,
R
.
layout
.
home_button_banner_view_huawei
,
this
)
}
else
{
mView
=
View
.
inflate
(
mContext
,
R
.
layout
.
home_button_banner_view
,
this
)
}
// initButtonView()
val
ffrom
=
PlatformDataManager
.
getRam
().
getChannelName
()
if
(!
TextUtils
.
isEmpty
(
ffrom
)
&&
ffrom
.
endsWith
(
"huawei"
))
{
homeModuleButtonBannerFirst
.
background
=
mView
!!
.
findViewById
<
ImageView
>(
R
.
id
.
homeModuleButtonBannerFirst
)
.
background
=
resources
.
getDrawable
(
R
.
drawable
.
home_dcotor_bt_bg_huawei
)
homeModuleButtonBannerSecond
.
background
=
mView
!!
.
findViewById
<
ImageView
>(
R
.
id
.
homeModuleButtonBannerSecond
)
.
background
=
resources
.
getDrawable
(
R
.
drawable
.
home_test_bt_bg_hauwei
)
homeModuleButtonBannerThird
.
background
=
mView
!!
.
findViewById
<
ImageView
>(
R
.
id
.
homeModuleButtonBannerThird
)
.
background
=
resources
.
getDrawable
(
R
.
drawable
.
home_course_bt_bg_huawei
)
homeModuleButtonBannerFourth
.
background
=
mView
!!
.
findViewById
<
ImageView
>(
R
.
id
.
homeModuleButtonBannerFourth
)
.
background
=
resources
.
getDrawable
(
R
.
drawable
.
home_listen_bt_bg_huawei
)
homeModuleButtonBannerFirstTitle
.
setTextColor
(
Color
.
WHITE
)
tv_first_text
.
setTextColor
(
Color
.
WHITE
)
homeModuleButtonBannerFourthTitle
.
setTextColor
(
Color
.
WHITE
)
tv_second_text
.
setTextColor
(
Color
.
WHITE
)
homeModuleButtonBannerThirdTitle
.
setTextColor
(
Color
.
WHITE
)
tv_third_text
.
setTextColor
(
Color
.
WHITE
)
homeModuleButtonBannerSecondTitle
.
setTextColor
(
Color
.
WHITE
)
tv_fourth_text
.
setTextColor
(
Color
.
WHITE
)
mView
!!
.
findViewById
<
TextView
>(
R
.
id
.
homeModuleButtonBannerFirstTitle
)
.
setTextColor
(
Color
.
WHITE
)
mView
!!
.
findViewById
<
TextView
>(
R
.
id
.
tv_first_text
)
.
setTextColor
(
Color
.
WHITE
)
mView
!!
.
findViewById
<
TextView
>(
R
.
id
.
homeModuleButtonBannerFourthTitle
)
.
setTextColor
(
Color
.
WHITE
)
mView
!!
.
findViewById
<
TextView
>(
R
.
id
.
tv_second_text
)
.
setTextColor
(
Color
.
WHITE
)
mView
!!
.
findViewById
<
TextView
>(
R
.
id
.
homeModuleButtonBannerThirdTitle
)
.
setTextColor
(
Color
.
WHITE
)
mView
!!
.
findViewById
<
TextView
>(
R
.
id
.
tv_third_text
)
.
setTextColor
(
Color
.
WHITE
)
mView
!!
.
findViewById
<
TextView
>(
R
.
id
.
homeModuleButtonBannerSecondTitle
)
.
setTextColor
(
Color
.
WHITE
)
mView
!!
.
findViewById
<
TextView
>(
R
.
id
.
tv_fourth_text
)
.
setTextColor
(
Color
.
WHITE
)
}
homeModuleButtonBannerFirst
.
setOnClickListener
{
mView
!!
.
findViewById
<
RelativeLayout
>(
R
.
id
.
homeModuleButtonBannerFirst
)
.
setOnClickListener
{
homeEvent
?.
reservationExpertsClick
()
}
homeModuleButtonBannerSecond
.
setOnClickListener
{
mView
!!
.
findViewById
<
RelativeLayout
>(
R
.
id
.
homeModuleButtonBannerSecond
)
.
setOnClickListener
{
homeEvent
?.
nowConfideClick
()
}
homeModuleButtonBannerThird
.
setOnClickListener
{
mView
!!
.
findViewById
<
RelativeLayout
>(
R
.
id
.
homeModuleButtonBannerThird
)
.
setOnClickListener
{
homeEvent
?.
psychologyClassClick
()
}
homeModuleButtonBannerFourth
.
setOnClickListener
{
mView
!!
.
findViewById
<
RelativeLayout
>(
R
.
id
.
homeModuleButtonBannerFourth
)
.
setOnClickListener
{
homeEvent
?.
psychologyTestClick
()
}
}
...
...
@@ -101,8 +108,8 @@ class HomeButtonBannerView(private val mContext: Context, private var homeEvent:
homeCategory
:
List
<
HomeHeaderBean
.
AskCategoryDataBean
>?
)
{
setRealTextView
(
homeSaleData
)
homeEvent
?.
let
{
home_category_view
.
setEvent
(
it
)
};
home_category_view
.
initData
(
homeCategory
)
homeEvent
?.
let
{
mView
!!
.
findViewById
<
HomeModuleCategoryView
>(
R
.
id
.
home_category_view
)
.
setEvent
(
it
)
};
mView
!!
.
findViewById
<
HomeModuleCategoryView
>(
R
.
id
.
home_category_view
)
.
initData
(
homeCategory
)
}
/**
...
...
@@ -137,9 +144,9 @@ class HomeButtonBannerView(private val mContext: Context, private var homeEvent:
private
fun
setRealTextView
(
list
:
List
<
HomeHeaderBean
.
HomeSaleDataBean
>?)
{
if
(!
hasRealTestView
)
{
initLineView
()
ll_home_module_button
.
addView
(
lineView
)
mView
!!
.
findViewById
<
LinearLayout
>(
R
.
id
.
ll_home_module_button
)
.
addView
(
lineView
)
initRealTextView
()
ll_home_module_button
.
addView
(
realTestView
)
mView
!!
.
findViewById
<
LinearLayout
>(
R
.
id
.
ll_home_module_button
)
.
addView
(
realTestView
)
val
cutOffParams
=
FrameLayout
.
LayoutParams
(
ViewGroup
.
LayoutParams
.
MATCH_PARENT
,
...
...
@@ -150,7 +157,7 @@ class HomeButtonBannerView(private val mContext: Context, private var homeEvent:
cutOffView
.
setBackgroundColor
(
resources
.
getColor
(
R
.
color
.
home_colorBg
))
cutOffView
.
layoutParams
=
cutOffParams
ll_home_module_button
.
addView
(
cutOffView
)
mView
!!
.
findViewById
<
LinearLayout
>(
R
.
id
.
ll_home_module_button
)
.
addView
(
cutOffView
)
hasRealTestView
=
true
}
...
...
m-home/src/xlzx/res/layout/home_button_banner_view.xml
View file @
44c7d0a2
...
...
@@ -5,6 +5,11 @@
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
<com.yidianling.home.ui.widget.HomeModuleCategoryView
android:id=
"@+id/home_category_view"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
...
...
@@ -141,9 +146,4 @@
</LinearLayout>
<com.yidianling.home.ui.widget.HomeModuleCategoryView
android:id=
"@+id/home_category_view"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
</LinearLayout>
m-home/src/xlzx/res/layout/home_button_banner_view_huawei.xml
0 → 100644
View file @
44c7d0a2
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:id=
"@+id/ll_home_module_button"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"15dp"
android:layout_marginTop=
"8dp"
android:layout_marginRight=
"15dp"
android:gravity=
"center_horizontal"
android:paddingBottom=
"12dp"
android:orientation=
"horizontal"
>
<RelativeLayout
android:id=
"@+id/homeModuleButtonBannerFirst"
android:layout_width=
"0dp"
android:layout_height=
"78dp"
android:layout_marginEnd=
"8dp"
android:layout_marginRight=
"8dp"
android:layout_weight=
"1"
android:background=
"@drawable/home_dcotor_bt_bg"
android:gravity=
"center_horizontal"
>
<TextView
android:id=
"@+id/homeModuleButtonBannerFirstTitle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"7dp"
android:text=
"预约咨询"
android:textColor=
"@color/platform_black"
android:textSize=
"@dimen/platform_dp_16"
android:textStyle=
"bold"
/>
<TextView
android:id=
"@+id/tv_first_text"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@+id/homeModuleButtonBannerFirstTitle"
android:text=
"1W+师资"
android:textColor=
"@color/platform_color_444444"
android:textSize=
"@dimen/platform_dp_11"
/>
</RelativeLayout>
<RelativeLayout
android:id=
"@+id/homeModuleButtonBannerFourth"
android:layout_width=
"0dp"
android:layout_height=
"78dp"
android:layout_marginEnd=
"8dp"
android:layout_marginRight=
"8dp"
android:layout_weight=
"1"
android:background=
"@drawable/home_listen_bt_bg"
android:gravity=
"center_horizontal"
>
<TextView
android:id=
"@+id/homeModuleButtonBannerFourthTitle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"7dp"
android:text=
"心理测试"
android:textColor=
"@color/platform_black"
android:textSize=
"@dimen/platform_dp_16"
android:textStyle=
"bold"
/>
<TextView
android:id=
"@+id/tv_second_text"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@+id/homeModuleButtonBannerFourthTitle"
android:text=
"专业权威"
android:textColor=
"@color/platform_color_444444"
android:textSize=
"@dimen/platform_dp_11"
/>
</RelativeLayout>
<RelativeLayout
android:id=
"@+id/homeModuleButtonBannerThird"
android:layout_width=
"0dp"
android:layout_height=
"78dp"
android:layout_marginEnd=
"8dp"
android:layout_marginRight=
"8dp"
android:layout_weight=
"1"
android:background=
"@drawable/home_course_bt_bg"
android:gravity=
"center_horizontal"
android:orientation=
"vertical"
>
<TextView
android:id=
"@+id/homeModuleButtonBannerThirdTitle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"7dp"
android:text=
"心理课堂"
android:textColor=
"@color/platform_black"
android:textSize=
"@dimen/platform_dp_16"
android:textStyle=
"bold"
/>
<TextView
android:id=
"@+id/tv_third_text"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@+id/homeModuleButtonBannerThirdTitle"
android:text=
"学习与成长"
android:textColor=
"@color/platform_color_444444"
android:textSize=
"@dimen/platform_dp_11"
/>
</RelativeLayout>
<RelativeLayout
android:id=
"@+id/homeModuleButtonBannerSecond"
android:layout_width=
"0dp"
android:layout_height=
"78dp"
android:layout_weight=
"1"
android:background=
"@drawable/home_test_bt_bg"
android:gravity=
"center_horizontal"
>
<TextView
android:id=
"@+id/homeModuleButtonBannerSecondTitle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:layout_marginTop=
"7dp"
android:text=
"即时倾诉"
android:textColor=
"@color/platform_black"
android:textSize=
"@dimen/platform_dp_16"
android:textStyle=
"bold"
/>
<TextView
android:id=
"@+id/tv_fourth_text"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@+id/homeModuleButtonBannerSecondTitle"
android:layout_centerVertical=
"true"
android:text=
"专业解忧"
android:textColor=
"@color/platform_color_444444"
android:textSize=
"@dimen/platform_dp_11"
/>
</RelativeLayout>
</LinearLayout>
<com.yidianling.home.ui.widget.HomeModuleCategoryView
android:id=
"@+id/home_category_view"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
</LinearLayout>
m-home/src/ydl/java/com/yidianling/home/ui/fragment/YdlHomeFragment.kt
View file @
44c7d0a2
...
...
@@ -404,10 +404,23 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
override
fun
setUserVisibleHint
(
isVisibleToUser
:
Boolean
)
{
super
.
setUserVisibleHint
(
isVisibleToUser
)
if
(
isVisibleToUser
&&
isResumed
)
{
showConsultAssistantDialog
()
}
else
{
hideConsultAssistantDialog
()
}
if
(
isVisibleToUser
&&
isResumed
)
{
onResume
()
}
}
private
fun
showConsultAssistantDialog
()
{
ModularServiceManager
.
provide
(
IConsultantService
::
class
.
java
).
showConsultAssistantDialog
(
activity
)
}
private
fun
hideConsultAssistantDialog
()
{
ModularServiceManager
.
provide
(
IConsultantService
::
class
.
java
).
hideConsultAssistantDialog
()
}
override
fun
onResume
()
{
super
.
onResume
()
if
(
userVisibleHint
)
{
...
...
@@ -420,6 +433,8 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
mPresenter
?.
getConsultData
(
consultLastSelectType
,
consultLastSelectPosition
)
mPresenter
?.
getConfideData
(
confideLastSelectType
,
confideLastSelectPosition
)
}
showConsultAssistantDialog
()
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment