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
fd7f9a0d
Commit
fd7f9a0d
authored
Apr 11, 2022
by
霍志良
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:首页接口增加字段判断免费标签展示
parent
a87a2277
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
38 additions
and
15 deletions
+38
-15
DemoGlobalConfig.java
app/src/main/java/com/ydl/component/base/DemoGlobalConfig.java
+2
-2
config.gradle
config.gradle
+2
-2
home_data.json
m-home/src/main/assets/home_data.json
+1
-0
home_data_xlzx.json
m-home/src/main/assets/home_data_xlzx.json
+6
-3
HomeHeaderBean.kt
m-home/src/main/java/com/yidianling/home/model/bean/HomeHeaderBean.kt
+4
-0
YdlHomeAdapter.kt
m-home/src/ydl/java/com/yidianling/home/adapter/YdlHomeAdapter.kt
+9
-1
HomeButtonBannerView.kt
m-home/src/ydl/java/com/yidianling/home/ui/view/HomeButtonBannerView.kt
+10
-6
home_button_banner_view.xml
m-home/src/ydl/res/layout/home_button_banner_view.xml
+1
-0
DefaultFormatPrinter.java
ydl-net/src/main/java/com/ydl/ydlnet/builder/interceptor/log/DefaultFormatPrinter.java
+3
-1
No files found.
app/src/main/java/com/ydl/component/base/DemoGlobalConfig.java
View file @
fd7f9a0d
...
...
@@ -21,9 +21,9 @@ import java.util.List;
public
final
class
DemoGlobalConfig
implements
IConfigModule
{
String
APP_DOMAIN
=
"https://api.github.com/"
;
// public static String appEnv = YDLConstants.ENV_AUTO_TEST;
//
public static String appEnv = YDLConstants.ENV_TEST;
public
static
String
appEnv
=
YDLConstants
.
ENV_TEST
;
// public static String appEnv = YDLConstants.ENV_NEW_TEST;//配置未上传到maven库
public
static
String
appEnv
=
YDLConstants
.
ENV_PROD
;
//
public static String appEnv = YDLConstants.ENV_PROD;
@Override
public
void
injectAppLifecycle
(
@NotNull
Context
context
,
@NotNull
List
<
IAppLifecycles
>
lifecycles
)
{
lifecycles
.
add
(
new
DemoAppLifecycles
());
...
...
config.gradle
View file @
fd7f9a0d
...
...
@@ -9,7 +9,7 @@ ext {
"m-consultant"
:
"0.0.60.10"
,
"m-fm"
:
"0.0.30.04"
,
"m-user"
:
"0.0.61.96"
,
"m-home"
:
"0.0.22.8
5
"
,
"m-home"
:
"0.0.22.8
7
"
,
"m-im"
:
"0.0.21.18"
,
"m-dynamic"
:
"0.0.7.35"
,
"m-article"
:
"0.0.0.10"
,
...
...
@@ -93,7 +93,7 @@ ext {
"m-consultant"
:
"0.0.60.10"
,
"m-fm"
:
"0.0.30.07"
,
"m-user"
:
"0.0.61.96"
,
"m-home"
:
"0.0.22.8
5
"
,
"m-home"
:
"0.0.22.8
7
"
,
"m-im"
:
"0.0.21.18"
,
"m-dynamic"
:
"0.0.7.35"
,
"m-article"
:
"0.0.0.8"
,
...
...
m-home/src/main/assets/home_data.json
View file @
fd7f9a0d
...
...
@@ -8,6 +8,7 @@
"linkUrl"
:
"ydl-user://h5/course?params=%7b%22url%22%3a%22https%3a%2f%2fm.ydl.com%2fcourse%2fDetail%2fv2%2f6194%22%7d"
,
"title"
:
""
},
"listenFree"
:
false
,
"askCategoryData"
:
[
{
"cateId"
:
0
,
...
...
m-home/src/main/assets/home_data_xlzx.json
View file @
fd7f9a0d
...
...
@@ -257,7 +257,8 @@
"imageUrl"
:
""
,
"btnLinkurl"
:
""
,
"imageBanner"
:
"https://pic.ydlcdn.com/HFfHKt6tNj.png"
}
},
"listenFree"
:
false
},
"type"
:
10001
},
...
...
@@ -523,7 +524,8 @@
"imageUrl"
:
""
,
"btnLinkurl"
:
""
,
"imageBanner"
:
"https://pic.ydlcdn.com/HFfHKt6tNj.png"
}
},
"listenFree"
:
false
},
"type"
:
10002
},
...
...
@@ -990,7 +992,8 @@
"imageUrl"
:
""
,
"btnLinkurl"
:
""
,
"imageBanner"
:
"https://pic.ydlcdn.com/HFfHKt6tNj.png"
}
},
"listenFree"
:
false
},
"type"
:
10003
},
...
...
m-home/src/main/java/com/yidianling/home/model/bean/HomeHeaderBean.kt
View file @
fd7f9a0d
...
...
@@ -43,6 +43,10 @@ class HomeHeaderBean : HomeItemBaseBean {
* 专家名称
*/
var
doctorName
:
String
?
=
null
/*
* 倾诉免费标识
* */
var
listenFree
:
Boolean
?
=
null
class
AskCategoryDataBean
{
/**
...
...
m-home/src/ydl/java/com/yidianling/home/adapter/YdlHomeAdapter.kt
View file @
fd7f9a0d
...
...
@@ -57,6 +57,11 @@ class YdlHomeAdapter(private val mContext: Context,
*/
var
consultCategoryData
:
List
<
HomeHeaderBean
.
ConsultCategoryDateBean
>?
=
null
/*
倾诉免费标识
* */
var
listenFree
:
Boolean
?=
false
fun
updateItems
(
list
:
MutableList
<
HomePagerDataBean
>)
{
if
(
null
==
this
.
list
||
this
.
list
!!
.
isEmpty
())
{
this
.
list
=
ArrayList
()
...
...
@@ -64,6 +69,7 @@ class YdlHomeAdapter(private val mContext: Context,
this
.
list
.
clear
()
}
this
.
list
.
addAll
(
list
)
this
.
listenFree
=
list
[
0
]
?.
headerBean
?.
listenFree
//重置标记位
confidePosition
=
-
1
consultPosition
=
-
1
...
...
@@ -131,7 +137,9 @@ class YdlHomeAdapter(private val mContext: Context,
}
//顶部预约专家,即时倾诉,心理测试按钮模块
HomeViewConfig
.
getOrder
().
buttonIndex
->
{
return
HomeButtonBannerViewHolder
(
HomeButtonBannerView
(
mContext
,
homeEvent
),
viewType
)
return
HomeButtonBannerViewHolder
(
HomeButtonBannerView
(
mContext
,
homeEvent
,
listenFree
!!
),
viewType
)
}
//倾诉*排解模块
HomeViewConfig
.
getOrder
().
confideIndex
->
{
...
...
m-home/src/ydl/java/com/yidianling/home/ui/view/HomeButtonBannerView.kt
View file @
fd7f9a0d
...
...
@@ -22,7 +22,7 @@ import kotlinx.android.synthetic.ydl.home_button_banner_view.view.*
* @Company 壹点灵
* @date 2019/02/13
*/
class
HomeButtonBannerView
(
private
val
mContext
:
Context
,
private
var
homeEvent
:
IHomeBaseEvent
?)
:
LinearLayout
(
mContext
)
{
class
HomeButtonBannerView
(
private
val
mContext
:
Context
,
private
var
homeEvent
:
IHomeBaseEvent
?
,
var
listenFree
:
Boolean
)
:
LinearLayout
(
mContext
)
{
private
var
buttonParams
:
LinearLayout
.
LayoutParams
?
=
null
private
var
buttonParamsFrame
:
FrameLayout
.
LayoutParams
?
=
null
...
...
@@ -36,10 +36,14 @@ class HomeButtonBannerView(private val mContext: Context, private var homeEvent:
val
params
=
RecyclerView
.
LayoutParams
(
ViewGroup
.
LayoutParams
.
MATCH_PARENT
,
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
)
layoutParams
=
params
View
.
inflate
(
mContext
,
R
.
layout
.
home_button_banner_view
,
this
)
Glide
.
with
(
context
)
.
load
(
R
.
drawable
.
qingsu_new_free_temp
)
.
diskCacheStrategy
(
DiskCacheStrategy
.
RESOURCE
)
.
into
(
qingsuGif
)
if
(
listenFree
){
qingsuGif
.
visibility
=
View
.
VISIBLE
Glide
.
with
(
context
)
.
load
(
R
.
drawable
.
qingsu_new_free_dynamic
)
.
diskCacheStrategy
(
DiskCacheStrategy
.
RESOURCE
)
.
into
(
qingsuGif
)
}
initButtonView
()
homeModuleButtonBannerFirst
.
setOnClickListener
{
...
...
@@ -67,7 +71,7 @@ class HomeButtonBannerView(private val mContext: Context, private var homeEvent:
buttonParams
=
LinearLayout
.
LayoutParams
(
viewWidth
,
viewHeight
)
buttonParamsFrame
=
FrameLayout
.
LayoutParams
(
viewWidth
,
viewHeight
)
buttonParamsFrame2
=
FrameLayout
.
LayoutParams
((
viewWidth
/
2.0
).
toInt
(),
(
viewHeight
/
2.3
).
toInt
())
buttonParamsFrame2
!!
.
setMargins
((((
viewWidth
/
6
f
).
toInt
())),
0
,
0
,
0
)
buttonParamsFrame2
!!
.
setMargins
((((
viewWidth
/
12
f
).
toInt
())),
0
,
0
,
0
)
qingsuGif
.
layoutParams
=
buttonParamsFrame2
homeModuleButtonBannerFirst
.
layoutParams
=
buttonParams
...
...
m-home/src/ydl/res/layout/home_button_banner_view.xml
View file @
fd7f9a0d
...
...
@@ -111,6 +111,7 @@
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:id=
"@+id/qingsuGif"
android:visibility=
"gone"
>
</ImageView>
</FrameLayout>
...
...
ydl-net/src/main/java/com/ydl/ydlnet/builder/interceptor/log/DefaultFormatPrinter.java
View file @
fd7f9a0d
...
...
@@ -57,7 +57,9 @@ public class DefaultFormatPrinter {
logLines
(
tag
,
new
String
[]{
URL_TAG
+
request
.
url
()},
false
);
logLines
(
tag
,
getRequest
(
request
),
true
);
logLines
(
tag
,
requestBody
.
split
(
LINE_SEPARATOR
),
true
);
NetLogUtils
.
debugInfo
(
tag
,
END_LINE
);
if
(!
request
.
url
().
toString
().
contains
(
"writemaidiandata"
)){
NetLogUtils
.
debugInfo
(
tag
,
END_LINE
);
}
}
/**
...
...
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