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
13999763
Commit
13999763
authored
Jul 01, 2022
by
刘鹏
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/d/v4.3.99' into feat/lp/lp_v4.3.99
# Conflicts: # config.gradle
parents
39350be8
2f842f05
Hide whitespace changes
Inline
Side-by-side
Showing
52 changed files
with
1342 additions
and
490 deletions
+1342
-490
JsMethod.kt
app/src/main/java/com/ydl/component/service/web/JsMethod.kt
+3
-3
config.gradle
config.gradle
+25
-27
ConfideBottomSheetDialogFragment.kt
m-confide/src/main/java/com/ydl/confide/home/ConfideBottomSheetDialogFragment.kt
+9
-3
DialStatus.kt
m-confide/src/main/java/com/ydl/confide/home/bean/DialStatus.kt
+1
-0
confide_call_logo.webp
m-confide/src/main/res/drawable-xhdpi/confide_call_logo.webp
+0
-0
confide_right_arrow.webp
m-confide/src/main/res/drawable-xhdpi/confide_right_arrow.webp
+0
-0
confide_call_logo.xml
m-confide/src/main/res/drawable/confide_call_logo.xml
+43
-0
confide_card_consult_bg.xml
m-confide/src/main/res/drawable/confide_card_consult_bg.xml
+3
-2
confide_consult_btn_bg.xml
m-confide/src/main/res/drawable/confide_consult_btn_bg.xml
+7
-4
confide_right_arrow.xml
m-confide/src/main/res/drawable/confide_right_arrow.xml
+21
-0
confide_home_activity.xml
m-confide/src/main/res/layout/confide_home_activity.xml
+8
-5
HotSearchActivity.kt
m-consultant/src/main/java/com/yidianling/consultant/HotSearchActivity.kt
+66
-44
FilterPopupWindow.kt
m-consultant/src/main/java/com/yidianling/consultant/ui/view/FilterPopupWindow.kt
+26
-11
consultant_ui_region_popup_window.xml
m-consultant/src/main/res/layout/consultant_ui_region_popup_window.xml
+2
-2
MembersActivity.java
m-dynamic/src/main/java/com/yidianling/dynamic/members/MembersActivity.java
+1
-1
TrendsListFragment.kt
m-dynamic/src/main/java/com/yidianling/dynamic/trendList/TrendsListFragment.kt
+7
-7
dynamic_fragment_trends_list.xml
m-dynamic/src/main/res/layout/dynamic_fragment_trends_list.xml
+46
-58
YdlHomeFragment.kt
m-home/src/ydl/java/com/yidianling/home/ui/fragment/YdlHomeFragment.kt
+7
-1
home_fragment.xml
m-home/src/ydl/res/layout/home_fragment.xml
+3
-3
MsgListAdapter.java
m-im/src/main/java/com/yidianling/im/ui/adapter/MsgListAdapter.java
+4
-0
YDLMessageFragment.java
m-im/src/main/java/com/yidianling/uikit/business/session/fragment/YDLMessageFragment.java
+21
-6
im_ydl_nim_message_fragment.xml
m-im/src/main/res_uikit/layout/im_ydl_nim_message_fragment.xml
+9
-44
PlayMeditationActivity.kt
m-muse/src/main/java/com/yidianling/muse/activity/PlayMeditationActivity.kt
+118
-82
MeditationPlayModuleBean.kt
m-muse/src/main/java/com/yidianling/muse/bean/MeditationPlayModuleBean.kt
+26
-21
ShareMeditationDialog.kt
m-muse/src/main/java/com/yidianling/muse/widget/ShareMeditationDialog.kt
+24
-9
AndroidManifest.xml
m-tests/src/main/AndroidManifest.xml
+3
-0
TestListCommand.kt
m-tests/src/main/java/com/yidianling/tests/list/model/TestListCommand.kt
+3
-0
TestCategoryListActivity.kt
m-tests/src/main/java/com/yidianling/tests/list/view/TestCategoryListActivity.kt
+96
-58
TestListRecyclerAdapter.kt
m-tests/src/main/java/com/yidianling/tests/list/view/adapter/TestListRecyclerAdapter.kt
+2
-2
TestSearchActivity.kt
m-tests/src/main/java/com/yidianling/tests/search/TestSearchActivity.kt
+33
-13
TestSearchKeyActivity.kt
m-tests/src/main/java/com/yidianling/tests/search/TestSearchKeyActivity.kt
+291
-0
TestSearchPresenter.kt
m-tests/src/main/java/com/yidianling/tests/search/TestSearchPresenter.kt
+2
-1
tests_bg_indicator_search.xml
m-tests/src/main/res/drawable/tests_bg_indicator_search.xml
+13
-0
tests_testhome_recom_price_red_bg.xml
m-tests/src/main/res/drawable/tests_testhome_recom_price_red_bg.xml
+6
-0
tests_activity_test_category_list.xml
m-tests/src/main/res/layout/tests_activity_test_category_list.xml
+35
-41
tests_activity_test_key_search.xml
m-tests/src/main/res/layout/tests_activity_test_key_search.xml
+106
-0
tests_item_category_testlist_view.xml
m-tests/src/main/res/layout/tests_item_category_testlist_view.xml
+1
-1
tests_testlist_item_view.xml
m-tests/src/main/res/layout/tests_testlist_item_view.xml
+1
-1
styles.xml
m-tests/src/main/res/values/styles.xml
+6
-0
EvaluateOrderBean.kt
m-user/src/main/java/com/yidianling/user/bean/EvaluateOrderBean.kt
+6
-0
DatePickerDialogFragment.java
m-user/src/main/java/com/yidianling/user/mine/DatePickerDialogFragment.java
+15
-3
MineFragment.kt
m-user/src/main/java/com/yidianling/user/mine/MineFragment.kt
+62
-7
AppLocal.kt
m-user/src/main/java/com/yidianling/user/mine/data/AppLocal.kt
+13
-0
AppLocalImpl.kt
m-user/src/main/java/com/yidianling/user/mine/data/AppLocalImpl.kt
+31
-3
MineApi.kt
m-user/src/main/java/com/yidianling/user/mine/http/MineApi.kt
+10
-0
MineHttp.kt
m-user/src/main/java/com/yidianling/user/mine/http/MineHttp.kt
+4
-0
MineHttpImpl.kt
m-user/src/main/java/com/yidianling/user/mine/http/MineHttpImpl.kt
+15
-2
user_mine_fragment_mine.xml
m-user/src/main/res/layout/user_mine_fragment_mine.xml
+46
-11
ShareData.kt
ydl-platform/src/main/java/com/ydl/ydlcommon/bean/ShareData.kt
+5
-2
StatusBarUtils.kt
ydl-platform/src/main/java/com/ydl/ydlcommon/utils/StatusBarUtils.kt
+14
-0
ShareMeditationDialog.kt
ydl-webview/src/main/java/com/ydl/view/ShareMeditationDialog.kt
+15
-5
NewH5Activity.java
ydl-webview/src/main/java/com/ydl/webview/NewH5Activity.java
+28
-7
No files found.
app/src/main/java/com/ydl/component/service/web/JsMethod.kt
View file @
13999763
...
...
@@ -36,12 +36,12 @@ class JsMethod {
return
true
}
"show_loading"
->
{
val
topActivity
=
BaseActivityMgr
.
INST
.
getTopActivity
()
Loading
.
show
(
topActivity
)
//
val topActivity = BaseActivityMgr.INST.getTopActivity()
//
Loading.show(topActivity)
return
true
}
"close_loading"
->
{
Loading
.
close
()
//
Loading.close()
return
true
}
"open_app_eval_list"
->{
...
...
config.gradle
View file @
13999763
ext
{
kotlin_version
=
"1.3.21"
dev_mode
=
false
dev_mode
=
false
//组件发布的时候需要设置为false
ydlPublishVersion
=
[
// -------------- 业务模块 --------------
//第三步 若干
"m-confide"
:
"0.0.50.4
2
"
,
"m-consultant"
:
"0.0.60.7
1
"
,
"m-confide"
:
"0.0.50.4
5
"
,
"m-consultant"
:
"0.0.60.7
3
"
,
"m-fm"
:
"0.0.30.09"
,
"m-user"
:
"0.0.62.
55
"
,
"m-home"
:
"0.0.23.9
5
"
,
"m-im"
:
"0.0.21.6
3
"
,
"m-dynamic"
:
"0.0.7.7
4
"
,
"m-user"
:
"0.0.62.
71
"
,
"m-home"
:
"0.0.23.9
8
"
,
"m-im"
:
"0.0.21.6
6
"
,
"m-dynamic"
:
"0.0.7.7
9
"
,
"m-article"
:
"0.0.0.10"
,
"m-muse"
:
"0.0.28.8
1
"
,
"m-tests"
:
"0.0.24.
18
"
,
"m-muse"
:
"0.0.28.8
4
"
,
"m-tests"
:
"0.0.24.
22
"
,
"m-course"
:
"0.0.43.39"
,
...
...
@@ -23,15 +23,15 @@ ext {
//mdt 组件
"ydl-tuicore"
:
"0.0.25"
,
//第一步
"ydl-platform"
:
"0.0.41.
47
"
,
"ydl-platform"
:
"0.0.41.
50
"
,
//第二步 若干
"ydl-webview"
:
"0.0.38.9
4
"
,
"ydl-webview"
:
"0.0.38.9
9
"
,
"ydl-media"
:
"0.0.21.52"
,
"ydl-pay"
:
"0.0.18.21"
,
"m-audioim"
:
"0.0.49.30.23"
,
"ydl-flutter-base"
:
"0.0.14.
38
"
,
"ydl-flutter-base"
:
"0.0.14.
40
"
,
//以下 几乎不会动
"router"
:
"0.0.1"
,
...
...
@@ -91,33 +91,31 @@ ext {
ydlCompileVersion
=
[
// -------------- 业务模块 --------------
//第三步 若干
"m-confide"
:
"0.0.50.4
2
"
,
"m-consultant"
:
"0.0.60.7
1
"
,
"m-confide"
:
"0.0.50.4
5
"
,
"m-consultant"
:
"0.0.60.7
3
"
,
"m-fm"
:
"0.0.30.09"
,
"m-user"
:
"0.0.62.
55
"
,
"m-home"
:
"0.0.23.9
5
"
,
"m-im"
:
"0.0.21.6
3
"
,
"m-dynamic"
:
"0.0.7.7
4
"
,
"m-user"
:
"0.0.62.
71
"
,
"m-home"
:
"0.0.23.9
8
"
,
"m-im"
:
"0.0.21.6
6
"
,
"m-dynamic"
:
"0.0.7.7
9
"
,
"m-article"
:
"0.0.0.10"
,
"m-muse"
:
"0.0.28.81"
,
"m-tests"
:
"0.0.24.18"
,
"m-muse"
:
"0.0.28.84"
,
"m-tests"
:
"0.0.24.22"
,
"m-course"
:
"0.0.43.39"
,
//-------------- 功能组件 --------------
//mdt 组件
"ydl-tuicore"
:
"0.0.25"
,
//第一步
"ydl-platform"
:
"0.0.41.47"
,
"ydl-platform"
:
"0.0.41.50"
,
//第二步 若干
"ydl-webview"
:
"0.0.38.9
4
"
,
"ydl-webview"
:
"0.0.38.9
9
"
,
"ydl-media"
:
"0.0.21.52"
,
"ydl-pay"
:
"0.0.18.21"
,
"m-audioim"
:
"0.0.49.30.23"
,
"ydl-flutter-base"
:
"0.0.14.
38
"
,
"ydl-flutter-base"
:
"0.0.14.
40
"
,
//以下 几乎不会动
"router"
:
"0.0.1"
,
...
...
@@ -283,7 +281,7 @@ ext {
//flutter功能组件升级===>发布ydl-flutter组件===>引用flutter相关的业务模块
"ydl-flutter-base"
:
"com.ydl:ydl-flutter-base:${ydlCompileVersion["
ydl
-
flutter
-
base
"]}"
,
//组件化项目中的flutter base模块
"ydl-flutter"
:
"com.ydl:ydl-flutter:0.0.4
4
@aar"
,
//flutter aar
"ydl-flutter"
:
"com.ydl:ydl-flutter:0.0.4
6
@aar"
,
//flutter aar
// "ydl-flutter-sp" : "com.ydl:ydl-flutter-sp:0.0.2@aar", //flutter 缓存 aar
//基础组件 <<--- 先发这个,发完改这里的版本号
...
...
m-confide/src/main/java/com/ydl/confide/home/ConfideBottomSheetDialogFragment.kt
View file @
13999763
...
...
@@ -145,7 +145,6 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
uid
=
arguments
?.
getString
(
KEY_UID
)
listen_free
=
arguments
?.
getBoolean
(
KEY_LISTEN_FREE
)
?:
false
onLoadDialStatus
(
doctorId
)
// +
wv_content
=
view
.
findViewById
<
ProgressWebView
>(
com
.
ydl
.
webview
.
R
.
id
.
wv_content
)
wv_content
.
progressbar
.
visibility
=
View
.
GONE
close_webview_Icon
=
view
.
findViewById
<
View
>(
R
.
id
.
close_webview_Icon
)
...
...
@@ -392,7 +391,6 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
layout_change_text
.
visibility
=
View
.
VISIBLE
this
.
doctorId
=
doctorId
onLoadDialStatus
(
doctorId
)
this
.
expertUrl
=
linkUrl
callJsFun
(
wv_content
,
"setUnRead(${getUnReadByUid(uid = uid)})"
)
}
...
...
@@ -449,6 +447,14 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
override
fun
onProgressChanged
(
view
:
WebView
,
newProgress
:
Int
)
{
if
(
newProgress
==
100
)
{
wv_content
.
progressbar
.
visibility
=
View
.
GONE
}
else
{
if
(
wv_content
.
progressbar
.
visibility
==
View
.
GONE
)
{
wv_content
.
progressbar
.
visibility
=
View
.
VISIBLE
}
wv_content
.
progressbar
.
progress
=
newProgress
}
if
(
newProgress
==
100
)
{
callJsFun
(
wv_content
,
"setUnRead(${uid?.let { getUnReadByUid(uid = it) }})"
)
}
super
.
onProgressChanged
(
view
,
newProgress
)
...
...
@@ -582,7 +588,7 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
if
(
resp
.
code
==
"200"
)
{
layoutCall
.
visibility
=
View
.
VISIBLE
lineStatus
=
resp
.
data
?.
confideLine
?:
2
expertUrl
=
resp
.
data
?.
linkUrl
?:
""
if
(
isLogin
&&
listen_free
)
{
free
.
visibility
=
View
.
VISIBLE
val
controller
:
DraweeController
=
Fresco
.
newDraweeControllerBuilder
()
...
...
m-confide/src/main/java/com/ydl/confide/home/bean/DialStatus.kt
View file @
13999763
...
...
@@ -2,6 +2,7 @@ package com.ydl.confide.home.bean
class
DialStatus
{
var
confideLine
:
Int
?
=
null
var
linkUrl
:
String
?
=
""
var
remainingTime
:
RemainingTime
?
=
null
}
...
...
m-confide/src/main/res/drawable-xhdpi/confide_call_logo.webp
deleted
100644 → 0
View file @
39350be8
File deleted
m-confide/src/main/res/drawable-xhdpi/confide_right_arrow.webp
deleted
100644 → 0
View file @
39350be8
File deleted
m-confide/src/main/res/drawable/confide_call_logo.xml
0 → 100644
View file @
13999763
<?xml version="1.0" encoding="utf-8"?>
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"29dp"
android:height=
"29dp"
android:viewportWidth=
"29"
android:viewportHeight=
"29"
>
<path
android:pathData=
"M14.5,14.5m-14.5,0a14.5,14.5 0,1 1,29 0a14.5,14.5 0,1 1,-29 0"
android:strokeWidth=
"1"
android:fillColor=
"#FFFFFF"
android:fillType=
"nonZero"
android:strokeColor=
"#00000000"
/>
<path
android:pathData=
"M20.2426,8.6932C18.9653,7.6331 17.3222,7.1176 15.6208,7.2388C15.3959,7.258 15.2304,7.4463 15.2496,7.6712C15.2559,7.7747 15.3054,7.8742 15.3831,7.951C15.4616,8.0192 15.5692,8.0562 15.6727,8.05C17.1662,7.9498 18.6111,8.3931 19.7304,9.3251C20.8506,10.2486 21.5134,11.5269 21.6149,12.9262C21.6283,13.1248 21.7836,13.2783 21.9786,13.2988C22.0041,13.3015 22.021,13.3032 22.0474,13.2974C22.2722,13.2782 22.4378,13.0899 22.4185,12.865C22.3072,11.2332 21.5368,9.755 20.2426,8.6932Z"
android:strokeWidth=
"1"
android:fillColor=
"#5ECEA9"
android:fillType=
"nonZero"
android:strokeColor=
"#00000000"
/>
<path
android:pathData=
"M15.6922,10.0665C16.5646,10.0038 17.4031,10.2634 18.0577,10.8037C18.7048,11.3346 19.0896,12.0779 19.15,12.89C19.1634,13.0886 19.3187,13.2421 19.5137,13.2626C19.5391,13.2652 19.5561,13.267 19.5824,13.2612C19.8073,13.242 19.9728,13.0537 19.9536,12.8288C19.8825,11.7927 19.3902,10.8494 18.569,10.1802C17.7563,9.5119 16.7112,9.1792 15.6403,9.2552C15.4154,9.2745 15.2499,9.4628 15.2691,9.6877C15.2799,9.9117 15.4673,10.0857 15.6922,10.0665Z"
android:strokeWidth=
"1"
android:fillColor=
"#5ECEA9"
android:fillType=
"nonZero"
android:strokeColor=
"#00000000"
/>
<path
android:pathData=
"M15.1838,11.9674C15.2624,12.0357 15.3699,12.0727 15.4734,12.0664C15.9138,12.0356 16.3373,12.1658 16.6685,12.4406C16.992,12.7061 17.1844,13.0778 17.2103,13.4834C17.2238,13.6819 17.3791,13.8354 17.5656,13.855C17.591,13.8577 17.6165,13.8604 17.6343,13.8537C17.8592,13.8344 18.0247,13.6461 18.0055,13.4212C17.9603,12.7907 17.6604,12.2192 17.1628,11.8154C16.6737,11.4125 16.0436,11.2092 15.3952,11.261C15.1703,11.2803 15.0048,11.4686 15.024,11.6935C15.0557,11.7997 15.1053,11.8992 15.1838,11.9674Z"
android:strokeWidth=
"1"
android:fillColor=
"#5ECEA9"
android:fillType=
"nonZero"
android:strokeColor=
"#00000000"
/>
<path
android:pathData=
"M19.0824,17.506C18.6476,17.1991 18.1958,16.9178 17.7951,16.7132C17.1472,16.3722 16.8573,16.3295 16.7039,16.3295C16.3714,16.3295 16.0816,16.5 15.8514,16.841C15.7065,17.0542 15.5956,17.3014 15.4933,17.5401C15.4422,17.6509 15.3569,17.864 15.2887,17.9749C15.1609,17.9322 14.854,17.8044 14.3084,17.4293C13.7713,17.0627 13.1831,16.5853 12.7398,16.1505C12.305,15.7072 11.8276,15.119 11.461,14.5734C11.0859,14.0193 10.958,13.7209 10.9154,13.593C11.0262,13.5248 11.2308,13.4395 11.3587,13.3799C11.5974,13.2776 11.8446,13.1667 12.0492,13.0218C12.3817,12.7916 12.5522,12.5018 12.5522,12.1693C12.5522,12.0073 12.5096,11.726 12.1686,11.0696C11.964,10.6774 11.6826,10.2171 11.3757,9.7823C11.1456,9.4584 10.8046,8.9895 10.438,8.6144C10.0117,8.1711 9.6878,7.975 9.3724,7.975C8.6477,7.975 7.8549,8.9383 7.5395,9.3475C7.2411,9.7653 6.525,10.8224 6.525,11.8283C6.525,12.7661 7.1388,13.9681 7.6588,14.8121C8.3494,15.9289 9.2956,17.1394 10.3357,18.205L10.6767,18.546C11.7423,19.5861 12.9444,20.5409 14.0611,21.2314C14.9051,21.7515 16.0986,22.3653 17.0364,22.3653C18.0423,22.3653 19.0994,21.6492 19.5086,21.3423C19.9178,21.0354 20.8812,20.234 20.8812,19.5094C20.8812,19.1939 20.6851,18.8615 20.2418,18.4352C19.8752,18.0857 19.4063,17.7362 19.0824,17.506Z"
android:strokeWidth=
"1"
android:fillColor=
"#5ECEA9"
android:fillType=
"nonZero"
android:strokeColor=
"#00000000"
/>
<path
android:pathData=
"M10.3186,12.7405C10.0032,12.9536 9.8498,13.2094 9.8583,13.5163C9.8583,13.6527 9.8753,14.0704 10.6085,15.1531C11.0092,15.7413 11.5292,16.3892 12.0151,16.8837C12.5011,17.3525 13.1404,17.8811 13.7287,18.2818C14.8113,19.0234 15.2291,19.032 15.3825,19.032C15.6809,19.032 15.9366,18.87 16.1412,18.5631C16.2606,18.3841 16.3629,18.1539 16.4481,17.9408C16.5163,17.7788 16.5931,17.6083 16.6613,17.4889C16.6954,17.4293 16.7209,17.3952 16.738,17.3781C16.8147,17.3952 16.9852,17.4548 17.3092,17.6253C17.6416,17.8044 18.0423,18.0431 18.4174,18.3073C19.3552,18.9552 19.7473,19.3986 19.8411,19.5435C19.8155,19.5946 19.7559,19.7055 19.6109,19.876C19.4234,20.0976 19.1506,20.3363 18.8607,20.558C18.1958,21.0524 17.5138,21.3423 17.0449,21.3423C16.5078,21.3423 15.6212,20.9842 14.6153,20.3619C13.5667,19.714 12.4243,18.8103 11.4098,17.8214L11.0859,17.4889C10.097,16.4745 9.1933,15.3321 8.5454,14.275C7.9231,13.2605 7.5651,12.3739 7.5651,11.8368C7.5651,11.3594 7.8549,10.686 8.3494,10.0125C8.5625,9.7141 8.8097,9.4498 9.0228,9.2623C9.1933,9.1174 9.3042,9.0492 9.3553,9.0321C9.5002,9.1259 9.9435,9.518 10.5914,10.4558C10.8557,10.8394 11.0944,11.2401 11.2734,11.5726C11.4439,11.8965 11.5036,12.067 11.5207,12.1437C11.5036,12.1608 11.4695,12.1864 11.4098,12.2205C11.282,12.2972 11.1115,12.3739 10.941,12.4421C10.7193,12.5274 10.5062,12.6211 10.3186,12.7405Z"
android:strokeWidth=
"1"
android:fillColor=
"#5ECEA9"
android:fillType=
"nonZero"
android:strokeColor=
"#00000000"
/>
</vector>
m-confide/src/main/res/drawable/confide_card_consult_bg.xml
View file @
13999763
...
...
@@ -3,8 +3,8 @@
android:shape=
"rectangle"
>
<corners
android:radius=
"
8
dp"
/>
android:radius=
"
26
dp"
/>
<solid
android:color=
"#
ffffff
"
/>
<solid
android:color=
"#
61CEAC
"
/>
</shape>
\ No newline at end of file
m-confide/src/main/res/drawable/confide_consult_btn_bg.xml
View file @
13999763
...
...
@@ -2,10 +2,12 @@
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<gradient
android:startColor=
"@color/confide_61CEAC"
android:endColor=
"@color/confide_48CC95"
/
>
<!-- <gradient-->
<!-- android:startColor="@color/confide_61CEAC"-->
<!-- android:endColor="@color/confide_48CC95"/>--
>
<corners
android:radius=
"8dp"
/>
<solid
android:color=
"@color/white"
/>
<corners
android:radius=
"15dp"
/>
</shape>
\ No newline at end of file
m-confide/src/main/res/drawable/confide_right_arrow.xml
0 → 100644
View file @
13999763
<?xml version="1.0" encoding="utf-8"?>
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"7dp"
android:height=
"8dp"
android:viewportWidth=
"7"
android:viewportHeight=
"8"
>
<path
android:pathData=
"M0,0h7v7h-7z"
android:strokeAlpha=
"0"
android:strokeWidth=
"1"
android:fillColor=
"#54B6F3"
android:fillType=
"nonZero"
android:strokeColor=
"#00000000"
android:fillAlpha=
"0"
/>
<path
android:pathData=
"M2.7,7.41143l-0.55918,-0.50312l2.42266,-2.69199l-2.56348,-2.69814l0.54551,-0.51816l3.04199,3.20264z"
android:strokeWidth=
"1"
android:fillColor=
"#55B7F3"
android:fillType=
"nonZero"
android:strokeColor=
"#00000000"
/>
</vector>
m-confide/src/main/res/layout/confide_home_activity.xml
View file @
13999763
...
...
@@ -22,7 +22,7 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:id=
"@+id/quick_consult_card"
android:layout_width=
"match_parent"
android:layout_height=
"
wrap_content
"
android:layout_height=
"
52dp
"
android:layout_alignParentBottom=
"true"
android:layout_marginLeft=
"15dp"
android:layout_marginRight=
"15dp"
...
...
@@ -40,7 +40,8 @@
android:id=
"@+id/confide_logo"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@drawable/confide_call_logo"
android:layout_marginStart=
"8dp"
android:src=
"@drawable/confide_call_logo"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
...
...
@@ -57,8 +58,9 @@
android:gravity=
"center_vertical"
android:maxLines=
"1"
android:text=
"智能推荐,一键倾诉"
android:textColor=
"@color/
platform_color_333333
"
android:textColor=
"@color/
white
"
android:textSize=
"14dp"
android:textStyle=
"bold"
android:layout_marginStart=
"@dimen/platform_dp_8"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintStart_toEndOf=
"@id/confide_logo"
...
...
@@ -85,9 +87,10 @@
android:paddingRight=
"@dimen/platform_dp_7"
android:text=
"我要倾诉"
android:layout_marginTop=
"@dimen/platform_dp_12"
android:textColor=
"
@color/white
"
android:textColor=
"
#55CDA0
"
android:textSize=
"13sp"
android:drawableRight=
"@drawable/confide_right_arrow"
/>
android:textStyle=
"bold"
app:drawableRightCompat=
"@drawable/confide_right_arrow"
/>
<ImageView
android:id=
"@+id/confideRed"
...
...
m-consultant/src/main/java/com/yidianling/consultant/HotSearchActivity.kt
View file @
13999763
...
...
@@ -38,10 +38,11 @@ import kotlinx.android.synthetic.main.consultant_activity_hot_search.*
import
kotlinx.android.synthetic.main.consultant_item_expert_hot_search.view.*
@Route
(
path
=
"/consult/hot_search"
)
class
HotSearchActivity
:
BaseMvpActivity
<
IHotSearchContract
.
View
,
IHotSearchContract
.
Presenter
>(),
IHotSearchContract
.
View
{
private
lateinit
var
searchWordsAdapter
:
SearchWordsAdapter
class
HotSearchActivity
:
BaseMvpActivity
<
IHotSearchContract
.
View
,
IHotSearchContract
.
Presenter
>(),
IHotSearchContract
.
View
{
private
lateinit
var
searchWordsAdapter
:
SearchWordsAdapter
private
val
searchSuggestList
:
ArrayList
<
SearchSuggestListBean
>
=
ArrayList
()
private
var
mSearchContent
:
String
=
""
private
var
mSearchContent
:
String
=
""
private
val
CACHE_CONSULT_SEARCH_HISTORY_DATA
=
"cache_consult_search_history_data"
private
val
HOT_SEARCH_DOCTOR_NAME
=
"hot_search_doctor_name"
private
var
historyList
:
FixSizeLinkedList
<
String
>
=
FixSizeLinkedList
(
15
)
...
...
@@ -88,7 +89,8 @@ class HotSearchActivity : BaseMvpActivity<IHotSearchContract.View, IHotSearchCon
private
fun
initViews
()
{
StatusBarUtils
.
statusBarLightMode
(
this
)
maxWidth
=
(
2
*
RxDeviceTool
.
getScreenWidth
(
this
@HotSearchActivity
))
-
RxImageTool
.
dip2px
(
60f
)
maxWidth
=
(
2
*
RxDeviceTool
.
getScreenWidth
(
this
@HotSearchActivity
))
-
RxImageTool
.
dip2px
(
60f
)
dp42
=
RxImageTool
.
dip2px
(
60f
)
iv_delete_icon
.
setOnClickListener
{
...
...
@@ -99,21 +101,21 @@ class HotSearchActivity : BaseMvpActivity<IHotSearchContract.View, IHotSearchCon
// 搜索的关联词
var
relatedWords
=
""
var
isRecommendWords
=
false
if
(
searchSuggestList
.
isNotEmpty
()
&&
searchSuggestList
.
size
>
0
)
{
if
(
searchSuggestList
[
0
].
suggest_relations
.
size
>
0
)
{
if
(
searchSuggestList
.
isNotEmpty
()
&&
searchSuggestList
.
size
>
0
)
{
if
(
searchSuggestList
[
0
].
suggest_relations
.
size
>
0
)
{
relatedWords
=
searchSuggestList
[
0
].
suggest_relations
[
0
]
isRecommendWords
=
true
}
if
(
TextUtils
.
isEmpty
(
relatedWords
)
&&!
TextUtils
.
isEmpty
(
searchSuggestList
[
0
].
suggest_content
))
{
if
(
TextUtils
.
isEmpty
(
relatedWords
)
&&
!
TextUtils
.
isEmpty
(
searchSuggestList
[
0
].
suggest_content
))
{
relatedWords
=
searchSuggestList
[
0
].
suggest_content
}
doSearch
(
etSearch
.
text
.
toString
(),
relatedWords
,
isRecommendWords
)
}
else
{
doSearch
(
etSearch
.
text
.
toString
(),
relatedWords
,
isRecommendWords
)
}
else
{
val
searchWords
=
etSearch
.
text
.
toString
()
if
(
TextUtils
.
isEmpty
(
searchWords
)){
doSearch
(
searchWords
,
""
,
isRecommendWords
)
}
else
{
getSearchWords
(
etSearch
.
text
.
toString
(),
true
)
if
(
TextUtils
.
isEmpty
(
searchWords
))
{
doSearch
(
searchWords
,
""
,
isRecommendWords
)
}
else
{
getSearchWords
(
etSearch
.
text
.
toString
(),
true
)
}
}
}
...
...
@@ -129,8 +131,8 @@ class HotSearchActivity : BaseMvpActivity<IHotSearchContract.View, IHotSearchCon
val
data
=
ModularServiceManager
.
provide
(
IConsultantService
::
class
.
java
).
getGuideImage
(
5
)
if
(
data
?.
size
?:
0
>
0
)
{
val
imageUrl
=
data
?.
get
(
0
)
?.
pic
iv_daoyi_image
.
visibility
=
View
.
VISIBLE
val
imageUrl
=
data
?.
get
(
0
)
?.
pic
iv_daoyi_image
.
visibility
=
View
.
VISIBLE
GlideApp
.
with
(
mContext
)
.
load
(
imageUrl
)
...
...
@@ -138,7 +140,11 @@ class HotSearchActivity : BaseMvpActivity<IHotSearchContract.View, IHotSearchCon
iv_daoyi_image
.
setOnClickListener
{
LogUtil
.
e
(
"跳转导医:location=${data?.get(0)!!.location},title=${data[0].title}"
)
ConsultAssistantEntryUtils
.
jumpConsultAssistant
(
this
,
data
[
0
].
location
.
toInt
(),
"learning"
)
ConsultAssistantEntryUtils
.
jumpConsultAssistant
(
this
,
data
[
0
].
location
.
toInt
(),
"learning"
)
}
}
...
...
@@ -149,29 +155,35 @@ class HotSearchActivity : BaseMvpActivity<IHotSearchContract.View, IHotSearchCon
// 搜索的关联词
var
relatedWords
=
""
var
isRecommendWords
=
false
if
(
searchSuggestList
.
isNotEmpty
()
&&
searchSuggestList
.
size
>
0
)
{
if
(
searchSuggestList
[
position
].
suggest_relations
.
size
>
0
)
{
if
(
searchSuggestList
.
isNotEmpty
()
&&
searchSuggestList
.
size
>
0
)
{
if
(
searchSuggestList
[
position
].
suggest_relations
.
size
>
0
)
{
relatedWords
=
searchSuggestList
[
position
].
suggest_relations
[
0
]
isRecommendWords
=
true
}
if
(
TextUtils
.
isEmpty
(
relatedWords
)
&&!
TextUtils
.
isEmpty
(
searchSuggestList
[
position
].
suggest_content
))
{
if
(
TextUtils
.
isEmpty
(
relatedWords
)
&&
!
TextUtils
.
isEmpty
(
searchSuggestList
[
position
].
suggest_content
))
{
relatedWords
=
searchSuggestList
[
position
].
suggest_content
}
}
doSearch
(
searchSuggestList
[
position
].
suggest_content
,
relatedWords
,
isRecommendWords
)
doSearch
(
searchSuggestList
[
position
].
suggest_content
,
relatedWords
,
isRecommendWords
)
// 埋点
ActionCountUtils
.
baiDuCountSign3
(
ConsultBIConstants
.
PART_ID_YDL_USER_MAIN_PAGE
,
ConsultBIConstants
.
POSITION_YDL_USER_ASSOCIATE_WORD_CLICK
,
etSearch
.
text
.
toString
(),
searchSuggestList
[
position
].
suggest_content
,
"app"
)
ActionCountUtils
.
baiDuCountSign3
(
ConsultBIConstants
.
PART_ID_YDL_USER_MAIN_PAGE
,
ConsultBIConstants
.
POSITION_YDL_USER_ASSOCIATE_WORD_CLICK
,
etSearch
.
text
.
toString
(),
searchSuggestList
[
position
].
suggest_content
,
"app"
)
}
etSearch
.
addTextChangedListener
(
object
:
TextWatcher
{
override
fun
afterTextChanged
(
s
:
Editable
?)
{
if
(
TextUtils
.
isEmpty
(
s
))
{
iv_delete_icon
.
visibility
=
View
.
INVISIBLE
rv_search_words
.
visibility
=
View
.
GONE
getSearchWords
(
""
,
false
)
getSearchWords
(
""
,
false
)
}
else
{
iv_delete_icon
.
visibility
=
View
.
VISIBLE
getSearchWords
(
s
.
toString
(),
false
)
getSearchWords
(
s
.
toString
(),
false
)
}
}
...
...
@@ -190,43 +202,53 @@ class HotSearchActivity : BaseMvpActivity<IHotSearchContract.View, IHotSearchCon
* 获取搜索联想词
* @param isClickWords 是否是点击历史搜索、热门搜索等进行搜索
*/
private
fun
getSearchWords
(
searchContent
:
String
,
isClickWords
:
Boolean
)
{
if
(!
TextUtils
.
isEmpty
(
searchContent
)){
private
fun
getSearchWords
(
searchContent
:
String
,
isClickWords
:
Boolean
)
{
if
(!
TextUtils
.
isEmpty
(
searchContent
))
{
mSearchContent
=
searchContent
val
map
=
HashMap
<
String
,
Any
>()
map
[
"content"
]
=
searchContent
mPresenter
.
getSearchWords
(
map
,
searchContent
,
isClickWords
)
}
else
{
mPresenter
.
getSearchWords
(
map
,
searchContent
,
isClickWords
)
}
else
{
rv_search_words
.
visibility
=
View
.
GONE
}
}
override
fun
getSearchWordsSuccess
(
searchWordsBean
:
SearchWordsBean
,
searchContent
:
String
,
isClickWords
:
Boolean
)
{
if
(
isClickWords
){
override
fun
getSearchWordsSuccess
(
searchWordsBean
:
SearchWordsBean
,
searchContent
:
String
,
isClickWords
:
Boolean
)
{
if
(
isClickWords
)
{
// 搜索的关联词
var
relatedWords
=
""
var
isRecommendWords
=
false
if
(!
searchWordsBean
.
search_suggests
.
isNullOrEmpty
()
&&
searchWordsBean
.
search_suggests
.
size
>
0
)
{
if
(
searchWordsBean
.
search_suggests
[
0
].
suggest_relations
.
size
>
0
)
{
if
(!
searchWordsBean
.
search_suggests
.
isNullOrEmpty
()
&&
searchWordsBean
.
search_suggests
.
size
>
0
)
{
if
(
searchWordsBean
.
search_suggests
[
0
].
suggest_relations
.
size
>
0
)
{
relatedWords
=
searchWordsBean
.
search_suggests
[
0
].
suggest_relations
[
0
]
isRecommendWords
=
true
}
if
(
TextUtils
.
isEmpty
(
relatedWords
)
&&!
TextUtils
.
isEmpty
(
searchWordsBean
.
search_suggests
[
0
].
suggest_content
))
{
if
(
TextUtils
.
isEmpty
(
relatedWords
)
&&
!
TextUtils
.
isEmpty
(
searchWordsBean
.
search_suggests
[
0
].
suggest_content
))
{
relatedWords
=
searchWordsBean
.
search_suggests
[
0
].
suggest_content
}
}
doSearch
(
searchContent
,
relatedWords
,
isRecommendWords
)
}
else
{
doSearch
(
searchContent
,
relatedWords
,
isRecommendWords
)
}
else
{
searchSuggestList
.
clear
()
if
(!
searchWordsBean
.
search_suggests
.
isNullOrEmpty
()){
if
(!
searchWordsBean
.
search_suggests
.
isNullOrEmpty
())
{
rv_search_words
.
visibility
=
View
.
VISIBLE
searchSuggestList
.
addAll
(
searchWordsBean
.
search_suggests
)
searchWordsAdapter
.
notifyDataAndSetSearchWord
(
mSearchContent
)
// 埋点
val
sign2
=
searchSuggestList
.
joinToString
(
","
){
it
.
suggest_content
}
ActionCountUtils
.
baiDuCountSign3
(
ConsultBIConstants
.
PART_ID_YDL_USER_MAIN_PAGE
,
ConsultBIConstants
.
POSITION_YDL_USER_ASSOCIATE_WORD_VISIT
,
searchContent
,
sign2
,
"app"
)
}
else
{
val
sign2
=
searchSuggestList
.
joinToString
(
","
)
{
it
.
suggest_content
}
ActionCountUtils
.
baiDuCountSign3
(
ConsultBIConstants
.
PART_ID_YDL_USER_MAIN_PAGE
,
ConsultBIConstants
.
POSITION_YDL_USER_ASSOCIATE_WORD_VISIT
,
searchContent
,
sign2
,
"app"
)
}
else
{
rv_search_words
.
visibility
=
View
.
GONE
}
}
...
...
@@ -272,7 +294,7 @@ class HotSearchActivity : BaseMvpActivity<IHotSearchContract.View, IHotSearchCon
.
inflate
(
R
.
layout
.
consultant_item_expert_hot_search
,
flHotSearch
,
false
)
view
.
tvHotSearch
.
text
=
keywordData
[
index
].
keyword
view
.
setOnClickListener
{
getSearchWords
(
keywordData
[
index
].
keyword
!!
,
true
)
getSearchWords
(
keywordData
[
index
].
keyword
!!
,
true
)
}
flHotSearch
.
addView
(
view
)
}
...
...
@@ -304,7 +326,7 @@ class HotSearchActivity : BaseMvpActivity<IHotSearchContract.View, IHotSearchCon
}
}
view
.
setOnClickListener
{
getSearchWords
(
etSearch
.
text
.
toString
(),
true
)
getSearchWords
(
hotSearchExpert
[
index
].
name
!!
,
true
)
}
flHotExpert
.
addView
(
view
)
}
...
...
@@ -366,7 +388,7 @@ class HotSearchActivity : BaseMvpActivity<IHotSearchContract.View, IHotSearchCon
break
}
view
.
setOnClickListener
{
getSearchWords
(
historyStr
,
true
)
getSearchWords
(
historyStr
,
true
)
}
fl_search_history
.
addView
(
view
)
}
...
...
@@ -386,14 +408,14 @@ class HotSearchActivity : BaseMvpActivity<IHotSearchContract.View, IHotSearchCon
* 搜索
* @param isRecommendWords 是否是推荐词
*/
private
fun
doSearch
(
searchWords
:
String
,
relatedWords
:
String
,
isRecommendWords
:
Boolean
)
{
private
fun
doSearch
(
searchWords
:
String
,
relatedWords
:
String
,
isRecommendWords
:
Boolean
)
{
val
view
=
this
.
currentFocus
if
(
view
!=
null
)
{
val
imm
=
getSystemService
(
Context
.
INPUT_METHOD_SERVICE
)
as
InputMethodManager
imm
.
hideSoftInputFromWindow
(
view
.
windowToken
,
0
)
}
ActionCountUtils
.
count
(
ConsultBIConstants
.
UserMainEvent
.
YDL_USER_SEARCH_CLICK
,
searchWords
)
ActionCountUtils
.
count
(
ConsultBIConstants
.
UserMainEvent
.
YDL_USER_SEARCH_CLICK
,
searchWords
)
if
(!
TextUtils
.
isEmpty
(
searchWords
))
{
historyList
.
remove
(
searchWords
)
historyList
.
add
(
searchWords
)
...
...
@@ -402,7 +424,7 @@ class HotSearchActivity : BaseMvpActivity<IHotSearchContract.View, IHotSearchCon
Gson
().
toJson
(
historyList
)
)
}
ExpertSearchActivity
.
startSearch
(
this
,
searchWords
,
"14"
,
relatedWords
,
isRecommendWords
)
ExpertSearchActivity
.
startSearch
(
this
,
searchWords
,
"14"
,
relatedWords
,
isRecommendWords
)
finish
()
}
...
...
m-consultant/src/main/java/com/yidianling/consultant/ui/view/FilterPopupWindow.kt
View file @
13999763
...
...
@@ -37,7 +37,11 @@ import kotlin.math.roundToInt
* 筛选弹窗
* Created by zqk on 17-9-15.
*/
class
FilterPopupWindow
(
private
val
context
:
Context
,
private
val
filterData
:
Filters
,
private
val
tempFilter
:
AllFilter
)
:
PopupWindow
(
ViewGroup
.
LayoutParams
.
MATCH_PARENT
,
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
)
{
class
FilterPopupWindow
(
private
val
context
:
Context
,
private
val
filterData
:
Filters
,
private
val
tempFilter
:
AllFilter
)
:
PopupWindow
(
ViewGroup
.
LayoutParams
.
MATCH_PARENT
,
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
)
{
private
val
mDisposableList
=
CompositeDisposable
()
...
...
@@ -139,7 +143,6 @@ class FilterPopupWindow(private val context: Context, private val filterData: Fi
tempFilter
.
showType
=
filterData
.
showType
[
0
]
tempFilter
.
ages
.
clear
()
tempFilter
.
doctorEdu
.
clear
()
tempFilter
.
enquiries
.
clear
()
// 擅长人群
tempFilter
.
specialityCrowd
.
clear
()
tempFilter
.
others
.
clear
()
...
...
@@ -158,17 +161,26 @@ class FilterPopupWindow(private val context: Context, private val filterData: Fi
showTypeViews
[
1
].
isSelected
=
true
for
(
v
in
enquiryViews
)
{
v
.
isSelected
=
false
if
(
v
is
TextView
)
{
v
.
paint
.
isFakeBoldText
=
false
val
textView
:
TextView
=
v
.
findViewById
(
R
.
id
.
tvFilterName
)
val
ivIcon
:
ImageView
=
v
.
findViewById
(
R
.
id
.
iv_consultant_method
)
textView
.
paint
.
isFakeBoldText
=
false
tempFilter
.
enquiries
.
forEach
{
if
(
textView
.
text
.
toString
()
==
it
.
value
)
{
Glide
.
with
(
context
)
.
load
(
it
.
unCheckUrl
)
.
into
(
ivIcon
)
}
}
}
tempFilter
.
enquiries
.
clear
()
for
(
v
in
ageViews
)
{
v
.
isSelected
=
false
if
(
v
is
TextView
)
{
v
.
paint
.
isFakeBoldText
=
false
}
}
for
(
v
in
goodAtViews
){
for
(
v
in
goodAtViews
)
{
v
.
isSelected
=
false
v
.
paint
.
isFakeBoldText
=
false
}
...
...
@@ -325,6 +337,7 @@ class FilterPopupWindow(private val context: Context, private val filterData: Fi
fun
addSubscription
(
disposable
:
Disposable
)
{
mDisposableList
.
add
(
disposable
)
}
/**
* 其他选择
* */
...
...
@@ -413,13 +426,13 @@ class FilterPopupWindow(private val context: Context, private val filterData: Fi
if
(
text
==
"展开"
)
{
view
.
tv_crowd_open
.
text
=
"收起"
view
.
iv_crowd_open
.
setImageResource
(
R
.
drawable
.
ic_crowd_close
)
for
(
i
in
20
until
goodAtViews
.
size
){
for
(
i
in
20
until
goodAtViews
.
size
)
{
goodAtViews
[
i
].
visibility
=
View
.
VISIBLE
}
}
else
{
view
.
tv_crowd_open
.
text
=
"展开"
view
.
iv_crowd_open
.
setImageResource
(
R
.
drawable
.
ic_crowd_open
)
for
(
i
in
20
until
goodAtViews
.
size
){
for
(
i
in
20
until
goodAtViews
.
size
)
{
goodAtViews
[
i
].
visibility
=
View
.
GONE
}
}
...
...
@@ -452,7 +465,7 @@ class FilterPopupWindow(private val context: Context, private val filterData: Fi
}
}
if
(
index
>
19
)
{
if
(
index
>
19
)
{
textView
.
visibility
=
View
.
GONE
}
goodAtViews
.
add
(
textView
)
...
...
@@ -460,6 +473,7 @@ class FilterPopupWindow(private val context: Context, private val filterData: Fi
}
}
/**
* 年龄
* */
...
...
@@ -500,6 +514,7 @@ class FilterPopupWindow(private val context: Context, private val filterData: Fi
view
.
flAge
.
addView
(
textView
)
}
}
/**
* 学历
* */
...
...
@@ -545,8 +560,8 @@ class FilterPopupWindow(private val context: Context, private val filterData: Fi
val
mWidth
=
(
popWidth
-
RxImageTool
.
dp2px
(
52f
))
/
enquirySize
for
((
index
,
enquiry
)
in
filterData
.
enquiry
.
withIndex
())
{
val
llLayout
=
View
.
inflate
(
context
,
R
.
layout
.
consultant_method_item_filter
,
null
)
val
textView
:
TextView
=
llLayout
.
findViewById
(
R
.
id
.
tvFilterName
)
val
ivIcon
:
ImageView
=
llLayout
.
findViewById
(
R
.
id
.
iv_consultant_method
)
val
textView
:
TextView
=
llLayout
.
findViewById
(
R
.
id
.
tvFilterName
)
val
ivIcon
:
ImageView
=
llLayout
.
findViewById
(
R
.
id
.
iv_consultant_method
)
val
params
=
FrameLayout
.
LayoutParams
(
mWidth
,
RxImageTool
.
dp2px
(
36f
))
val
marginNum
=
RxImageTool
.
dp2px
(
5f
)
params
.
setMargins
(
...
...
@@ -561,7 +576,7 @@ class FilterPopupWindow(private val context: Context, private val filterData: Fi
.
load
(
enquiry
.
unCheckUrl
)
.
into
(
ivIcon
)
enquiryViews
.
add
(
view
)
enquiryViews
.
add
(
llLayout
)
if
(
tempFilter
.
enquiries
.
contains
(
enquiry
))
{
llLayout
.
isSelected
=
true
textView
.
paint
.
isFakeBoldText
=
true
...
...
m-consultant/src/main/res/layout/consultant_ui_region_popup_window.xml
View file @
13999763
...
...
@@ -6,7 +6,7 @@
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/rvRegion"
android:layout_width=
"
wrap_content
"
android:layout_width=
"
0dp
"
android:layout_height=
"match_parent"
android:background=
"@color/platform_white"
android:layout_weight=
"1"
...
...
@@ -15,7 +15,7 @@
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/rvSub"
android:layout_width=
"
wrap_content
"
android:layout_width=
"
0dp
"
android:layout_height=
"match_parent"
android:background=
"@color/platform_color_F7F7F7"
android:layout_weight=
"2"
...
...
m-dynamic/src/main/java/com/yidianling/dynamic/members/MembersActivity.java
View file @
13999763
...
...
@@ -137,7 +137,7 @@ public class MembersActivity extends BaseActivity implements View.OnClickListene
initListeners
();
// initDatas();
setTabSelection
(
0
);
StatusBarUtils
.
Companion
.
setCustomStatusView
(
this
,
members_title_rel
,
true
);
StatusBarUtils
.
Companion
.
setCustomStatusView
ForMembers
(
this
,
members_title_rel
,
true
);
}
private
void
initEvent
()
{
...
...
m-dynamic/src/main/java/com/yidianling/dynamic/trendList/TrendsListFragment.kt
View file @
13999763
...
...
@@ -37,6 +37,7 @@ import com.yidianling.dynamic.trendList.adapter.RecommendTopicListAdapter
import
com.yidianling.dynamic.trendList.adapter.TrendsListAdapter
import
com.yidianling.dynamic.trendList.adapter.TrendsListAdapter.FOOTER_STATE_NO_DATA
import
com.yidianling.dynamic.trendList.adapter.TrendsListAdapter.FOOTRE_STATE_LOAD_MORE
import
com.yidianling.dynamic.trendList.adapter.TrendsListAdapter.FOOTRE_STATE_INIT
import
com.yidianling.dynamic.trendsDetail.TrendsDetailActivity
import
com.yidianling.dynamic.trendsHome.TrendsHomeFragment
import
io.reactivex.android.schedulers.AndroidSchedulers
...
...
@@ -428,17 +429,13 @@ class TrendsListFragment : BaseLazyFragment(), ITrendsListView,
if
(
trend_list_no_datas_rel
!!
.
visibility
!=
View
.
GONE
)
{
trend_list_no_datas_rel
!!
.
visibility
=
View
.
GONE
}
if
(
cdl
!!
.
visibility
!=
View
.
VISIBLE
)
{
cdl
!!
.
visibility
=
View
.
VISIBLE
}
}
private
fun
showErrorView
()
{
if
(
page
==
1
)
{
cdl
!!
.
visibility
=
View
.
GONE
trend_list_no_datas_rel
!!
.
visibility
=
View
.
VISIBLE
}
else
{
cdl
!!
.
visibility
=
View
.
VISIBLE
trend_list_no_datas_rel
!!
.
visibility
=
View
.
GONE
}
}
...
...
@@ -590,8 +587,11 @@ class TrendsListFragment : BaseLazyFragment(), ITrendsListView,
}
else
{
LogUtil
.
i
(
"get datas no more data$data"
)
trendsDatas
!!
.
addAll
(
data
)
if
(
trendsDatas
==
null
||
trendsDatas
!!
.
size
<=
0
)
{
cdl
!!
.
visibility
=
View
.
GONE
if
(
trendsDatas
==
null
||
trendsDatas
!!
.
size
==
0
)
{
mRcvAdapter
!!
.
setDatas
(
trendsDatas
,
FOOTRE_STATE_INIT
)
if
(
page
==
1
)
{
mRcvAdapter
!!
.
notifyDataSetChanged
()
}
trend_list_no_datas_rel
!!
.
visibility
=
View
.
VISIBLE
return
}
...
...
m-dynamic/src/main/res/layout/dynamic_fragment_trends_list.xml
View file @
13999763
<?xml version="1.0" encoding="utf-8"?>
<com.ydl.ydlcommon.view.widgets.MultiSwipeRefreshLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<com.ydl.ydlcommon.view.widgets.MultiSwipeRefreshLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:id=
"@+id/trends_lastr_swl"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
<
Linea
rLayout
<
androidx.coordinatorlayout.widget.Coordinato
rLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_alignParentLeft=
"true"
android:layout_alignParentStart=
"true"
android:layout_alignParentTop=
"true"
android:orientation=
"vertical"
android:background=
"@color/dynamic_white"
>
<androidx.
coordinatorlayout.widget.CoordinatorLayout
android:id=
"@+id/
cdl
"
<androidx.
recyclerview.widget.RecyclerView
android:id=
"@+id/
trends_rcv
"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/trends_rcv"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/dynamic_f5f5f5"
android:descendantFocusability=
"blocksDescendants"
app:layout_behavior=
"@string/appbar_scrolling_view_behavior"
/>
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id=
"@+id/image_scroll_top"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginBottom=
"85dp"
android:layout_marginRight=
"28dp"
android:padding=
"0dp"
android:background=
"@color/dynamic_white"
android:src=
"@drawable/dynamic_newsfeed_top"
android:visibility=
"visible"
app:backgroundTint=
"@color/dynamic_white"
app:borderWidth=
"0dp"
app:fabSize=
"mini"
android:scaleType=
"center"
app:layout_anchor=
"@+id/trends_rcv"
app:layout_anchorGravity=
"bottom|right|end"
app:layout_behavior=
"com.yidianling.dynamic.common.behavior.ScrollAwareFABBehavior"
/>
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id=
"@+id/recommend_trend_add_iv"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginBottom=
"20dp"
android:layout_marginRight=
"20dp"
android:background=
"@color/platform_main_theme"
android:elevation=
"3dp"
android:padding=
"0dp"
android:src=
"@drawable/dynamic_newsfeed_new2"
app:backgroundTint=
"@color/platform_main_theme"
app:borderWidth=
"0dp"
app:fabSize=
"normal"
app:layout_anchor=
"@+id/trends_rcv"
app:layout_anchorGravity=
"bottom|right|end"
/>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
android:layout_height=
"match_parent"
android:background=
"@color/dynamic_f5f5f5"
android:descendantFocusability=
"blocksDescendants"
app:layout_behavior=
"@string/appbar_scrolling_view_behavior"
/>
<RelativeLayout
android:id=
"@+id/trend_list_no_datas_rel"
...
...
@@ -77,7 +31,7 @@
android:layout_width=
"100dp"
android:layout_height=
"100dp"
android:layout_centerHorizontal=
"true"
android:src=
"@drawable/dynamic_blank"
/>
android:src=
"@drawable/dynamic_blank"
/>
<TextView
android:layout_width=
"wrap_content"
...
...
@@ -86,11 +40,44 @@
android:layout_centerHorizontal=
"true"
android:layout_marginTop=
"15dp"
android:text=
"暂无相关记录~"
android:textColor=
"@color/dynamic_text_gray"
/>
android:textColor=
"@color/dynamic_text_gray"
/>
</RelativeLayout>
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id=
"@+id/image_scroll_top"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginRight=
"28dp"
android:layout_marginBottom=
"85dp"
android:background=
"@color/dynamic_white"
android:padding=
"0dp"
android:scaleType=
"center"
android:src=
"@drawable/dynamic_newsfeed_top"
android:visibility=
"visible"
app:backgroundTint=
"@color/dynamic_white"
app:borderWidth=
"0dp"
app:fabSize=
"mini"
app:layout_anchor=
"@+id/trends_rcv"
app:layout_anchorGravity=
"bottom|right|end"
app:layout_behavior=
"com.yidianling.dynamic.common.behavior.ScrollAwareFABBehavior"
/>
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id=
"@+id/recommend_trend_add_iv"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginRight=
"20dp"
android:layout_marginBottom=
"20dp"
android:background=
"@color/platform_main_theme"
android:elevation=
"3dp"
android:padding=
"0dp"
android:src=
"@drawable/dynamic_newsfeed_new2"
app:backgroundTint=
"@color/platform_main_theme"
app:borderWidth=
"0dp"
app:fabSize=
"normal"
app:layout_anchor=
"@+id/trends_rcv"
app:layout_anchorGravity=
"bottom|right|end"
/>
</
Linea
rLayout>
</
androidx.coordinatorlayout.widget.Coordinato
rLayout>
</com.ydl.ydlcommon.view.widgets.MultiSwipeRefreshLayout>
</com.ydl.ydlcommon.view.widgets.MultiSwipeRefreshLayout>
\ No newline at end of file
m-home/src/ydl/java/com/yidianling/home/ui/fragment/YdlHomeFragment.kt
View file @
13999763
...
...
@@ -176,7 +176,13 @@ open class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterIm
if
(!
TextUtils
.
isEmpty
(
doctorName
))
{
searchText
=
doctorName
}
home_tv
.
setOnClickListener
{
homeEvent
?.
searchTvClick
(
searchText
)
}
home_tv
.
setOnClickListener
{
homeEvent
?.
searchTvClick
(
searchText
)
}
iv_search_icon
.
setOnClickListener
{
homeEvent
?.
searchTvClick
(
searchText
)
}
home_tv
.
text
=
searchText
}
...
...
m-home/src/ydl/res/layout/home_fragment.xml
View file @
13999763
...
...
@@ -154,10 +154,10 @@
<ImageView
android:id=
"@+id/iv_search_icon"
android:layout_width=
"
12dp
"
android:layout_height=
"
12dp
"
android:layout_width=
"
@dimen/platform_dp_26
"
android:layout_height=
"
@dimen/platform_dp_14
"
android:layout_gravity=
"center_vertical"
android:
layout_margin
Left=
"12dp"
android:
padding
Left=
"12dp"
android:src=
"@drawable/home_icon_search"
/>
<TextView
...
...
m-im/src/main/java/com/yidianling/im/ui/adapter/MsgListAdapter.java
View file @
13999763
...
...
@@ -14,6 +14,7 @@ import com.ydl.ydlcommon.base.lifecycle.ILifecycleable;
import
com.ydl.ydlcommon.data.http.RxUtils
;
import
com.ydl.ydlcommon.data.http.ThrowableConsumer
;
import
com.ydl.ydlcommon.utils.StringUtils
;
import
com.ydl.ydlcommon.utils.Utils
;
import
com.ydl.ydlcommon.utils.remind.ToastHelper
;
import
com.yidianling.im.bean.MsgData
;
import
com.yidianling.im.config.constants.ImConstants
;
...
...
@@ -64,6 +65,9 @@ public class MsgListAdapter extends CommonAdapter<MsgData> {
}
((
MsgListItemView
)
convertView
).
setData
(
mDataList
.
get
(
position
));
convertView
.
setOnClickListener
(
v
->
{
if
(
Utils
.
isFastClick
())
{
return
;
}
//动态消息暂时不需要访问以下接口
boolean
fla
=
false
;
//判断是否是跳转专家主页
...
...
m-im/src/main/java/com/yidianling/uikit/business/session/fragment/YDLMessageFragment.java
View file @
13999763
...
...
@@ -6,6 +6,7 @@ import android.animation.ValueAnimator;
import
android.annotation.SuppressLint
;
import
android.content.Intent
;
import
android.graphics.Color
;
import
android.graphics.drawable.Drawable
;
import
android.media.AudioManager
;
import
android.os.Bundle
;
import
android.os.Handler
;
...
...
@@ -50,6 +51,7 @@ import com.ydl.ydlcommon.modular.ModularServiceManager;
import
com.ydl.ydlcommon.utils.AnimUtils
;
import
com.ydl.ydlcommon.utils.LogUtil
;
import
com.ydl.ydlcommon.utils.SharedPreferencesEditor
;
import
com.ydl.ydlcommon.utils.Utils
;
import
com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
;
import
com.ydl.ydlcommon.utils.log.AliYunLogConfig
;
import
com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper
;
...
...
@@ -185,6 +187,7 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
private
TextView
tv_all_comment_desc
;
private
ImageView
tv_all_comment_go
;
private
ImCommentBannerView
comment_banner_view
;
private
TextView
tvCommentCount
;
private
ImRedStarGradeView
good_num_icons
;
...
...
@@ -259,8 +262,9 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
top_expert_info_ll
=
rootView
.
findViewById
(
R
.
id
.
top_expert_info_ll
);
top_expert_info_cl
=
rootView
.
findViewById
(
R
.
id
.
top_expert_info_cl
);
comment_banner_view_ll
=
rootView
.
findViewById
(
R
.
id
.
comment_banner_view_ll
);
tv_all_comment_desc
=
rootView
.
findViewById
(
R
.
id
.
tv_all_comment_desc
);
tv_all_comment_go
=
rootView
.
findViewById
(
R
.
id
.
tv_all_comment_go
);
tvCommentCount
=
rootView
.
findViewById
(
R
.
id
.
tv_comment_count
);
comment_banner_view
=
rootView
.
findViewById
(
R
.
id
.
comment_banner_view
);
messageListView
=
rootView
.
findViewById
(
R
.
id
.
messageListView
);
// 消息列表
top_view_container
=
rootView
.
findViewById
(
R
.
id
.
top_view_container
);
// 消息列表
...
...
@@ -851,13 +855,24 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
}
int
commentCounter
=
ActionHandlerStorage
.
getL
(
sessionId
).
getInfo
().
commentCounter
;
tv_all_comment_desc
.
setText
(
String
.
valueOf
(
commentCounter
));
String
commentCountInfo
=
String
.
format
(
"评价(%d)"
,
commentCounter
);
tvCommentCount
.
setText
(
commentCountInfo
);
Drawable
drawable
=
getResources
().
getDrawable
(
R
.
drawable
.
platform_right_arrow
);
drawable
.
setBounds
(
0
,
0
,
36
,
36
);
tvCommentCount
.
setCompoundDrawables
(
null
,
null
,
drawable
,
null
);
tvCommentCount
.
setCompoundDrawablePadding
(
4
);
H5Params
params
=
new
H5Params
(
ActionHandlerStorage
.
getL
(
sessionId
).
getInfo
().
commentCounterUrl
,
""
);
View
.
OnClickListener
onClickListener
=
v
->
NewH5Activity
.
start
(
getActivity
(),
params
);
tv_all_comment_desc
.
setOnClickListener
(
onClickListener
);
tv_all_comment_go
.
setOnClickListener
(
onClickListener
);
View
.
OnClickListener
onClickListener
=
v
->
{
if
(
Utils
.
isFastClick
())
{
return
;
}
ActionCountUtils
.
Companion
.
baiDuCountSign3
(
"chat_page"
,
"evaluate_lick_click"
,
""
,
""
,
""
);
NewH5Activity
.
start
(
getActivity
(),
params
);
};
tvCommentCount
.
setOnClickListener
(
onClickListener
);
comment_banner_view
.
initData
(
ActionHandlerStorage
.
getL
(
sessionId
).
getInfo
().
commentList
);
...
...
m-im/src/main/res_uikit/layout/im_ydl_nim_message_fragment.xml
View file @
13999763
...
...
@@ -315,50 +315,15 @@
android:layout_weight=
"1"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:lines=
"1"
android:text=
"评价"
android:textColor=
"@color/platform_main_theme"
android:textSize=
"12dp"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:layout_marginBottom=
"1dp"
android:lines=
"1"
android:text=
"("
android:textColor=
"@color/platform_main_theme"
android:textSize=
"12dp"
/>
<TextView
android:id=
"@+id/tv_all_comment_desc"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:lines=
"1"
android:textColor=
"@color/platform_main_theme"
android:textSize=
"12dp"
tools:text=
"18714"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:layout_marginBottom=
"1dp"
android:lines=
"1"
android:text=
")"
android:textColor=
"@color/platform_main_theme"
android:textSize=
"12dp"
/>
<ImageView
android:id=
"@+id/tv_all_comment_go"
android:layout_width=
"18dp"
android:layout_height=
"18dp"
android:layout_gravity=
"center"
android:src=
"@drawable/platform_right_arrow"
/>
android:id=
"@+id/tv_comment_count"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:gravity=
"center_vertical"
android:lines=
"1"
android:textColor=
"@color/platform_main_theme"
android:textSize=
"12sp"
tools:text=
"评价(10086)"
/>
</LinearLayout>
...
...
m-muse/src/main/java/com/yidianling/muse/activity/PlayMeditationActivity.kt
View file @
13999763
package
com.yidianling.muse.activity
//import com.yidianling.muse.dialog.ChooseMusicDialog
import
android.content.Intent
import
android.media.MediaPlayer
import
android.os.Bundle
...
...
@@ -17,6 +16,7 @@ import com.ydl.ydlcommon.base.BaseActivity
import
com.ydl.ydlcommon.data.http.ThrowableConsumer
import
com.ydl.ydlcommon.event.MeditationEvent
import
com.ydl.ydlcommon.modular.ModularServiceManager
import
com.ydl.ydlcommon.utils.LogUtil
import
com.ydl.ydlcommon.utils.Utils
import
com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import
com.ydl.ydlcommon.utils.remind.ToastHelper.Companion.show
...
...
@@ -58,6 +58,11 @@ class PlayMeditationActivity : BaseActivity() {
private
var
mMediaUrl
=
""
private
var
mMediaCoverUrl
=
""
private
var
mMinProgramId
:
String
?
=
null
private
var
mCateId
:
Int
?
=
null
private
var
mTagId
:
String
?
=
null
private
var
mMark
:
Int
?
=
null
private
var
mTitle
=
""
private
var
mDesc
=
""
private
var
mStatus
=
0
...
...
@@ -90,6 +95,11 @@ class PlayMeditationActivity : BaseActivity() {
private
var
mBuried
:
String
?
=
null
private
var
mVideoId
:
String
?
=
null
private
var
mIndexForMini
=
0
private
var
mMinProgramPath
:
String
?
=
null
/**
* 传递过来的mediaId 用于判断正在播放的是否是同一条音频
*/
...
...
@@ -139,6 +149,11 @@ class PlayMeditationActivity : BaseActivity() {
val
module
=
it
.
data
mMediaId
=
module
.
mediaId
mMinProgramId
=
module
.
minProgramId
mCateId
=
module
.
cateId
mTagId
=
module
.
tagId
mMark
=
module
.
mark
meditations
.
clear
()
module
.
mediaList
?.
forEach
{
meditationPlayBean
->
...
...
@@ -148,7 +163,10 @@ class PlayMeditationActivity : BaseActivity() {
if
(
meditationPlayBean
.
mediaId
==
mMediaId
)
{
currentMeditation
=
meditationPlayBean
.
copy
(
meditationType
=
mMeditationType
,
meditationId
=
mMeditationId
!!
)
meditationPlayBean
.
copy
(
meditationType
=
mMeditationType
,
meditationId
=
mMeditationId
!!
)
mMediaId
=
module
?.
mediaId
?:
0L
mTitle
=
meditationPlayBean
.
title
...
...
@@ -168,56 +186,28 @@ class PlayMeditationActivity : BaseActivity() {
collected
=
mStatus
==
1
mVideoId
=
meditationPlayBean
.
videoId
mIndexForMini
=
0
updateUI
()
initMediaPlayer
(
mMediaUrl
,
currentPosition
,
mMediaIdFromLocal
==
mMediaId
)
formatMiniPath
()
initMediaPlayer
(
mMediaUrl
,
currentPosition
,
mMediaIdFromLocal
==
mMediaId
)
}
}
// mediaListLink = module.playDetailUrl?:""
//
// val mediaList = module.mediaList
// if(!mediaList.isNullOrEmpty()){
// val meditation = mediaList[0]
//
//
//
// currentMeditation = meditation.copy(meditationType = mMeditationType,meditationId = mMeditationId!!)
// mTitle = meditation.title
// mDesc = meditation.desc?:""
// mMediaUrl = meditation.mediaUrl
// mMediaCoverUrl = meditation.coverImageUrl
// val currentPosition = meditation.broadcastTime
// mBusinessType = meditation.businessType
// mBuried = meditation.buried
// mStatus = meditation.status
//
// collected = mStatus == 1
//
// updateUI()
//
// initMediaPlayer(
// mMediaUrl,
// currentPosition,
// mMediaIdFromLocal == mMediaId
// )
//
// //快进点击事件
// ActionCountUtils.baiDuCountSign3(
// MuseBIConstants.YDL_MUSE_MEDITATION_MUSIC_PLAY_PAGE,
// MuseBIConstants.YDL_MUSE_PLAY_PAGE_VISIT,
// currentMeditation?.title ?: "",
// mBuried ?: "",
// ""
// )
// }
}
},
object
:
ThrowableConsumer
()
{
override
fun
accept
(
msg
:
String
)
{
show
(
msg
)
}
})
}
else
{
}
else
{
MuseHttp
.
getInstance
().
getMeditationPlayDetail
(
meditionType
=
1
,
mediaId
=
mMediaIdFromLocal
!!
,
...
...
@@ -231,17 +221,26 @@ class PlayMeditationActivity : BaseActivity() {
val
module
=
it
.
data
mMediaId
=
module
.
mediaId
mMinProgramId
=
module
.
minProgramId
mCateId
=
module
.
cateId
mTagId
=
module
.
tagId
mMark
=
module
.
mark
meditations
.
clear
()
module
.
mediaList
?.
forEach
{
meditationPlayBean
->
module
.
mediaList
?.
forEach
Indexed
{
index
,
meditationPlayBean
->
meditations
.
add
(
meditationPlayBean
)
if
(
meditationPlayBean
.
mediaId
==
mMediaId
)
{
mIndexForMini
=
index
currentMeditation
=
meditationPlayBean
.
copy
(
meditationType
=
mMeditationType
,
meditationId
=
mMeditationId
!!
)
meditationPlayBean
.
copy
(
meditationType
=
mMeditationType
,
meditationId
=
mMeditationId
!!
)
mMediaId
=
module
?.
mediaId
?:
0L
mTitle
=
meditationPlayBean
.
title
...
...
@@ -261,9 +260,17 @@ class PlayMeditationActivity : BaseActivity() {
collected
=
mStatus
==
1
mVideoId
=
meditationPlayBean
.
videoId
formatMiniPath
()
updateUI
()
initMediaPlayer
(
mMediaUrl
,
currentPosition
,
mMediaIdFromLocal
==
mMediaId
)
initMediaPlayer
(
mMediaUrl
,
currentPosition
,
mMediaIdFromLocal
==
mMediaId
)
}
}
}
...
...
@@ -322,7 +329,7 @@ class PlayMeditationActivity : BaseActivity() {
""
)
if
(!
mediaListLink
.
isNullOrBlank
())
{
ChooseMusicActivity
.
launch
(
this
,
H5Params
(
mediaListLink
,
""
)
)
ChooseMusicActivity
.
launch
(
this
,
H5Params
(
mediaListLink
,
""
)
)
}
}
...
...
@@ -392,7 +399,7 @@ class PlayMeditationActivity : BaseActivity() {
""
)
if
(
mMeditationType
==
0
)
{
if
(
mMeditationType
==
0
)
{
if
(
mMeditationId
!=
null
&&
mMediaId
!=
null
)
{
MediaPlayerTimeUtil
.
uploadPlayRecord
(
meditationId
=
mMeditationId
!!
.
toInt
(),
...
...
@@ -407,7 +414,7 @@ class PlayMeditationActivity : BaseActivity() {
finish
()
}
}
else
{
}
else
{
if
(
quitDialog
==
null
)
{
quitDialog
=
QuitMeditationDialog
.
newInstance
()
}
...
...
@@ -441,9 +448,13 @@ class PlayMeditationActivity : BaseActivity() {
mBuried
?:
""
,
""
)
val
event
=
MeditationFloatEvent
(
true
,
meditation
=
currentMeditation
?.
copy
(
meditationType
=
mMeditationType
,
meditationId
=
mMeditationId
?:
0
))
val
event
=
MeditationFloatEvent
(
true
,
meditation
=
currentMeditation
?.
copy
(
meditationType
=
mMeditationType
,
meditationId
=
mMeditationId
?:
0
)
)
EventBus
.
getDefault
().
post
(
event
)
Handler
().
postDelayed
({
...
...
@@ -466,13 +477,15 @@ class PlayMeditationActivity : BaseActivity() {
shareTitle
=
mTitle
,
shareContent
=
mDesc
,
shareUrl
=
mMediaUrl
,
shareImageUrl
=
mMediaCoverUrl
shareImageUrl
=
mMediaCoverUrl
,
miniId
=
"gh_c154608001f0"
,
// miniId = mMinProgramId!!,
miniPath
=
mMinProgramPath
!!
)
}
if
(
shareDialog
!=
null
&&
shareDialog
?.
isAdded
==
false
)
{
shareDialog
?.
show
(
supportFragmentManager
,
ShareMeditationDialog
.
TAG
)
}
}
iv_time_off
.
setOnClickListener
{
...
...
@@ -485,7 +498,7 @@ class PlayMeditationActivity : BaseActivity() {
""
)
val
intent
=
Intent
(
this
,
MeditationTimeOffActivity
::
class
.
java
)
intent
.
putExtra
(
"BG_IMAGE_URL"
,
mMediaCoverUrl
)
intent
.
putExtra
(
"BG_IMAGE_URL"
,
mMediaCoverUrl
)
startActivityForResult
(
intent
,
request_code
)
}
...
...
@@ -499,7 +512,7 @@ class PlayMeditationActivity : BaseActivity() {
""
)
val
intent
=
Intent
(
this
,
MeditationTimeOffActivity
::
class
.
java
)
intent
.
putExtra
(
"BG_IMAGE_URL"
,
mMediaCoverUrl
)
intent
.
putExtra
(
"BG_IMAGE_URL"
,
mMediaCoverUrl
)
startActivityForResult
(
intent
,
request_code
)
}
...
...
@@ -578,7 +591,7 @@ class PlayMeditationActivity : BaseActivity() {
)
var
currentPosition
=
0
meditations
?.
forEachIndexed
{
index
,
meditationDetail
->
if
(
meditationDetail
.
mediaId
==
mMediaId
){
if
(
meditationDetail
.
mediaId
==
mMediaId
)
{
currentPosition
=
index
}
}
...
...
@@ -595,17 +608,22 @@ class PlayMeditationActivity : BaseActivity() {
)
val
meditation
=
meditations
[
currentPosition
-
1
]
currentMeditation
=
meditation
.
copy
(
meditationId
=
mMeditationId
!!
)
mMediaId
=
meditation
.
mediaId
mMediaCoverUrl
=
meditation
.
coverImageUrl
mMediaUrl
=
meditation
.
mediaUrl
val
currentPosition
=
meditation
.
broadcastTime
mStatus
=
meditation
.
status
mTitle
=
meditation
.
title
mDesc
=
meditation
.
title
mVideoId
=
meditation
.
videoId
mIndexForMini
=
currentPosition
-
1
formatMiniPath
()
updateUI
(
needRefresh
=
false
)
initMediaPlayer
(
mMediaUrl
,
0
,
mMediaIdFromLocal
==
mMediaId
)
...
...
@@ -627,7 +645,7 @@ class PlayMeditationActivity : BaseActivity() {
)
var
currentPosition
=
0
meditations
?.
forEachIndexed
{
index
,
meditationDetail
->
if
(
meditationDetail
.
mediaId
==
mMediaId
){
if
(
meditationDetail
.
mediaId
==
mMediaId
)
{
currentPosition
=
index
}
}
...
...
@@ -650,11 +668,15 @@ class PlayMeditationActivity : BaseActivity() {
mMediaId
=
meditation
.
mediaId
mMediaCoverUrl
=
meditation
.
coverImageUrl
mMediaUrl
=
meditation
.
mediaUrl
val
currentPosition
=
meditation
.
broadcastTime
mStatus
=
meditation
.
status
mTitle
=
meditation
.
title
mDesc
=
meditation
.
title
mVideoId
=
meditation
.
videoId
mIndexForMini
=
currentPosition
+
1
formatMiniPath
()
updateUI
(
needRefresh
=
false
)
...
...
@@ -743,10 +765,11 @@ class PlayMeditationActivity : BaseActivity() {
})
val
isLoop
=
MediaPlayerManager
.
getInstance
(
this
@PlayMeditationActivity
)
?.
getTimeOffStatus
()
==
true
val
isLoop
=
MediaPlayerManager
.
getInstance
(
this
@PlayMeditationActivity
)
?.
getTimeOffStatus
()
==
true
initPlayCompletionListener
(
isLoop
=
isLoop
)
MeditationFloatPermissionUtil
.
checkSuspendedWindowPermission
(
this
){
MeditationFloatPermissionUtil
.
checkSuspendedWindowPermission
(
this
)
{
}
...
...
@@ -756,9 +779,9 @@ class PlayMeditationActivity : BaseActivity() {
mMediaPlayer
?.
setOnCompletionListener
{
val
duration
=
currentMeditation
?.
duration
?.
toInt
()
?:
0
val
currentDuration
=
(
mMediaPlayer
?.
currentPosition
?:
0
)/
1000
if
(
currentDuration
==
duration
)
{
val
duration
=
currentMeditation
?.
duration
?.
toInt
()
?:
0
val
currentDuration
=
(
mMediaPlayer
?.
currentPosition
?:
0
)
/
1000
if
(
currentDuration
==
duration
)
{
val
playTime
=
(
seekbar_play_progress
.
progress
/
1000.00
).
roundToInt
()
MediaPlayerTimeUtil
.
uploadPlayRecord
(
...
...
@@ -770,13 +793,12 @@ class PlayMeditationActivity : BaseActivity() {
)
}
if
(
isLoop
){
if
(
isSingle
||
meditations
.
size
==
1
){
switchSound
()
// MediaPlayerManager.getInstance(this)?.setAudioPath(mMediaUrl)
}
else
{
switchSound
()
}
if
(
isLoop
)
{
if
(
isSingle
||
meditations
.
size
==
1
)
{
switchSound
()
}
else
{
switchSound
()
}
}
isPlaying
=
if
(
it
.
isPlaying
)
{
...
...
@@ -796,18 +818,20 @@ class PlayMeditationActivity : BaseActivity() {
}
private
fun
switchSound
(){
var
meditation
:
MeditationPlayModuleBean
.
MeditationDetail
?
=
null
private
fun
switchSound
()
{
var
meditation
:
MeditationPlayModuleBean
.
MeditationDetail
?
=
null
meditations
?.
forEachIndexed
{
index
,
meditationDetail
->
if
(
meditationDetail
.
mediaId
==
mMediaId
){
if
(
meditationDetail
.
mediaId
==
mMediaId
)
{
currentMeditationIndex
=
index
}
}
if
(
mMeditationId
==
null
||
mMediaId
==
null
)
return
if
(
currentMeditationIndex
<
meditations
.
size
-
1
)
{
meditation
=
meditations
[
currentMeditationIndex
+
1
]
mIndexForMini
=
currentMeditationIndex
+
1
}
else
{
meditation
=
meditations
[
0
]
mIndexForMini
=
0
}
currentMeditation
=
meditation
.
copy
(
meditationId
=
mMeditationId
!!
)
...
...
@@ -819,6 +843,10 @@ class PlayMeditationActivity : BaseActivity() {
mTitle
=
meditation
.
title
mDesc
=
meditation
.
title
mVideoId
=
meditation
.
videoId
formatMiniPath
()
updateUI
(
needRefresh
=
false
)
initMediaPlayer
(
mMediaUrl
,
0
,
mMediaIdFromLocal
==
mMediaId
)
...
...
@@ -826,7 +854,7 @@ class PlayMeditationActivity : BaseActivity() {
private
fun
initMediaPlayer
(
path
:
String
,
current
:
Int
,
isSameOne
:
Boolean
=
false
)
{
if
(
MediaPlayerManager
.
getInstance
(
this
)
?.
getAudioPath
()
!=
null
&&
if
(
MediaPlayerManager
.
getInstance
(
this
)
?.
getAudioPath
()
!=
null
&&
MediaPlayerManager
.
getInstance
(
this
)
?.
getMediaId
()
==
mMediaId
)
{
if
(
mMediaPlayer
?.
isPlaying
==
true
)
{
...
...
@@ -888,7 +916,8 @@ class PlayMeditationActivity : BaseActivity() {
mTimer
.
schedule
(
object
:
TimerTask
()
{
override
fun
run
()
{
if
(!
isSeekbarChanging
)
{
seekbar_play_progress
.
progress
=
mMediaPlayer
?.
currentPosition
?:
0
seekbar_play_progress
.
progress
=
mMediaPlayer
?.
currentPosition
?:
0
}
}
},
0
,
50
)
...
...
@@ -921,7 +950,7 @@ class PlayMeditationActivity : BaseActivity() {
MediaPlayerManager
.
getInstance
(
this
)
?.
setTimeOffStatus
(
true
)
initRxTimeOff
((
minute
*
60
*
1000
).
toLong
(),
1
)
}
val
event
=
MeditationFloatEvent
(
false
,
time
=
(
minute
*
60
*
1000
).
toLong
())
val
event
=
MeditationFloatEvent
(
false
,
time
=
(
minute
*
60
*
1000
).
toLong
())
EventBus
.
getDefault
().
post
(
event
)
}
else
{
initPlayCompletionListener
()
...
...
@@ -931,13 +960,13 @@ class PlayMeditationActivity : BaseActivity() {
tv_time_off
.
visibility
=
View
.
GONE
tv_time_off_pure_music
.
visibility
=
View
.
GONE
mMediaPlayer
?.
isLooping
=
false
val
event
=
MeditationFloatEvent
(
false
,
time
=
0
)
val
event
=
MeditationFloatEvent
(
false
,
time
=
0
)
EventBus
.
getDefault
().
post
(
event
)
}
}
}
private
fun
updateUI
(
needRefresh
:
Boolean
=
true
)
{
private
fun
updateUI
(
needRefresh
:
Boolean
=
true
)
{
tv_title
.
text
=
mTitle
tv_content
.
text
=
mDesc
Glide
.
with
(
this
)
...
...
@@ -952,10 +981,10 @@ class PlayMeditationActivity : BaseActivity() {
}
)
if
(
needRefresh
)
{
if
(
MediaPlayerManager
.
getInstance
(
this
)
?.
getTimeOffStatus
()
==
true
)
{
if
(
needRefresh
)
{
if
(
MediaPlayerManager
.
getInstance
(
this
)
?.
getTimeOffStatus
()
==
true
)
{
val
timeOff
=
MediaPlayerManager
.
getInstance
(
this
)
?.
getTimeOff
()
if
(
timeOff
!=
null
&&
timeOff
>
0
&&
mMeditationType
!=
null
)
{
if
(
timeOff
!=
null
&&
timeOff
>
0
&&
mMeditationType
!=
null
)
{
initRxTimeOff
(
timeOff
,
mMeditationType
!!
)
}
}
...
...
@@ -1064,4 +1093,10 @@ class PlayMeditationActivity : BaseActivity() {
const
val
request_code
=
0
x0001
}
private
fun
formatMiniPath
()
{
mMinProgramPath
=
"/pages/player/index?share=1&meditationId=${mMeditationId}"
+
"&meditionType=${mMeditationType}&mediaId=${mMediaId}&collectStatus=${mStatus}&index=${mIndexForMini}&videoId=${mVideoId}&cateId=${mCateId}&mark=${mMark}&tagId=${mTagId}"
LogUtil
.
d
(
"Lancet======"
,
mMinProgramPath
)
}
}
\ No newline at end of file
m-muse/src/main/java/com/yidianling/muse/bean/MeditationPlayModuleBean.kt
View file @
13999763
...
...
@@ -5,32 +5,37 @@ package com.yidianling.muse.bean
* Created by xj on 2019/9/16.
*/
class
MeditationPlayModuleBean
:
HomeItemBaseBean
{
constructor
()
:
super
(
false
)
constructor
(
isRealEmpty
:
Boolean
):
super
(
isRealEmpty
)
constructor
()
:
super
(
false
)
constructor
(
isRealEmpty
:
Boolean
)
:
super
(
isRealEmpty
)
var
meditationId
:
Long
?
=
null
var
mediaId
:
Long
?
=
null
var
mediaType
:
Int
?=
null
var
playDetailUrl
:
String
?
=
null
var
meditationId
:
Long
?
=
null
var
mediaId
:
Long
?
=
null
var
mediaType
:
Int
?
=
null
var
playDetailUrl
:
String
?
=
null
val
minProgramId
:
String
?
=
null
val
cateId
:
Int
?
=
null
val
tagId
:
String
?
=
null
val
mark
:
Int
?
=
null
var
mediaList
:
ArrayList
<
MeditationDetail
>?
=
null
data class
MeditationDetail
(
val
meditationType
:
Int
?
=
null
,
val
mediaId
:
Long
?=
null
,
val
meditationId
:
Long
,
val
title
:
String
,
val
author
:
String
,
val
coverImageUrl
:
String
,
val
mediaUrl
:
String
,
val
duration
:
Float
?=
null
,
val
status
:
Int
,
val
broadcastTime
:
Int
,
val
businessType
:
Int
,
val
buried
:
String
?=
null
,
val
desc
:
String
?=
null
,
val
coverImageUrlIcon
:
String
)
val
meditationType
:
Int
?
=
null
,
val
mediaId
:
Long
?
=
null
,
val
meditationId
:
Long
,
val
title
:
String
,
val
author
:
String
,
val
coverImageUrl
:
String
,
val
mediaUrl
:
String
,
val
duration
:
Float
?
=
null
,
val
status
:
Int
,
val
broadcastTime
:
Int
,
val
businessType
:
Int
,
val
buried
:
String
?
=
null
,
val
desc
:
String
?
=
null
,
val
coverImageUrlIcon
:
String
,
val
videoId
:
String
?
=
null
)
override
fun
toString
():
String
{
return
"MeditationPlayModuleBean(meditationId=$meditationId, mediaId=$mediaId, mediaType=$mediaType, playDetailUrl=$playDetailUrl, mediaList=$mediaList)"
...
...
m-muse/src/main/java/com/yidianling/muse/widget/ShareMeditationDialog.kt
View file @
13999763
...
...
@@ -60,10 +60,12 @@ class ShareMeditationDialog : DialogFragment() {
private
fun
initView
(
view
:
View
?)
{
val
shareImageUrl
=
arguments
?.
getString
(
KEY_SHARE_IMAGE_URL
)
?:
""
val
shareTitle
=
arguments
?.
getString
(
KEY_SHARE_TITLE
)
?:
""
val
shareContent
=
arguments
?.
getString
(
KEY_SHARE_CONTENT
)
?:
""
val
shareUrl
=
arguments
?.
getString
(
KEY_SHARE_URL
)
?:
""
val
shareImageUrl
=
arguments
?.
getString
(
KEY_SHARE_IMAGE_URL
)
?:
""
val
shareTitle
=
arguments
?.
getString
(
KEY_SHARE_TITLE
)
?:
""
val
shareContent
=
arguments
?.
getString
(
KEY_SHARE_CONTENT
)
?:
""
val
shareUrl
=
arguments
?.
getString
(
KEY_SHARE_URL
)
?:
""
val
shareMiniId
=
arguments
?.
getString
(
KEY_SHARE_MINI_ID
)
?:
""
val
shareMiniPath
=
arguments
?.
getString
(
KEY_SHARE_MINI_PATH
)
?:
""
ivSharePicture
=
view
?.
findViewById
(
R
.
id
.
iv_share_picture
)
...
...
@@ -82,13 +84,15 @@ class ShareMeditationDialog : DialogFragment() {
llQQFriend
=
view
?.
findViewById
(
R
.
id
.
ll_qq_friend
)
llWeChat
?.
setOnClickListener
{
ShareUtils
.
shareTo
(
SHARE_MEDIA
.
WEIXIN
,
ShareUtils
.
shareSmailWeixin
(
activity
as
Activity
,
shareTitle
,
shareUrl
,
shareContent
,
shareImageUrl
shareImageUrl
,
path
=
shareMiniPath
,
id
=
shareMiniId
,
shareListener
=
null
)
dismiss
()
}
...
...
@@ -147,13 +151,24 @@ class ShareMeditationDialog : DialogFragment() {
private
const
val
KEY_SHARE_URL
=
"key_share_url"
private
const
val
KEY_SHARE_CONTENT
=
"key_share_content"
private
const
val
KEY_SHARE_IMAGE_URL
=
"key_share_image_url"
fun
newInstance
(
shareTitle
:
String
,
shareUrl
:
String
,
shareContent
:
String
,
shareImageUrl
:
String
):
ShareMeditationDialog
{
private
const
val
KEY_SHARE_MINI_ID
=
"key_share_mini_id"
private
const
val
KEY_SHARE_MINI_PATH
=
"key_share_mini_path"
fun
newInstance
(
shareTitle
:
String
,
shareUrl
:
String
,
shareContent
:
String
,
shareImageUrl
:
String
,
miniId
:
String
,
miniPath
:
String
):
ShareMeditationDialog
{
val
args
=
Bundle
()
args
.
putString
(
KEY_SHARE_TITLE
,
shareTitle
)
args
.
putString
(
KEY_SHARE_CONTENT
,
shareContent
)
args
.
putString
(
KEY_SHARE_URL
,
shareUrl
)
args
.
putString
(
KEY_SHARE_IMAGE_URL
,
shareImageUrl
)
args
.
putString
(
KEY_SHARE_MINI_ID
,
miniId
)
args
.
putString
(
KEY_SHARE_MINI_PATH
,
miniPath
)
val
fragment
=
ShareMeditationDialog
()
fragment
.
arguments
=
args
return
fragment
...
...
m-tests/src/main/AndroidManifest.xml
View file @
13999763
...
...
@@ -18,6 +18,9 @@
android:screenOrientation=
"portrait"
android:theme=
"@style/tests_NoTitleTheme"
/>
<activity
android:name=
".search.TestSearchKeyActivity"
android:screenOrientation=
"portrait"
android:theme=
"@style/tests_NoTitleTheme"
/>
<!--测评首页-->
<activity
android:name=
".home.NewTestHomeActivity"
...
...
m-tests/src/main/java/com/yidianling/tests/list/model/TestListCommand.kt
View file @
13999763
...
...
@@ -14,4 +14,6 @@ class TestListCommand : BaseCommand() {
var
tab
:
String
?
=
null
@JvmField
var
keyword
:
String
?
=
null
@JvmField
var
type
:
Int
=
0
}
\ No newline at end of file
m-tests/src/main/java/com/yidianling/tests/list/view/TestCategoryListActivity.kt
View file @
13999763
...
...
@@ -3,12 +3,13 @@ package com.yidianling.tests.list.view
import
android.app.Activity
import
android.content.Context
import
android.content.Intent
import
androidx.core.content.ContextCompat
import
androidx.viewpager.widget.ViewPager
import
android.view.View
import
android.widget.PopupWindow
import
android.widget.TextView
import
androidx.core.content.ContextCompat
import
androidx.viewpager.widget.ViewPager
import
com.alibaba.android.arouter.facade.annotation.Route
import
com.google.android.material.tabs.TabLayout
import
com.ydl.ydlcommon.base.BaseMvpActivity
import
com.ydl.ydlcommon.bean.StatusBarOptions
import
com.ydl.ydlcommon.utils.BuryPointUtils
...
...
@@ -32,7 +33,8 @@ import com.yidianling.tests.search.TestSearchActivity
import
kotlinx.android.synthetic.main.tests_activity_test_category_list.*
@Route
(
path
=
"/ceshi/category_list"
)
class
TestCategoryListActivity
:
BaseMvpActivity
<
TestListActivityView
,
TestListActivityPresenter
>(),
TestListActivityView
,
PopupWindow
.
OnDismissListener
{
class
TestCategoryListActivity
:
BaseMvpActivity
<
TestListActivityView
,
TestListActivityPresenter
>(),
TestListActivityView
,
PopupWindow
.
OnDismissListener
{
private
var
isMine
:
Boolean
=
false
private
var
tabName
:
String
?
=
null
...
...
@@ -51,12 +53,13 @@ class TestCategoryListActivity : BaseMvpActivity<TestListActivityView, TestListA
var
selectedConditionList
:
HashMap
<
Int
,
HashMap
<
String
,
CategotyPopItem
>>
=
HashMap
()
var
sortPopup
:
CategoryPopupWindow
?
=
null
;
var
filterPopup
:
CategoryPopupWindow
?
=
null
;
var
currentPageIndex
:
Int
=
0
val
SELECT_SORT
:
String
=
"SELECT_SORT"
val
SELECT_FILTER
:
String
=
"SELECT_FILTER"
private
var
testCategoryAdapter
:
TestListPagerAdapter
?
=
null
var
title
=
arrayOf
(
"全部"
,
"付费"
,
"免费"
)
companion
object
{
private
const
val
EXTRA_IS_MINE
=
"is_mine"
...
...
@@ -116,15 +119,50 @@ class TestCategoryListActivity : BaseMvpActivity<TestListActivityView, TestListA
showSortPopupWindow
()
}
dr_filter
.
setOnClickListener
{
showFilterPopupWindow
()
for
(
i
in
title
)
{
val
tab
=
tab_tabLayout
.
newTab
().
setText
(
i
)
tab_tabLayout
.
addTab
(
tab
)
}
tab_tabLayout
.
addOnTabSelectedListener
(
object
:
TabLayout
.
OnTabSelectedListener
{
override
fun
onTabSelected
(
tab
:
TabLayout
.
Tab
?)
{
when
(
tab
?.
text
.
toString
())
{
"全部"
->
{
selectFilterItem
=
filterList
[
0
]
}
"付费"
->
{
selectFilterItem
=
filterList
[
1
]
}
"免费"
->
{
selectFilterItem
=
filterList
[
2
]
}
}
onDismiss
()
}
override
fun
onTabUnselected
(
tab
:
TabLayout
.
Tab
?)
{
}
override
fun
onTabReselected
(
tab
:
TabLayout
.
Tab
?)
{
}
})
mPresenter
.
fetchTestTypeList
()
vvp_test
.
addOnPageChangeListener
(
object
:
ViewPager
.
OnPageChangeListener
{
override
fun
onPageScrollStateChanged
(
state
:
Int
)
{}
override
fun
onPageScrolled
(
position
:
Int
,
positionOffset
:
Float
,
positionOffsetPixels
:
Int
)
{}
override
fun
onPageScrolled
(
position
:
Int
,
positionOffset
:
Float
,
positionOffsetPixels
:
Int
)
{
}
override
fun
onPageSelected
(
position
:
Int
)
{
currentPageIndex
=
position
...
...
@@ -134,10 +172,13 @@ class TestCategoryListActivity : BaseMvpActivity<TestListActivityView, TestListA
LogUtil
.
d
(
"page selected: "
+
testCategory
?.
get
(
position
)
?.
name
)
BuryPointUtils
.
getInstance
().
createMap
()
.
put
(
"test_type_click"
,
testCategory
?.
get
(
position
)
?.
name
+
""
)
.
burryPoint
(
"Testtype_click"
)
if
((
"my"
==
testCategory
?.
get
(
position
)
?.
tab
||
"unpay"
==
testCategory
?.
get
(
position
)
?.
tab
)
)
{
TestsIn
.
loginByOneKeyLogin
(
this
@TestCategoryListActivity
,
true
)
.
put
(
"test_type_click"
,
testCategory
?.
get
(
position
)
?.
name
+
""
)
.
burryPoint
(
"Testtype_click"
)
if
((
"my"
==
testCategory
?.
get
(
position
)
?.
tab
||
"unpay"
==
testCategory
?.
get
(
position
)
?.
tab
)
)
{
TestsIn
.
loginByOneKeyLogin
(
this
@TestCategoryListActivity
,
true
)
}
}
})
...
...
@@ -154,33 +195,21 @@ class TestCategoryListActivity : BaseMvpActivity<TestListActivityView, TestListA
filterList
.
add
(
CategotyPopItem
(
"免费"
,
"2"
))
sortPopup
=
CategoryPopupWindow
(
this
,
sortList
.
toList
()
as
ArrayList
<
CategotyPopItem
>,
object
:
CategoryConditionRecyclerViewAdapter
.
OnItemSelectedListener
{
override
fun
onSortItemSelected
(
sortItem
:
CategotyPopItem
)
{
selectSortItem
=
sortItem
if
(
selectSortItem
.
key
==
sortConditionDefaultKey
)
{
updateFilterTextViewStatus
(
dr_sort
,
sortItem
.
value
!!
,
true
)
}
else
{
updateFilterTextViewStatus
(
dr_sort
,
sortItem
.
value
!!
,
false
)
sortList
.
toList
()
as
ArrayList
<
CategotyPopItem
>,
object
:
CategoryConditionRecyclerViewAdapter
.
OnItemSelectedListener
{
override
fun
onSortItemSelected
(
sortItem
:
CategotyPopItem
)
{
selectSortItem
=
sortItem
if
(
selectSortItem
.
key
==
sortConditionDefaultKey
)
{
updateFilterTextViewStatus
(
dr_sort
,
sortItem
.
value
!!
,
true
)
}
else
{
updateFilterTextViewStatus
(
dr_sort
,
sortItem
.
value
!!
,
false
)
}
sortPopup
?.
dismiss
()
}
sortPopup
?.
dismiss
()
}
})
filterPopup
=
CategoryPopupWindow
(
this
,
filterList
.
toList
()
as
ArrayList
<
CategotyPopItem
>,
object
:
CategoryConditionRecyclerViewAdapter
.
OnItemSelectedListener
{
override
fun
onSortItemSelected
(
sortItem
:
CategotyPopItem
)
{
selectFilterItem
=
sortItem
if
(
selectFilterItem
.
key
==
filterConditionDefaultKey
)
{
updateFilterTextViewStatus
(
dr_filter
,
sortItem
.
value
!!
,
true
)
}
else
{
updateFilterTextViewStatus
(
dr_filter
,
sortItem
.
value
!!
,
false
)
}
filterPopup
?.
dismiss
()
}
})
})
sortPopup
?.
setOnDismissListener
(
this
)
filterPopup
?.
setOnDismissListener
(
this
)
}
override
fun
onDismiss
()
{
...
...
@@ -200,24 +229,18 @@ class TestCategoryListActivity : BaseMvpActivity<TestListActivityView, TestListA
updateFilterTextViewStatus
(
dr_sort
,
selectSortItem
.
value
!!
,
false
)
}
if
(
selectFilterItem
.
key
==
filterConditionDefaultKey
)
{
updateFilterTextViewStatus
(
dr_filter
,
selectFilterItem
.
value
!!
,
true
)
}
else
{
updateFilterTextViewStatus
(
dr_filter
,
selectFilterItem
.
value
!!
,
false
)
}
}
else
{
selectSortItem
=
CategotyPopItem
(
"综合排序"
,
sortConditionDefaultKey
)
selectFilterItem
=
CategotyPopItem
(
"全部"
,
filterConditionDefaultKey
)
updateTabLayoutStatus
(
tab_tabLayout
,
selectFilterItem
.
value
!!
)
}
else
{
selectSortItem
=
CategotyPopItem
(
"综合排序"
,
sortConditionDefaultKey
)
selectFilterItem
=
CategotyPopItem
(
"全部"
,
filterConditionDefaultKey
)
updateFilterTextViewStatus
(
dr_sort
,
selectSortItem
.
value
!!
,
true
)
update
FilterTextViewStatus
(
dr_filter
,
selectFilterItem
.
value
!!
,
true
)
update
TabLayoutStatus
(
tab_tabLayout
,
selectFilterItem
.
value
!!
)
}
sortPopup
?.
adapter
?.
lastSelectText
=
selectSortItem
.
value
filterPopup
?.
adapter
?.
lastSelectText
=
selectFilterItem
.
value
sortPopup
?.
adapter
?.
notifyDataSetChanged
()
filterPopup
?.
adapter
?.
notifyDataSetChanged
()
}
private
fun
updateConditionList
()
{
...
...
@@ -229,11 +252,11 @@ class TestCategoryListActivity : BaseMvpActivity<TestListActivityView, TestListA
conditionList
[
SELECT_FILTER
]
=
selectFilterItem
selectedConditionList
[
currentPageIndex
]
=
conditionList
refreshFragmentPageData
(
selectSortItem
.
key
!!
,
selectFilterItem
.
key
!!
)
refreshFragmentPageData
(
selectSortItem
.
key
!!
,
selectFilterItem
.
key
!!
)
}
private
fun
refreshFragmentPageData
(
sort
:
String
,
filter
:
String
)
{
testCategoryAdapter
?.
getFragmentByPosition
(
currentPageIndex
)
?.
refreshListData
(
sort
,
filter
)
private
fun
refreshFragmentPageData
(
sort
:
String
,
filter
:
String
)
{
testCategoryAdapter
?.
getFragmentByPosition
(
currentPageIndex
)
?.
refreshListData
(
sort
,
filter
)
}
...
...
@@ -294,23 +317,38 @@ class TestCategoryListActivity : BaseMvpActivity<TestListActivityView, TestListA
view_mask
.
visibility
=
View
.
VISIBLE
}
//显示筛选弹窗
private
fun
showFilterPopupWindow
()
{
filterPopup
?.
showAsDropDown
(
ll_sort
)
view_mask
.
visibility
=
View
.
VISIBLE
}
private
fun
updateFilterTextViewStatus
(
tv
:
TextView
,
text
:
String
,
isNormal
:
Boolean
)
{
tv
.
text
=
text
if
(
isNormal
)
{
tv
.
setTextColor
(
ContextCompat
.
getColor
(
this
,
R
.
color
.
platform_colorTextDefault
))
tv
.
setCompoundDrawablesWithIntrinsicBounds
(
0
,
0
,
R
.
drawable
.
platform_ic_arrow_drop_down_grey_500_18dp
,
0
)
tv
.
setTextColor
(
ContextCompat
.
getColor
(
this
,
R
.
color
.
platform_color_999999
))
tv
.
setCompoundDrawablesWithIntrinsicBounds
(
0
,
0
,
R
.
drawable
.
platform_ic_arrow_drop_down_grey_500_18dp
,
0
)
}
else
{
tv
.
setTextColor
(
ContextCompat
.
getColor
(
this
,
R
.
color
.
platform_main_theme
))
tv
.
setCompoundDrawablesWithIntrinsicBounds
(
0
,
0
,
R
.
drawable
.
tests_ic_arrow_drop_down
,
0
)
}
}
private
fun
updateTabLayoutStatus
(
tabLayout
:
TabLayout
,
text
:
String
)
{
when
(
text
)
{
"全部"
->
{
tabLayout
.
getTabAt
(
0
)
?.
select
()
}
"付费"
->
{
tabLayout
.
getTabAt
(
1
)
?.
select
()
}
"免费"
->
{
tabLayout
.
getTabAt
(
2
)
?.
select
()
}
}
}
override
fun
onFailed
(
msg
:
String
?)
{
ToastUtil
.
toastShort
(
msg
?:
""
)
}
...
...
m-tests/src/main/java/com/yidianling/tests/list/view/adapter/TestListRecyclerAdapter.kt
View file @
13999763
...
...
@@ -117,8 +117,8 @@ class TestListRecyclerAdapter(private val context: Context,
tvCoupon
.
visibility
=
View
.
GONE
textView
.
setPadding
(
dp5
!!
,
dp2
!!
,
dp5
!!
,
dp2
!!
)
textView
.
text
=
"免费"
textView
.
setBackgroundResource
(
R
.
drawable
.
tests_testhome_recom_price_bg
)
textView
.
setTextColor
(
Color
.
parseColor
(
"#
34CD6
5"
))
textView
.
setBackgroundResource
(
R
.
drawable
.
tests_testhome_recom_price_
red_
bg
)
textView
.
setTextColor
(
Color
.
parseColor
(
"#
FF5B0
5"
))
}
else
{
var
newPrice
=
TestHomeUtils
.
getOriginalPrice
(
tvCoupon
,
price
,
couponMoney
)
textView
.
setPadding
(
0
,
dp5
!!
,
dp5
!!
,
0
)
...
...
m-tests/src/main/java/com/yidianling/tests/search/TestSearchActivity.kt
View file @
13999763
...
...
@@ -33,8 +33,9 @@ import de.greenrobot.event.EventBus
import
kotlinx.android.synthetic.main.tests_activity_test_search.*
import
kotlinx.android.synthetic.main.tests_item_hot_search.view.*
@Route
(
path
=
"/tests/search"
)
class
TestSearchActivity
:
BaseMvpActivity
<
TestSearchView
,
TestSearchPresenter
>(),
TestSearchView
,
View
.
OnClickListener
{
@Route
(
path
=
"/tests/search"
)
class
TestSearchActivity
:
BaseMvpActivity
<
TestSearchView
,
TestSearchPresenter
>(),
TestSearchView
,
View
.
OnClickListener
{
private
var
isFirstLoad
=
true
override
fun
getStatusViewOptions
():
StatusBarOptions
{
...
...
@@ -76,7 +77,8 @@ class TestSearchActivity : BaseMvpActivity<TestSearchView, TestSearchPresenter>(
}
fun
initData
()
{
var
lastCouponMoney
=
SharedPreferencesEditor
.
getString
(
TestHomeUtils
.
TEST_MAX_COUPON_MONEY_SP_KEY
)
var
lastCouponMoney
=
SharedPreferencesEditor
.
getString
(
TestHomeUtils
.
TEST_MAX_COUPON_MONEY_SP_KEY
)
if
(!
TextUtils
.
isEmpty
(
lastCouponMoney
))
{
searchAdapter
?.
couponMoney
=
lastCouponMoney
hotSearchAdapter
?.
couponMoney
=
lastCouponMoney
...
...
@@ -95,8 +97,16 @@ class TestSearchActivity : BaseMvpActivity<TestSearchView, TestSearchPresenter>(
private
fun
initRecyclerView
()
{
swipe_refresh_layout
.
isEnabled
=
false
searchAdapter
=
TestListRecyclerAdapter
(
this
,
searchedTestList
,
TestListRecyclerAdapter
.
PAGE_TYPE_SEARCH
)
hotSearchAdapter
=
TestListRecyclerAdapter
(
this
,
hotSearchedTestList
,
TestListRecyclerAdapter
.
PAGE_TYPE_SEARCH
)
searchAdapter
=
TestListRecyclerAdapter
(
this
,
searchedTestList
,
TestListRecyclerAdapter
.
PAGE_TYPE_SEARCH
)
hotSearchAdapter
=
TestListRecyclerAdapter
(
this
,
hotSearchedTestList
,
TestListRecyclerAdapter
.
PAGE_TYPE_SEARCH
)
searchAdapter
?.
onItemClickListener
=
MyBaseAdapter
.
OnItemClickListener
{
_
,
_
,
data
->
TestsIn
.
getTestsImpl
().
testDetailH5
(
data
.
id
.
toString
())
...
...
@@ -106,7 +116,8 @@ class TestSearchActivity : BaseMvpActivity<TestSearchView, TestSearchPresenter>(
TestsIn
.
getTestsImpl
().
testDetailH5
(
data
.
id
.
toString
())
}
headerHotSearch
=
View
.
inflate
(
this
,
R
.
layout
.
tests_header_hot_search
,
null
)
as
LinearLayout
?;
headerHotSearch
=
View
.
inflate
(
this
,
R
.
layout
.
tests_header_hot_search
,
null
)
as
LinearLayout
?;
searchHeader
=
View
.
inflate
(
this
,
R
.
layout
.
tests_header_search_list
,
null
);
tvSearchHint
=
searchHeader
?.
findViewById
(
R
.
id
.
tv_search_hint
);
...
...
@@ -135,13 +146,13 @@ class TestSearchActivity : BaseMvpActivity<TestSearchView, TestSearchPresenter>(
onScrollListener
=
object
:
EndlessRecyclerViewScrollListener
(
layoutManager
)
{
override
fun
onLoadMore
(
page
:
Int
,
totalItemsCount
:
Int
,
view
:
RecyclerView
?)
{
if
(
isSearch
)
{
mPresenter
.
searchTests
(
keyword
,
searchListCurrentPage
)
mPresenter
.
searchTests
(
keyword
,
searchListCurrentPage
,
0
)
}
}
}
rv_hot_list
.
addOnScrollListener
(
object
:
RecyclerView
.
OnScrollListener
()
{
override
fun
onScrolled
(
recyclerView
:
RecyclerView
,
dx
:
Int
,
dy
:
Int
)
{
if
(!
isFirstLoad
&&
dx
!=
0
&&
dx
!=
0
)
{
if
(!
isFirstLoad
&&
dx
!=
0
&&
dx
!=
0
)
{
hideSoftInput
()
}
}
...
...
@@ -168,7 +179,14 @@ class TestSearchActivity : BaseMvpActivity<TestSearchView, TestSearchPresenter>(
})
etSearch
.
setOnEditorActionListener
{
_
,
actionId
,
_
->
if
(
actionId
==
EditorInfo
.
IME_ACTION_SEARCH
)
{
doSearch
()
keyword
=
etSearch
.
text
.
toString
()
if
(
TextUtils
.
isEmpty
(
keyword
))
{
ToastUtil
.
toastShort
(
getString
(
R
.
string
.
tests_no_search_keyword_hint
))
}
else
{
val
intent
=
Intent
(
this
,
TestSearchKeyActivity
::
class
.
java
)
intent
.
putExtra
(
"keyword"
,
keyword
)
startActivity
(
intent
)
}
}
true
}
...
...
@@ -193,7 +211,7 @@ class TestSearchActivity : BaseMvpActivity<TestSearchView, TestSearchPresenter>(
isSearch
=
true
searchListCurrentPage
=
1
onScrollListener
.
resetState
()
mPresenter
.
searchTests
(
keyword
,
searchListCurrentPage
)
mPresenter
.
searchTests
(
keyword
,
searchListCurrentPage
,
0
)
}
fun
hideSoftInput
()
{
...
...
@@ -241,11 +259,13 @@ class TestSearchActivity : BaseMvpActivity<TestSearchView, TestSearchPresenter>(
headerHotSearch
?.
visibility
=
View
.
VISIBLE
flHotSearch
?.
removeAllViews
()
for
(
index
in
keywordData
.
indices
)
{
val
view
=
LayoutInflater
.
from
(
this
).
inflate
(
R
.
layout
.
tests_item_recommend_hot_search
,
flHotSearch
,
false
)
val
view
=
LayoutInflater
.
from
(
this
)
.
inflate
(
R
.
layout
.
tests_item_recommend_hot_search
,
flHotSearch
,
false
)
view
.
tvHotSearch
.
text
=
keywordData
[
index
].
keyWord
view
.
setOnClickListener
{
etSearch
.
setText
(
keywordData
[
index
].
keyWord
)
doSearch
()
val
intent
=
Intent
(
this
,
TestSearchKeyActivity
::
class
.
java
)
intent
.
putExtra
(
"keyword"
,
keywordData
[
index
].
keyWord
)
startActivity
(
intent
)
}
flHotSearch
?.
addView
(
view
)
...
...
m-tests/src/main/java/com/yidianling/tests/search/TestSearchKeyActivity.kt
0 → 100644
View file @
13999763
package
com.yidianling.tests.search
import
android.content.Context
import
androidx.recyclerview.widget.LinearLayoutManager
import
android.text.Editable
import
android.text.TextUtils
import
android.text.TextWatcher
import
android.view.View
import
android.view.inputmethod.EditorInfo
import
android.view.inputmethod.InputMethodManager
import
androidx.recyclerview.widget.RecyclerView
import
com.google.android.material.tabs.TabLayout
import
com.ydl.ydlcommon.adapter.MyBaseAdapter
import
com.ydl.ydlcommon.base.BaseMvpActivity
import
com.ydl.ydlcommon.bean.StatusBarOptions
import
com.ydl.ydlcommon.utils.SharedPreferencesEditor
import
com.ydl.ydlcommon.view.listener.EndlessRecyclerViewScrollListener
import
com.yidianling.common.tools.ToastUtil
import
com.yidianling.tests.R
import
com.yidianling.tests.home.event.UpdateCouponMoneyEvent
import
com.yidianling.tests.home.utils.TestHomeUtils
import
com.yidianling.tests.list.model.bean.RecommendSearchItemBean
import
com.yidianling.tests.list.model.bean.Test
import
com.yidianling.tests.list.view.adapter.TestListRecyclerAdapter
import
com.yidianling.tests.router.TestsIn
import
de.greenrobot.event.EventBus
import
kotlinx.android.synthetic.main.tests_activity_test_key_search.*
class
TestSearchKeyActivity
:
BaseMvpActivity
<
TestSearchView
,
TestSearchPresenter
>(),
TestSearchView
,
View
.
OnClickListener
{
private
var
keyWord
:
String
?
=
""
private
var
searchListCurrentAllPage
=
1
private
var
searchListCurrentPastPage
=
1
private
var
searchListCurrentFreePage
=
1
private
val
TYPE_ALL
=
"all"
private
val
TYPE_PAST
=
"past"
private
val
TYPE_FREE
=
"free"
private
lateinit
var
onScrollListener
:
EndlessRecyclerViewScrollListener
private
var
currentSelectedPage
=
TYPE_ALL
var
title
=
arrayOf
(
"全部"
,
"付费"
,
"免费"
)
private
var
searchAdapter
:
TestListRecyclerAdapter
?
=
null
private
val
searchedTestList
:
MutableList
<
Test
>
=
ArrayList
()
override
fun
createPresenter
():
TestSearchPresenter
=
TestSearchPresenter
()
override
fun
layoutResId
():
Int
{
return
R
.
layout
.
tests_activity_test_key_search
}
override
fun
getStatusViewOptions
():
StatusBarOptions
{
return
StatusBarOptions
(
true
,
statusBarDarkMode
=
true
)
}
override
fun
initDataAndEvent
()
{
EventBus
.
getDefault
().
register
(
this
)
this
.
keyWord
=
intent
.
getStringExtra
(
"keyword"
)
setupListeners
()
initView
()
initRecyclerView
()
tv_search_key_empty
?.
text
=
String
.
format
(
"为您找到以下跟“%s”有关的内容"
,
keyWord
)
etKeySearch
?.
setText
(
keyWord
)
}
private
fun
initView
()
{
for
(
i
in
title
)
{
val
tab
=
tabLayout
.
newTab
().
setText
(
i
);
tabLayout
.
addTab
(
tab
)
}
}
private
fun
initRecyclerView
()
{
swipe_refresh_layout_key
.
isEnabled
=
false
searchAdapter
=
TestListRecyclerAdapter
(
this
,
searchedTestList
,
TestListRecyclerAdapter
.
PAGE_TYPE_SEARCH
)
var
lastCouponMoney
=
SharedPreferencesEditor
.
getString
(
TestHomeUtils
.
TEST_MAX_COUPON_MONEY_SP_KEY
)
if
(!
TextUtils
.
isEmpty
(
lastCouponMoney
))
{
searchAdapter
?.
couponMoney
=
lastCouponMoney
}
searchAdapter
?.
onItemClickListener
=
MyBaseAdapter
.
OnItemClickListener
{
_
,
_
,
data
->
TestsIn
.
getTestsImpl
().
testDetailH5
(
data
.
id
.
toString
())
}
rv_search_key_list
.
adapter
=
searchAdapter
val
layoutManager
=
LinearLayoutManager
(
this
,
LinearLayoutManager
.
VERTICAL
,
false
)
rv_search_key_list
.
layoutManager
=
layoutManager
onScrollListener
=
object
:
EndlessRecyclerViewScrollListener
(
layoutManager
)
{
override
fun
onLoadMore
(
page
:
Int
,
totalItemsCount
:
Int
,
view
:
RecyclerView
?)
{
when
(
currentSelectedPage
)
{
TYPE_ALL
->
{
mPresenter
.
searchTests
(
keyWord
,
searchListCurrentAllPage
,
0
)
}
TYPE_PAST
->
{
mPresenter
.
searchTests
(
keyWord
,
searchListCurrentPastPage
,
1
)
}
TYPE_FREE
->
{
mPresenter
.
searchTests
(
keyWord
,
searchListCurrentFreePage
,
2
)
}
}
}
}
rv_search_key_list
.
addOnScrollListener
(
onScrollListener
)
}
private
fun
setupListeners
()
{
tvKeyBack
.
setOnClickListener
(
this
)
etKeySearch
.
addTextChangedListener
(
object
:
TextWatcher
{
override
fun
afterTextChanged
(
s
:
Editable
?)
{
}
override
fun
beforeTextChanged
(
s
:
CharSequence
?,
start
:
Int
,
count
:
Int
,
after
:
Int
)
{
}
override
fun
onTextChanged
(
s
:
CharSequence
?,
start
:
Int
,
before
:
Int
,
count
:
Int
)
{
if
(
TextUtils
.
isEmpty
(
s
.
toString
()))
{
}
}
})
etKeySearch
.
setOnEditorActionListener
{
_
,
actionId
,
_
->
if
(
actionId
==
EditorInfo
.
IME_ACTION_SEARCH
)
{
this
.
keyWord
=
etKeySearch
.
text
.
toString
()
tv_search_key_empty
?.
text
=
String
.
format
(
"为您找到以下跟“%s”有关的内容"
,
keyWord
)
if
(
TextUtils
.
isEmpty
(
keyWord
))
{
ToastUtil
.
toastShort
(
getString
(
R
.
string
.
tests_no_search_keyword_hint
))
}
else
{
doSearch
(
keyWord
)
}
}
true
}
tabLayout
.
addOnTabSelectedListener
(
object
:
TabLayout
.
OnTabSelectedListener
{
override
fun
onTabSelected
(
tab
:
TabLayout
.
Tab
?)
{
when
(
tab
?.
text
.
toString
())
{
"全部"
->
{
currentSelectedPage
=
TYPE_ALL
searchListCurrentAllPage
=
1
mPresenter
.
searchTests
(
keyWord
,
searchListCurrentAllPage
,
0
)
}
"付费"
->
{
currentSelectedPage
=
TYPE_PAST
searchListCurrentPastPage
=
1
mPresenter
.
searchTests
(
keyWord
,
searchListCurrentPastPage
,
1
)
}
"免费"
->
{
currentSelectedPage
=
TYPE_FREE
searchListCurrentFreePage
=
1
mPresenter
.
searchTests
(
keyWord
,
searchListCurrentFreePage
,
2
)
}
}
}
override
fun
onTabUnselected
(
tab
:
TabLayout
.
Tab
?)
{
}
override
fun
onTabReselected
(
tab
:
TabLayout
.
Tab
?)
{
}
})
}
fun
doSearch
(
keyword
:
String
?)
{
currentSelectedPage
=
TYPE_ALL
searchListCurrentAllPage
=
1
mPresenter
.
searchTests
(
keyword
,
searchListCurrentAllPage
,
0
)
tabLayout
.
getTabAt
(
0
)
?.
select
()
}
override
fun
showLoadingView
()
{
swipe_refresh_layout_key
.
isRefreshing
=
true
}
override
fun
hideLoadingView
()
{
swipe_refresh_layout_key
.
isRefreshing
=
false
}
override
fun
showError
(
msg
:
String
)
{
ToastUtil
.
toastShort
(
msg
)
}
override
fun
showNoResultView
()
{
llKeyEmpty
.
visibility
=
View
.
VISIBLE
iv_Key_empty
.
visibility
=
View
.
VISIBLE
}
override
fun
hideNoResultView
()
{
llKeyEmpty
.
visibility
=
View
.
GONE
}
override
fun
showSearchResultView
(
testList
:
List
<
Test
>?,
page
:
Int
)
{
hideSoftInput
()
if
(
page
==
1
)
{
rv_search_key_list
.
adapter
=
searchAdapter
onScrollListener
.
resetState
()
searchedTestList
.
clear
()
}
if
(
testList
!=
null
&&
testList
.
isNotEmpty
())
{
searchedTestList
.
addAll
(
testList
)
searchAdapter
?.
notifyDataSetChanged
()
}
else
{
searchAdapter
?.
hasMore
=
false
searchAdapter
?.
notifyDataSetChanged
()
}
when
(
currentSelectedPage
)
{
TYPE_ALL
->
{
searchListCurrentAllPage
++
}
TYPE_PAST
->
{
searchListCurrentPastPage
++
}
TYPE_FREE
->
{
searchListCurrentFreePage
++
}
}
}
fun
hideSoftInput
()
{
val
view
=
this
.
currentFocus
if
(
view
!=
null
)
{
val
imm
=
getSystemService
(
Context
.
INPUT_METHOD_SERVICE
)
as
InputMethodManager
imm
.
hideSoftInputFromWindow
(
view
.
windowToken
,
0
)
}
}
override
fun
onRecommendSearchListResponse
(
testList
:
List
<
RecommendSearchItemBean
>)
{
}
override
fun
onHotRecommendResponse
(
datalist
:
List
<
Test
>)
{
}
override
fun
onClick
(
v
:
View
?)
{
when
(
v
?.
id
)
{
R
.
id
.
tvKeyBack
->
{
finish
()
}
}
}
override
fun
onResume
()
{
super
.
onResume
()
//每次可见,更新优惠券信息
TestHomeUtils
.
updateCouponMoney
()
}
fun
onEvent
(
updateCouponMoneyEvent
:
UpdateCouponMoneyEvent
)
{
searchAdapter
?.
couponMoney
=
updateCouponMoneyEvent
.
money
searchAdapter
?.
notifyDataSetChanged
()
}
override
fun
onDestroy
()
{
super
.
onDestroy
()
EventBus
.
getDefault
().
unregister
(
this
)
}
}
m-tests/src/main/java/com/yidianling/tests/search/TestSearchPresenter.kt
View file @
13999763
...
...
@@ -79,7 +79,7 @@ class TestSearchPresenter : SimplePresenter<TestSearchView>() {
})
}
fun
searchTests
(
keyword
:
String
?,
page
:
Int
)
{
fun
searchTests
(
keyword
:
String
?,
page
:
Int
,
type
:
Int
)
{
if
(
page
==
1
)
{
mView
.
showLoadingView
()
}
...
...
@@ -88,6 +88,7 @@ class TestSearchPresenter : SimplePresenter<TestSearchView>() {
cmd
.
tab
=
"search"
cmd
.
page
=
page
cmd
.
keyword
=
keyword
cmd
.
type
=
type
TestRetrofitApi
.
getTestRetrofitApi
()
.
fetchTestList
(
NetworkParamsUtils
.
getMaps
(
cmd
))
.
subscribeOn
(
Schedulers
.
io
())
...
...
m-tests/src/main/res/drawable/tests_bg_indicator_search.xml
0 → 100644
View file @
13999763
<?xml version="1.0" encoding="utf-8"?>
<layer-list
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<item
android:gravity=
"center"
>
<shape>
<size
android:width=
"@dimen/platform_dp_20"
android:height=
"@dimen/platform_dp_4"
/>
<corners
android:radius=
"@dimen/platform_dp_5"
/>
</shape>
</item>
</layer-list>
m-tests/src/main/res/drawable/tests_testhome_recom_price_red_bg.xml
0 → 100644
View file @
13999763
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<corners
android:radius=
"3dp"
/>
<solid
android:color=
"#1AFF5B05"
/>
</shape>
\ No newline at end of file
m-tests/src/main/res/layout/tests_activity_test_category_list.xml
View file @
13999763
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
tools:context=
".list.view.TestListActivity"
>
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
tools:context=
".list.view.TestListActivity"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/platform_title_bar_height"
android:background=
"@color/white"
android:gravity=
"center_vertical"
>
android:gravity=
"center_vertical"
>
<ImageView
android:id=
"@+id/iv_test_list_back"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:paddingLeft=
"15dp"
android:src=
"@drawable/tests_icon_test_back"
/>
android:src=
"@drawable/tests_icon_test_back"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"32dp"
android:background=
"@drawable/tests_bg_test_search_input"
android:orientation=
"horizontal"
android:layout_marginRight=
"15dp"
>
android:background=
"@drawable/tests_bg_test_search_input"
android:orientation=
"horizontal"
>
<ImageView
android:layout_width=
"13dp"
android:layout_height=
"13dp"
android:layout_gravity=
"center_vertical"
android:layout_marginLeft=
"12dp"
android:src=
"@drawable/tests_search_gray"
/>
android:src=
"@drawable/tests_search_gray"
/>
<TextView
android:id=
"@+id/tv_test_search"
...
...
@@ -48,7 +45,7 @@
android:textColor=
"#BFBFBF"
android:textSize=
"@dimen/platform_default_text_size_small"
android:textStyle=
"normal"
android:typeface=
"sans"
/>
android:typeface=
"sans"
/>
</LinearLayout>
...
...
@@ -66,50 +63,49 @@
android:layout_width=
"72dp"
android:layout_height=
"match_parent"
android:background=
"#F7F7F7"
app:pa_indicator_color=
"@color/platform_main_theme"
app:pa_tab_height=
"44dp"
app:pa_tab_indicator_margin=
"13dp"
app:pa_tab_mode=
"scrollable"
app:pa_indicator_color=
"@color/platform_main_theme"
/>
app:pa_tab_mode=
"scrollable"
/>
<LinearLayout
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_weight=
"1"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<LinearLayout
android:id=
"@+id/ll_sort"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/white"
android:orientation=
"horizontal"
>
android:orientation=
"horizontal"
>
<com.google.android.material.tabs.TabLayout
android:id=
"@+id/tab_tabLayout"
android:layout_width=
"0dp"
android:layout_height=
"44dp"
android:layout_weight=
"1"
app:tabIndicator=
"@drawable/tests_bg_indicator_search"
app:tabIndicatorColor=
"#2BB5F5"
app:tabIndicatorFullWidth=
"false"
app:tabSelectedTextColor=
"@color/platform_black"
app:tabTextColor=
"@color/platform_color_999999"
app:tabTextAppearance=
"@style/tests_MyTabLayout"
app:tabPaddingTop=
"@dimen/platform_dp_5"
/>
<com.ydl.ydlcommon.view.DrawableRightTextView
android:id=
"@+id/dr_sort"
style=
"@style/tests_FilterTextViewStyle"
android:layout_width=
"wrap_content"
android:layout_height=
"44dp"
android:layout_marginLeft=
"@dimen/platform_dp_16"
android:layout_marginTop=
"@dimen/platform_dp_4"
android:layout_height=
"@dimen/platform_dp_40"
android:layout_marginLeft=
"@dimen/platform_dp_26"
android:drawableEnd=
"@drawable/platform_ic_arrow_drop_down_grey_500_18dp"
android:drawableRight=
"@drawable/platform_ic_arrow_drop_down_grey_500_18dp"
android:text=
"综合排序"
android:textColor=
"@color/platform_color_242424"
/>
android:textColor=
"@color/platform_color_999999"
/>
<com.ydl.ydlcommon.view.DrawableRightTextView
android:id=
"@+id/dr_filter"
style=
"@style/tests_FilterTextViewStyle"
android:layout_width=
"wrap_content"
android:layout_height=
"44dp"
android:drawableEnd=
"@drawable/platform_ic_arrow_drop_down_grey_500_18dp"
android:drawableRight=
"@drawable/platform_ic_arrow_drop_down_grey_500_18dp"
android:paddingLeft=
"15dp"
android:text=
"全部"
android:textColor=
"@color/platform_color_242424"
/>
</LinearLayout>
<RelativeLayout
...
...
@@ -119,16 +115,14 @@
<com.ydl.ydlcommon.view.verticaltablayout.VerticalViewPager
android:id=
"@+id/vvp_test"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
android:layout_height=
"match_parent"
/>
<View
android:id=
"@+id/view_mask"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"#3c000000"
android:visibility=
"gone"
/>
android:visibility=
"gone"
/>
</RelativeLayout>
...
...
m-tests/src/main/res/layout/tests_activity_test_key_search.xml
0 → 100644
View file @
13999763
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:id=
"@+id/clContainer"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/white"
android:orientation=
"vertical"
tools:context=
".search.TestSearchActivity"
>
<LinearLayout
android:id=
"@+id/ll_title"
android:layout_width=
"match_parent"
android:layout_height=
"45dp"
android:gravity=
"center_vertical"
app:layout_constraintTop_toTopOf=
"parent"
>
<com.ydl.ydlcommon.view.DeleteEditTextView
android:id=
"@+id/etKeySearch"
android:layout_width=
"0dp"
android:layout_height=
"36dp"
android:layout_marginLeft=
"15dp"
android:layout_marginRight=
"5dp"
android:layout_weight=
"1"
android:background=
"@drawable/tests_bg_test_search_input"
android:drawableStart=
"@drawable/tests_search_gray"
android:drawableLeft=
"@drawable/tests_search_gray"
android:drawablePadding=
"8dp"
android:ems=
"10"
android:hint=
"输入标题与内容"
android:imeOptions=
"actionSearch"
android:inputType=
"text|textPersonName"
android:lines=
"1"
android:paddingLeft=
"8dp"
android:paddingRight=
"8dp"
android:textCursorDrawable=
"@color/platform_color_42C1FF"
android:textSize=
"14sp"
/>
<TextView
android:id=
"@+id/tvKeyBack"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginRight=
"6dp"
android:padding=
"10dp"
android:text=
"@string/platform_cancel"
android:textColor=
"@color/platform_color_999999"
/>
</LinearLayout>
<TextView
android:id=
"@+id/tv_search_key_empty"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:padding=
"15dp"
/>
<com.google.android.material.tabs.TabLayout
android:id=
"@+id/tabLayout"
android:layout_width=
"match_parent"
android:layout_height=
"44dp"
app:tabIndicator=
"@drawable/tests_bg_indicator_search"
app:tabIndicatorColor=
"#2BB5F5"
app:tabIndicatorFullWidth=
"false"
/>
<View
android:layout_width=
"match_parent"
android:layout_height=
"0.5dp"
android:background=
"#F7F7F7"
/>
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:id=
"@+id/swipe_refresh_layout_key"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/rv_search_key_list"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
<LinearLayout
android:id=
"@+id/llKeyEmpty"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
android:visibility=
"gone"
tools:visibility=
"visible"
>
<ImageView
android:id=
"@+id/iv_Key_empty"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:layout_marginTop=
"30dp"
android:src=
"@drawable/platform_ico_img_zixun_empty"
android:visibility=
"gone"
tools:visibility=
"visible"
/>
</LinearLayout>
</RelativeLayout>
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
</LinearLayout>
m-tests/src/main/res/layout/tests_item_category_testlist_view.xml
View file @
13999763
...
...
@@ -34,7 +34,7 @@
android:maxLines=
"2"
android:minHeight=
"24dp"
android:minLines=
"2"
android:textColor=
"#
666
"
android:textColor=
"#
C5C5C5
"
android:textSize=
"12sp"
tools:text=
"这里是副标题,这里是副标题,这里是副标题,这里是副标题"
/>
...
...
m-tests/src/main/res/layout/tests_testlist_item_view.xml
View file @
13999763
...
...
@@ -30,7 +30,7 @@
android:layout_marginRight=
"146dp"
android:ellipsize=
"end"
android:maxLines=
"2"
android:textColor=
"#
666
"
android:textColor=
"#
B5B5B5
"
android:textSize=
"12sp"
android:lineSpacingExtra=
"4dp"
android:minLines=
"2"
...
...
m-tests/src/main/res/values/styles.xml
View file @
13999763
...
...
@@ -30,4 +30,9 @@
<item
name=
"colorAccent"
>
@color/platform_main_theme
</item>
</style>
<style
name=
"tests_MyTabLayout"
parent=
"TextAppearance.Design.Tab"
>
<item
name=
"android:textStyle"
>
bold
</item>
</style>
</resources>
\ No newline at end of file
m-user/src/main/java/com/yidianling/user/bean/EvaluateOrderBean.kt
0 → 100644
View file @
13999763
package
com.yidianling.user.bean
data class
EvaluateOrderBean
(
val
consultOrder
:
Boolean
?
=
null
,
val
listenOrder
:
Boolean
?
=
null
)
m-user/src/main/java/com/yidianling/user/mine/DatePickerDialogFragment.java
View file @
13999763
...
...
@@ -67,9 +67,21 @@ public class DatePickerDialogFragment extends BaseDialogFragment implements Date
@Override
public
void
onDateChanged
(
DatePicker
view
,
int
year
,
int
monthOfYear
,
int
dayOfMonth
)
{
this
.
year
=
year
;
this
.
month
=
monthOfYear
;
this
.
day
=
dayOfMonth
;
if
(
isDataAfter
(
view
))
{
Calendar
mCalendar
=
Calendar
.
getInstance
();
view
.
init
(
mCalendar
.
get
(
Calendar
.
YEAR
),
mCalendar
.
get
(
Calendar
.
MONTH
),
mCalendar
.
get
(
Calendar
.
DAY_OF_MONTH
),
this
);
}
}
private
boolean
isDataAfter
(
DatePicker
datePicker
)
{
Calendar
mCalendar
=
Calendar
.
getInstance
();
Calendar
tempCalendar
=
Calendar
.
getInstance
();
tempCalendar
.
set
(
datePicker
.
getYear
(),
datePicker
.
getMonth
(),
datePicker
.
getDayOfMonth
(),
0
,
0
,
0
);
if
(
tempCalendar
.
after
(
mCalendar
))
{
return
true
;
}
else
{
return
false
;
}
}
...
...
m-user/src/main/java/com/yidianling/user/mine/MineFragment.kt
View file @
13999763
...
...
@@ -43,6 +43,7 @@ import com.yidianling.user.api.event.RefreshRecentContactListEvent
import
com.yidianling.user.api.service.IAppService
import
com.yidianling.user.constants.UserBIConstants.UserMyPageEvent
import
com.yidianling.user.mine.bean.CouponNumBean
import
com.yidianling.user.mine.data.AppDataManager
import
com.yidianling.user.mine.data.AppDataManager.getHttp
import
com.yidianling.user.mine.data.AppDataManager.getLocal
import
com.yidianling.user.mine.http.MineHttpImpl
...
...
@@ -101,14 +102,14 @@ class MineFragment : BaseFragment(), SwipeRefreshLayout.OnRefreshListener, View.
text_userName
.
setOnClickListener
(
this
)
jtv_test
.
setOnClickListener
(
this
)
swipe_refresh_layout
.
setOnRefreshListener
(
this
)
rootView
.
findViewById
<
View
>(
R
.
id
.
l
l_trade_order
).
setOnClickListener
(
this
)
rootView
.
findViewById
<
View
>(
R
.
id
.
cs
l_trade_order
).
setOnClickListener
(
this
)
rootView
.
findViewById
<
View
>(
R
.
id
.
jtv_introduce
).
setOnClickListener
(
this
)
rootView
.
findViewById
<
View
>(
R
.
id
.
iv_edit_info
).
setOnClickListener
(
this
)
//分享
rootView
.
findViewById
<
View
>(
R
.
id
.
iv_share
).
setOnClickListener
(
this
)
rootView
.
findViewById
<
View
>(
R
.
id
.
ll_my_courses
).
setOnClickListener
(
this
)
rootView
.
findViewById
<
View
>(
R
.
id
.
ll_red_packet
).
setOnClickListener
(
this
)
rootView
.
findViewById
<
View
>(
R
.
id
.
l
l_call_order
).
setOnClickListener
(
this
)
rootView
.
findViewById
<
View
>(
R
.
id
.
cs
l_call_order
).
setOnClickListener
(
this
)
rootView
.
findViewById
<
View
>(
R
.
id
.
ll_account
).
setOnClickListener
(
this
)
rootView
.
findViewById
<
View
>(
R
.
id
.
ll_guanzhu
).
setOnClickListener
(
this
)
rootView
.
findViewById
<
View
>(
R
.
id
.
ll_my_trends
).
setOnClickListener
(
this
)
...
...
@@ -124,6 +125,8 @@ class MineFragment : BaseFragment(), SwipeRefreshLayout.OnRefreshListener, View.
.
into
(
iv_mine_logo
)
refreshCouponData
()
}
override
fun
initDataAndEventLazy
()
{}
...
...
@@ -199,12 +202,59 @@ class MineFragment : BaseFragment(), SwipeRefreshLayout.OnRefreshListener, View.
refreshCouponData
()
}
private
fun
getConfideOrder
(
uid
:
String
)
{
MineHttpImpl
.
getInstance
().
getHasConfideOrder
(
uid
)
.
subscribeOn
(
Schedulers
.
io
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
({
response
->
if
(
"200"
==
response
.
code
)
{
if
(
response
.
data
!=
null
)
{
if
(
response
.
data
.
listenOrder
==
true
)
{
iv_confide_tip
.
visibility
=
View
.
VISIBLE
getLocal
().
setConfide
(
true
)
}
else
{
iv_confide_tip
.
visibility
=
View
.
GONE
getLocal
().
setConfide
(
false
)
}
if
(
response
.
data
.
consultOrder
==
true
)
{
iv_order_tip
.
visibility
=
View
.
VISIBLE
getLocal
().
setConsult
(
true
)
}
else
{
iv_order_tip
.
visibility
=
View
.
GONE
getLocal
().
setConsult
(
false
)
}
}
else
{
getLocal
().
setConfide
(
false
)
getLocal
().
setConsult
(
false
)
}
}
else
{
getLocal
().
setConfide
(
false
)
getLocal
().
setConsult
(
false
)
}
},{
getLocal
().
setConfide
(
false
)
getLocal
().
setConsult
(
false
)
})
}
/**
* 更新优惠券信息
*/
@SuppressLint
(
"CheckResult"
)
private
fun
refreshCouponData
()
{
getLocal
().
setCoupon
(
false
)
getLocal
().
setConfide
(
false
)
getLocal
().
setConsult
(
false
)
val
userInfo
=
getUserInfo
()
?:
return
if
(
userInfo
.
uid
!=
null
)
{
getConfideOrder
(
userInfo
.
uid
!!
)
}
//获取用户信息
MineHttpImpl
.
getInstance
().
getNewCoupon
(
BaseCommand
())
.
compose
(
netCheck
())
...
...
@@ -214,11 +264,17 @@ class MineFragment : BaseFragment(), SwipeRefreshLayout.OnRefreshListener, View.
if
(
response
.
data
!=
null
)
{
if
(
response
.
data
?.
count
?:
0
>
0
)
{
view_new_coupon
.
visibility
=
View
.
VISIBLE
getLocal
().
setCoupon
(
true
)
}
else
{
view_new_coupon
.
visibility
=
View
.
INVISIBLE
view_new_coupon
.
visibility
=
View
.
GONE
getLocal
().
setCoupon
(
false
)
}
}
else
{
getLocal
().
setCoupon
(
false
)
}
})
{
throwable
:
Throwable
?
->
}
})
{
throwable
:
Throwable
?
->
getLocal
().
setCoupon
(
false
)
}
}
/**
...
...
@@ -265,7 +321,6 @@ class MineFragment : BaseFragment(), SwipeRefreshLayout.OnRefreshListener, View.
}
else
{
jtv_about_us
?.
setLeftRedDotVisibility
(
View
.
GONE
)
}
//切换环境按钮逻辑
debugChangeEnvironment
()
}
...
...
@@ -409,7 +464,7 @@ class MineFragment : BaseFragment(), SwipeRefreshLayout.OnRefreshListener, View.
startActivity
(
Intent
(
activity
,
PrivacyActivity
::
class
.
java
))
}
}
else
if
(
id
==
R
.
id
.
l
l_trade_order
)
{
//预约
}
else
if
(
id
==
R
.
id
.
cs
l_trade_order
)
{
//预约
count
(
UserMyPageEvent
.
YDL_USER_MY_MIDDLE_TYPE_CLICK
,
"预约订单"
)
mActivity
?.
let
{
activity
->
if
(!
startLoginByStatus
(
activity
,
true
))
{
...
...
@@ -431,7 +486,7 @@ class MineFragment : BaseFragment(), SwipeRefreshLayout.OnRefreshListener, View.
provide
(
ICourseService
::
class
.
java
).
startMyCourseActivity
(
activity
)
}
}
else
if
(
id
==
R
.
id
.
l
l_call_order
)
{
//倾诉
}
else
if
(
id
==
R
.
id
.
cs
l_call_order
)
{
//倾诉
count
(
UserMyPageEvent
.
YDL_USER_MY_MIDDLE_TYPE_CLICK
,
"倾诉记录"
)
mActivity
?.
let
{
activity
->
if
(!
startLoginByStatus
(
activity
,
true
))
{
...
...
m-user/src/main/java/com/yidianling/user/mine/data/AppLocal.kt
View file @
13999763
...
...
@@ -18,4 +18,16 @@ interface AppLocal {
fun
putUpdate
(
update
:
Boolean
)
fun
getCoupon
():
Boolean
fun
setCoupon
(
have
:
Boolean
)
fun
getConsult
():
Boolean
fun
setConsult
(
have
:
Boolean
)
fun
getConfide
():
Boolean
fun
setConfide
(
have
:
Boolean
)
}
\ No newline at end of file
m-user/src/main/java/com/yidianling/user/mine/data/AppLocalImpl.kt
View file @
13999763
...
...
@@ -16,9 +16,13 @@ internal class AppLocalImpl private constructor(): AppLocal {
return
Holder
.
INSTANCE
}
private
val
APP
=
"app"
private
val
RED_POCKET_TIME
=
"red_pocket_time"
private
val
UPDATE
=
"update"
private
const
val
APP
=
"app"
private
const
val
RED_POCKET_TIME
=
"red_pocket_time"
private
const
val
UPDATE
=
"update"
private
const
val
CONFIDE
=
"confide"
private
const
val
CONSULT
=
"consult"
private
const
val
COUPON
=
"coupon"
}
...
...
@@ -38,6 +42,30 @@ internal class AppLocalImpl private constructor(): AppLocal {
getAppSP
().
edit
().
putBoolean
(
UPDATE
,
update
).
apply
()
}
override
fun
getCoupon
():
Boolean
{
return
getAppSP
().
getBoolean
(
COUPON
,
false
)
}
override
fun
setCoupon
(
have
:
Boolean
)
{
getAppSP
().
edit
().
putBoolean
(
COUPON
,
have
).
apply
()
}
override
fun
getConsult
():
Boolean
{
return
getAppSP
().
getBoolean
(
CONSULT
,
false
)
}
override
fun
setConsult
(
have
:
Boolean
)
{
getAppSP
().
edit
().
putBoolean
(
CONSULT
,
have
).
apply
()
}
override
fun
getConfide
():
Boolean
{
return
getAppSP
().
getBoolean
(
CONFIDE
,
false
)
}
override
fun
setConfide
(
have
:
Boolean
)
{
getAppSP
().
edit
().
putBoolean
(
CONFIDE
,
have
).
apply
()
}
private
fun
getAppSP
():
SharedPreferences
{
return
BaseApp
.
getApp
().
getSharedPreferences
(
APP
,
Context
.
MODE_PRIVATE
)
}
...
...
m-user/src/main/java/com/yidianling/user/mine/http/MineApi.kt
View file @
13999763
...
...
@@ -6,6 +6,7 @@ import com.ydl.ydlcommon.bean.MustUP
import
com.ydl.ydlcommon.data.http.BaseAPIResponse
import
com.ydl.ydlcommon.data.http.BaseResponse
import
com.yidianling.user.api.bean.UserResponseBean
import
com.yidianling.user.bean.EvaluateOrderBean
import
com.yidianling.user.bean.FundData
import
com.yidianling.user.bean.Recharge
import
com.yidianling.user.mine.bean.AccountBean
...
...
@@ -95,4 +96,12 @@ interface MineApi {
@POST
(
"sms/list"
)
fun
getSysMsgList
(
@FieldMap
params
:
Map
<
String
,
String
>):
Observable
<
BaseResponse
<
String
>>
/**
* 倾诉订单是否有待评价
*/
@POST
(
"consult/user/order/isEvaluateOrder"
)
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
)
fun
hasConfideOrder
(
@Body
body
:
RequestBody
):
Observable
<
BaseAPIResponse
<
EvaluateOrderBean
>>
}
\ No newline at end of file
m-user/src/main/java/com/yidianling/user/mine/http/MineHttp.kt
View file @
13999763
...
...
@@ -8,6 +8,7 @@ import com.yidianling.im.message.param.MsgListParam
import
com.yidianling.user.bean.FundData
import
com.yidianling.user.bean.Recharge
import
com.yidianling.user.api.bean.UserResponseBean
import
com.yidianling.user.bean.EvaluateOrderBean
import
com.yidianling.user.mine.*
import
com.yidianling.user.mine.bean.AccountBean
import
com.yidianling.user.mine.bean.BalanceBean
...
...
@@ -47,4 +48,6 @@ interface MineHttp {
fun
getSysMsgList
(
param
:
MsgListParam
):
Observable
<
BaseResponse
<
String
>>
fun
getHasConfideOrder
(
uid
:
String
):
Observable
<
BaseAPIResponse
<
EvaluateOrderBean
>>
}
\ No newline at end of file
m-user/src/main/java/com/yidianling/user/mine/http/MineHttpImpl.kt
View file @
13999763
...
...
@@ -6,10 +6,14 @@ import com.ydl.ydlcommon.data.http.*
import
com.ydl.ydlcommon.utils.NetworkParamsUtils
import
com.ydl.ydlnet.YDLHttpUtils
import
com.yidianling.im.message.param.MsgListParam
import
com.yidianling.user.api.bean.UserResponseBean
import
com.yidianling.user.bean.EvaluateOrderBean
import
com.yidianling.user.bean.FundData
import
com.yidianling.user.bean.Recharge
import
com.yidianling.user.api.bean.UserResponseBean
import
com.yidianling.user.mine.*
import
com.yidianling.user.mine.APPWillUpParam
import
com.yidianling.user.mine.FeedBackParam
import
com.yidianling.user.mine.FundListParam
import
com.yidianling.user.mine.RechargeParam
import
com.yidianling.user.mine.bean.AccountBean
import
com.yidianling.user.mine.bean.BalanceBean
import
com.yidianling.user.mine.bean.FeedBackDetailBean
...
...
@@ -18,6 +22,7 @@ import io.reactivex.Observable
import
okhttp3.MediaType
import
okhttp3.RequestBody
import
java.io.File
import
java.util.*
class
MineHttpImpl
private
constructor
()
:
MineHttp
{
...
...
@@ -127,6 +132,14 @@ class MineHttpImpl private constructor() : MineHttp {
.
flatMap
{
getAppApi
().
getSysMsgList
(
it
)
}
}
override
fun
getHasConfideOrder
(
uid
:
String
):
Observable
<
BaseAPIResponse
<
EvaluateOrderBean
>>
{
var
param
=
WeakHashMap
<
String
,
String
>().
toMutableMap
()
param
[
"uid"
]
=
uid
val
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json; charset=utf-8"
),
param
.
toString
())
return
getAppApi
().
hasConfideOrder
(
body
)
}
object
Holder
{
val
INSTANCE
=
MineHttpImpl
()
}
...
...
m-user/src/main/res/layout/user_mine_fragment_mine.xml
View file @
13999763
...
...
@@ -354,9 +354,8 @@
</RelativeLayout>
<LinearLayout
android:id=
"@+id/ll_call_order"
<androidx.constraintlayout.widget.ConstraintLayout
android:id=
"@+id/csl_call_order"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
...
...
@@ -365,10 +364,25 @@
android:orientation=
"vertical"
>
<ImageView
android:id=
"@+id/iv_confide"
android:layout_width=
"25dp"
android:layout_height=
"25dp"
android:layout_marginTop=
"3dp"
android:src=
"@drawable/user_mine_ic_qinshu_record"
/>
android:src=
"@drawable/user_mine_ic_qinshu_record"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<ImageView
android:id=
"@+id/iv_confide_tip"
android:layout_width=
"8dp"
android:layout_height=
"8dp"
android:src=
"@drawable/user_mine_background_red_point_new_coupon"
android:visibility=
"gone"
app:layout_constraintCircle=
"@id/iv_confide"
app:layout_constraintCircleAngle=
"45"
app:layout_constraintCircleRadius=
"13dp"
tools:visibility=
"visible"
/>
<TextView
android:layout_width=
"wrap_content"
...
...
@@ -376,12 +390,15 @@
android:layout_marginTop=
"8dp"
android:text=
"倾诉记录"
android:textColor=
"@color/platform_color_999999"
android:textSize=
"12sp"
/>
android:textSize=
"12sp"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/iv_confide"
/>
</
Linear
Layout>
</
androidx.constraintlayout.widget.Constraint
Layout>
<
Linear
Layout
android:id=
"@+id/
l
l_trade_order"
<
androidx.constraintlayout.widget.Constraint
Layout
android:id=
"@+id/
cs
l_trade_order"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
...
...
@@ -390,10 +407,25 @@
android:orientation=
"vertical"
>
<ImageView
android:id=
"@+id/iv_trade_order"
android:layout_width=
"25dp"
android:layout_height=
"25dp"
android:layout_marginTop=
"3dp"
android:src=
"@drawable/user_mine_ic_order"
/>
android:src=
"@drawable/user_mine_ic_order"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<ImageView
android:id=
"@+id/iv_order_tip"
android:layout_width=
"8dp"
android:layout_height=
"8dp"
android:src=
"@drawable/user_mine_background_red_point_new_coupon"
android:visibility=
"gone"
app:layout_constraintCircle=
"@id/iv_trade_order"
app:layout_constraintCircleAngle=
"45"
app:layout_constraintCircleRadius=
"13dp"
tools:visibility=
"visible"
/>
<TextView
android:layout_width=
"wrap_content"
...
...
@@ -401,9 +433,12 @@
android:layout_marginTop=
"8dp"
android:text=
"预约订单"
android:textColor=
"@color/platform_color_999999"
android:textSize=
"12sp"
/>
android:textSize=
"12sp"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/iv_trade_order"
/>
</
Linear
Layout>
</
androidx.constraintlayout.widget.Constraint
Layout>
</LinearLayout>
...
...
ydl-platform/src/main/java/com/ydl/ydlcommon/bean/ShareData.kt
View file @
13999763
...
...
@@ -14,10 +14,13 @@ class ShareData : Serializable {
var
cover
:
String
?
=
null
var
desc
:
String
?
=
null
// just for Meditation
var
type
:
String
?
=
null
// just for Meditation
var
type
:
String
?
=
null
var
isDarkMode
=
false
// 兼容评价列表分享H5传参数据结构
var
imageBase64
:
String
?
=
null
//分享到动态url
var
url
:
String
?
=
null
...
...
ydl-platform/src/main/java/com/ydl/ydlcommon/utils/StatusBarUtils.kt
View file @
13999763
...
...
@@ -1097,6 +1097,20 @@ class StatusBarUtils {
statusBarLightMode
(
context
)
}
}
/**
* 适配 One Plus手机顶部返回按钮被截取问题
*/
fun
setCustomStatusViewForMembers
(
context
:
Activity
,
statusView
:
View
,
isDarkMode
:
Boolean
=
false
)
{
val
params
=
statusView
.
layoutParams
setTransparentForImageView
(
context
,
null
)
val
statusBarHeight
=
StatusBarUtils
.
getStatusBarHeight
(
context
)
params
.
height
=
RxImageTool
.
dp2px
(
48f
)
+
statusBarHeight
statusView
.
setPadding
(
0
,
statusBarHeight
-
25
,
0
,
0
)
if
(
isDarkMode
)
{
statusBarLightMode
(
context
)
}
}
}
//====================设置Activity状态栏View END====================
...
...
ydl-webview/src/main/java/com/ydl/view/ShareMeditationDialog.kt
View file @
13999763
...
...
@@ -73,6 +73,8 @@ class ShareMeditationDialog : DialogFragment() {
val
shareTitle
=
arguments
?.
getString
(
KEY_SHARE_TITLE
)
val
shareContent
=
arguments
?.
getString
(
KEY_SHARE_CONTENT
)
val
shareCover
=
arguments
?.
getString
(
KEY_SHARE_COVER
)
val
miniId
=
arguments
?.
getString
(
KEY_SHARE_MINI_ID
)
val
miniPath
=
arguments
?.
getString
(
KEY_SHARE_MINI_PATH
)
llRootLayout
=
view
?.
findViewById
(
R
.
id
.
csl_share_layout
)
...
...
@@ -96,13 +98,15 @@ class ShareMeditationDialog : DialogFragment() {
updateUI
(
isDarkMode
==
true
)
llWeChat
?.
setOnClickListener
{
ShareUtils
.
shareTo
(
SHARE_MEDIA
.
WEIXIN
,
ShareUtils
.
shareSmailWeixin
(
activity
as
Activity
,
shareTitle
!!
,
shareUrl
!!
,
shareContent
!!
,
shareCover
!!
shareCover
!!
,
path
=
miniPath
,
id
=
miniId
,
shareListener
=
null
)
dismiss
()
}
...
...
@@ -191,15 +195,21 @@ class ShareMeditationDialog : DialogFragment() {
private
const
val
KEY_SHARE_TITLE
=
"key_share_title"
private
const
val
KEY_SHARE_CONTENT
=
"key_share_content"
private
const
val
KEY_SHARE_COVER
=
"key_share_cover"
private
const
val
KEY_SHARE_MINI_ID
=
"key_share_mini_id"
private
const
val
KEY_SHARE_MINI_PATH
=
"key_share_mini_path"
fun
newInstance
(
isDarkMode
:
Boolean
,
shareUrl
:
String
,
shareTitle
:
String
,
shareContent
:
String
,
shareCover
:
String
):
ShareMeditationDialog
{
fun
newInstance
(
isDarkMode
:
Boolean
,
shareUrl
:
String
,
shareTitle
:
String
,
shareContent
:
String
,
shareCover
:
String
,
miniId
:
String
,
miniPath
:
String
):
ShareMeditationDialog
{
val
args
=
Bundle
()
args
.
putBoolean
(
KEY_SHARE_DARK_MODE
,
isDarkMode
)
args
.
putString
(
KEY_SHARE_URL
,
shareUrl
)
args
.
putString
(
KEY_SHARE_TITLE
,
shareTitle
)
args
.
putString
(
KEY_SHARE_CONTENT
,
shareContent
)
args
.
putString
(
KEY_SHARE_COVER
,
shareCover
)
args
.
putString
(
KEY_SHARE_MINI_ID
,
miniId
)
args
.
putString
(
KEY_SHARE_MINI_PATH
,
miniPath
)
val
fragment
=
ShareMeditationDialog
()
fragment
.
arguments
=
args
...
...
ydl-webview/src/main/java/com/ydl/webview/NewH5Activity.java
View file @
13999763
...
...
@@ -41,6 +41,7 @@ import com.ydl.view.ShareMeditationDialog;
import
com.ydl.ydl_router.manager.YDLRouterManager
;
import
com.ydl.ydlcommon.base.BaseActivity
;
import
com.ydl.ydlcommon.base.BaseApp
;
import
com.ydl.ydlcommon.bean.ShareData
;
import
com.ydl.ydlcommon.bean.StatusBarOptions
;
import
com.ydl.ydlcommon.event.MeditationEvent
;
import
com.ydl.ydlcommon.modular.ModularServiceManager
;
...
...
@@ -51,6 +52,7 @@ import com.ydl.ydlcommon.utils.LogUtil;
import
com.ydl.ydlcommon.utils.NetWorkSpeedUtils
;
import
com.ydl.ydlcommon.utils.StatusBarUtils
;
import
com.ydl.ydlcommon.utils.URLUtils
;
import
com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
;
import
com.ydl.ydlcommon.utils.log.AliYunLogConfig
;
import
com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper
;
import
com.ydl.ydlcommon.view.TitleBar
;
...
...
@@ -117,6 +119,11 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
protected
String
shareTitle
;
protected
String
shareDesc
;
private
String
cover
;
private
String
miniId
;
private
String
miniPath
;
// 评价2.0新增字段 区分评价列表
private
H5JsBean
.
H5JsCmd
.
Params
paramsForCommentList
;
private
boolean
isShareCommentList
;
private
boolean
isDarkMode
=
false
;
...
...
@@ -520,6 +527,7 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
shareTitle
=
params
.
getShare
().
getTitle
();
shareDesc
=
params
.
getShare
().
getDesc
();
cover
=
params
.
getShare
().
getCover
();
paramsForCommentList
=
params
;
LogUtil
.
d
(
"title: "
+
shareTitle
+
" url: "
+
shareUrl
+
" desc: "
+
shareDesc
+
" cover: "
+
cover
);
new
Handler
(
getMainLooper
()).
post
(()
->
initShareMenu
());
}
...
...
@@ -537,15 +545,17 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
shareTitle
=
params
.
getShare
().
getTitle
();
shareDesc
=
params
.
getShare
().
getDesc
();
cover
=
params
.
getShare
().
getCover
();
miniId
=
params
.
getShare
().
getMinProgramId
();
miniPath
=
params
.
getShare
().
getMinProgramPath
();
isDarkMode
=
params
.
getShare
().
isDarkMode
();
if
(
shareMeditationDialog
==
null
)
{
if
(
shareMeditationDialog
==
null
)
{
shareMeditationDialog
=
ShareMeditationDialog
.
Companion
.
newInstance
(
isDarkMode
,
shareUrl
,
shareTitle
,
shareDesc
,
cover
);
shareUrl
,
shareTitle
,
shareDesc
,
cover
,
miniId
,
miniPath
);
}
if
(
shareMeditationDialog
!=
null
&&
!
shareMeditationDialog
.
isAdded
())
{
shareMeditationDialog
.
show
(
getSupportFragmentManager
(),
"share_meditation"
);
if
(
shareMeditationDialog
!=
null
&&
!
shareMeditationDialog
.
isAdded
())
{
shareMeditationDialog
.
show
(
getSupportFragmentManager
(),
"share_meditation"
);
}
}
else
{
}
else
{
purl
=
params
.
getShare
().
getUrl
();
shareUrl
=
params
.
getShare
().
getShare_url
();
shareTitle
=
params
.
getShare
().
getTitle
();
...
...
@@ -1047,7 +1057,14 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
private
void
initShareMenu
()
{
tb_title
.
setRightIcon
(
getResources
().
getDrawable
(
R
.
drawable
.
web_common_share
));
tb_title
.
setOnRightTextClick
((
view
,
isActive
)
->
{
share
(
null
,
null
);
ShareData
shareData
=
paramsForCommentList
.
getShare
();
if
(
shareData
!=
null
&&
"commentList"
.
equals
(
shareData
.
getType
()))
{
isShareCommentList
=
true
;
ActionCountUtils
.
Companion
.
record
(
"experts_comment_list_page"
,
"comment_share_click"
);
share
(
shareData
.
getImageBase64
(),
paramsForCommentList
);
}
else
{
share
(
null
,
null
);
}
});
LogUtil
.
d
(
"setSeccessful"
);
}
...
...
@@ -1440,7 +1457,11 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
//如果未引入动态模块的话,隐藏分享至动态按钮
dialog
=
YDLShareDialog
.
Companion
.
style4
(
this
,
shareTitle
,
shareUrl
,
shareDesc
,
cover
);
}
else
{
dialog
=
YDLShareDialog
.
Companion
.
style1
(
this
,
shareTitle
,
shareUrl
,
shareDesc
,
cover
,
minPath
,
minId
);
if
(
isShareCommentList
){
dialog
=
YDLShareDialog
.
Companion
.
style7
(
this
,
shareTitle
,
shareUrl
,
shareDesc
,
cover
,
minPath
,
minId
);
}
else
{
dialog
=
YDLShareDialog
.
Companion
.
style1
(
this
,
shareTitle
,
shareUrl
,
shareDesc
,
cover
,
minPath
,
minId
);
}
}
}
...
...
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