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
b81ea17f
Commit
b81ea17f
authored
Dec 13, 2019
by
徐健
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
在user组件增加双十一活动是否展示属性
parent
5ea2e0ca
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
169 additions
and
63 deletions
+169
-63
build.gradle
m-home/build.gradle
+2
-0
modular.gradle
m-home/modular.gradle
+1
-1
HomeBaseImpl.kt
m-home/src/main/java/com/yidianling/home/event/HomeBaseImpl.kt
+91
-50
HomeServiceImpl.kt
m-home/src/main/java/com/yidianling/home/modular/HomeServiceImpl.kt
+19
-0
Double11ActivityManagerUtils.java
m-home/src/main/java/com/yidianling/home/ui/utils/Double11ActivityManagerUtils.java
+0
-1
HomeModuleTabEvent.java
m-home/src/main/modular_api/com/yidianling/home/api/event/HomeModuleTabEvent.java
+1
-1
IHomeService.kt
m-home/src/main/modular_api/com/yidianling/home/api/service/IHomeService.kt
+11
-0
YdlHomeFragment.kt
m-home/src/xlzx/java/com/yidianling/home/ui/fragment/YdlHomeFragment.kt
+27
-10
build.gradle
m-user/build.gradle
+2
-0
SmsLoginActivity.kt
m-user/src/main/java/com/yidianling/user/ui/SmsLoginActivity.kt
+3
-0
InputPassWordPresenterImpl.kt
m-user/src/main/java/com/yidianling/user/ui/login/presenter/InputPassWordPresenterImpl.kt
+4
-0
LoginPresenterImpl.kt
m-user/src/main/java/com/yidianling/user/ui/login/presenter/LoginPresenterImpl.kt
+5
-0
VerificationCodePresenterImpl.kt
m-user/src/main/java/com/yidianling/user/ui/login/presenter/VerificationCodePresenterImpl.kt
+3
-0
No files found.
m-home/build.gradle
View file @
b81ea17f
...
...
@@ -82,6 +82,7 @@ dependencies {
implementation
modularPublication
(
'com.ydl:m-consultant-api'
)
implementation
modularPublication
(
'com.ydl:m-user-api'
)
implementation
modularPublication
(
'com.ydl:m-tests-api'
)
implementation
modularPublication
(
'com.ydl:m-im-api'
)
implementation
project
(
':ydl-webview'
)
implementation
project
(
':ydl-media'
)
implementation
project
(
":ydl-platform"
)
...
...
@@ -91,6 +92,7 @@ dependencies {
compileOnly
rootProject
.
ext
.
dependencies
[
"ydl-m-consultant-api"
]
compileOnly
rootProject
.
ext
.
dependencies
[
"ydl-m-user-api"
]
compileOnly
rootProject
.
ext
.
dependencies
[
"ydl-m-home-api"
]
compileOnly
rootProject
.
ext
.
dependencies
[
"ydl-m-im-api"
]
api
(
rootProject
.
ext
.
dependencies
[
"ydl-platform"
])
{
transitive
=
true
}
...
...
m-home/modular.gradle
View file @
b81ea17f
...
...
@@ -24,7 +24,7 @@ modular {
groupId
=
"com.ydl"
artifactId
=
"m-home-api"
//开发时注释掉版本号,发布api时打开
version
=
rootProject
.
ext
.
ydlPublishVersion
[
childProject
.
getName
()+
"-api"
]
//
version = rootProject.ext.ydlPublishVersion[childProject.getName()+"-api"]
// API 层打包时需要引入的依赖
apiDependencies
{
implementation
"com.google.code.gson:gson:2.8.2"
...
...
m-home/src/main/java/com/yidianling/home/event/HomeBaseImpl.kt
View file @
b81ea17f
...
...
@@ -32,14 +32,14 @@ import com.yidianling.consultant.constants.HomeBIConstants
import
com.yidianling.home.R
import
com.yidianling.home.constract.IHomeContract
import
com.yidianling.home.model.bean.*
import
com.yidianling.
router.RouterManager
import
com.yidianling.
router.im.IMRequestCallback
import
com.yidianling.
im.api.bean.IMRequestCallback
import
com.yidianling.
im.api.service.IImService
import
com.yidianling.tests.api.service.ITestsApiService
import
com.yidianling.user.api.service.IUserService
import
de.greenrobot.event.EventBus
import
org.json.JSONObject
open
class
HomeBaseImpl
:
IHomeBaseEvent
{
open
class
HomeBaseImpl
:
IHomeBaseEvent
{
val
HOT_SEARCH_DOCTOR_NAME
=
"hot_search_doctor_name"
override
fun
consultItemClick
(
linkUrl
:
String
?,
doctorId
:
String
)
{
...
...
@@ -55,7 +55,8 @@ open class HomeBaseImpl: IHomeBaseEvent {
if
(
linkUrl
.
startsWith
(
"http"
))
{
YDLRouterManager
.
router
(
IYDLRouterConstant
.
ROUTER_H5_H5
,
YDLRouterParams
().
putExtra
(
IYDLRouterConstant
.
EXTRA_URL
,
linkUrl
),
""
)
YDLRouterParams
().
putExtra
(
IYDLRouterConstant
.
EXTRA_URL
,
linkUrl
),
""
)
}
else
{
YDLRouterManager
.
router
(
linkUrl
)
}
...
...
@@ -68,7 +69,8 @@ open class HomeBaseImpl: IHomeBaseEvent {
}
ActionCountUtils
.
count
(
HomeBIConstants
.
YDL_USER_PRIVATE_CHAT_CLICK
,
doctorId
?:
""
)
?:
""
)
if
(!
ModularServiceManager
.
provide
(
IUserService
::
class
.
java
).
isLogin
())
{
//跳转登录
...
...
@@ -81,7 +83,8 @@ open class HomeBaseImpl: IHomeBaseEvent {
IYDLRouterConstant
.
ROUTER_CHAT_PRIVATE
,
YDLRouterParams
()
.
putExtra
(
IYDLRouterConstant
.
EXTRA_TOUID
,
doctorId
!!
)
.
putExtra
(
IYDLRouterConstant
.
EXTRA_USERTYPE
,
"1"
))
.
putExtra
(
IYDLRouterConstant
.
EXTRA_USERTYPE
,
"1"
)
)
}
}
...
...
@@ -101,7 +104,8 @@ open class HomeBaseImpl: IHomeBaseEvent {
override
fun
getConsultData
(
type
:
HomeHeaderBean
.
ConsultCategoryDateBean
,
selectPosition
:
Int
)
{
ActionCountUtils
.
count
(
HomeBIConstants
.
YDL_USER_CONSULT_TYPE_CLICK
,
type
.
name
?:
""
)
?:
""
)
mHomeView
!!
.
getConsultData
(
type
.
id
.
toString
(),
selectPosition
)
}
...
...
@@ -144,10 +148,12 @@ open class HomeBaseImpl: IHomeBaseEvent {
return
}
ActionCountUtils
.
count
(
HomeBIConstants
.
YDL_USER_TELEPHONE_CUSTOMER_SERVICE_CLICK
)
val
tel
=
if
(
PlatformRamImpl
.
getInstance
().
getGlobalInfo
()
==
null
)
"400-114-1010'"
else
PlatformRamImpl
.
getInstance
().
getGlobalInfo
()
!!
.
info
.
tel
val
tel
=
if
(
PlatformRamImpl
.
getInstance
().
getGlobalInfo
()
==
null
)
"400-114-1010'"
else
PlatformRamImpl
.
getInstance
().
getGlobalInfo
()
!!
.
info
.
tel
var
con
=
"\n400-114-1010\n早8:30-凌晨2:00"
if
(
PlatformRamImpl
.
getInstance
().
getGlobalInfo
()
!=
null
&&
PlatformRamImpl
.
getInstance
().
getGlobalInfo
()
!!
.
info
!=
null
)
{
con
=
PlatformRamImpl
.
getInstance
().
getGlobalInfo
()
?.
info
?.
tel
+
"\n"
+
PlatformRamImpl
.
getInstance
().
getGlobalInfo
()
?.
info
?.
work_time
con
=
PlatformRamImpl
.
getInstance
().
getGlobalInfo
()
?.
info
?.
tel
+
"\n"
+
PlatformRamImpl
.
getInstance
().
getGlobalInfo
()
?.
info
?.
work_time
}
val
dialog
=
CommonDialog
(
mContext
)
...
...
@@ -158,7 +164,8 @@ open class HomeBaseImpl: IHomeBaseEvent {
}.
setRightClick
(
"拨打"
)
{
v12
->
val
phoneIntent
=
Intent
(
Intent
.
ACTION_DIAL
,
Uri
.
parse
(
"tel:$tel"
))
Uri
.
parse
(
"tel:$tel"
)
)
mContext
?.
startActivity
(
phoneIntent
)
}
dialog
.
setMessageOnclick
{
...
...
@@ -176,8 +183,11 @@ open class HomeBaseImpl: IHomeBaseEvent {
//防止连击
return
}
var
doctorName
=
if
(
text
!=
mContext
?.
resources
?.
getString
(
R
.
string
.
search_hint
)
&&
text
!=
mContext
?.
resources
?.
getString
(
R
.
string
.
platform_search
))
text
else
""
var
doctorName
=
if
(
text
!=
mContext
?.
resources
?.
getString
(
R
.
string
.
search_hint
)
&&
text
!=
mContext
?.
resources
?.
getString
(
R
.
string
.
platform_search
)
)
text
else
""
ARouter
.
getInstance
()
.
build
(
"/consult/hot_search"
)
...
...
@@ -190,7 +200,7 @@ open class HomeBaseImpl: IHomeBaseEvent {
//防止连击
return
}
EventBus
.
getDefault
().
post
(
HomeModuleTabEvent
(
2
))
EventBus
.
getDefault
().
post
(
com
.
yidianling
.
home
.
api
.
event
.
HomeModuleTabEvent
(
2
))
// YDLRouterManager.router(IYDLRouterConstant.ROUTER_MAIN_TAB, YDLRouterParams().putExtra(IYDLRouterConstant.EXTRA_TAB, "2"))
ActionCountUtils
.
count
(
HomeBIConstants
.
YDL_USER_CONSULT_MORE_CLICK
)
}
...
...
@@ -209,8 +219,11 @@ open class HomeBaseImpl: IHomeBaseEvent {
return
}
ActionCountUtils
.
count
(
HomeBIConstants
.
YDL_USER_CONSULT_CLASSIFICATION_CLICK
,
data
.
cateId
.
toString
(),
data
.
cateTitle
?:
""
)
HomeBIConstants
.
YDL_USER_CONSULT_CLASSIFICATION_CLICK
,
data
.
cateId
.
toString
(),
data
.
cateTitle
?:
""
)
goExpertSearch
(
data
)
}
...
...
@@ -221,14 +234,24 @@ open class HomeBaseImpl: IHomeBaseEvent {
if
(
"全部类别"
==
data
.
cateTitle
||
"全部分类"
==
data
.
cateTitle
)
{
YDLRouterManager
.
router
(
IYDLRouterConstant
.
ROUTER_H5_H5
,
YDLRouterParams
().
putExtra
(
IYDLRouterConstant
.
EXTRA_URL
,
HttpConfig
.
H5_URL
+
"experts/cates"
))
YDLRouterParams
().
putExtra
(
IYDLRouterConstant
.
EXTRA_URL
,
HttpConfig
.
H5_URL
+
"experts/cates"
)
)
}
else
{
//跳转咨询频道页 服务入口
YDLRouterManager
.
router
(
IYDLRouterConstant
.
ROUTER_CONSULT_LIST
,
YDLRouterParams
().
putExtra
(
IYDLRouterConstant
.
EXTRA_CATEID
,
data
.
cateId
.
toString
()).
putExtra
(
IYDLRouterConstant
.
EXTRA_CATETITLE
,
data
.
cateTitle
!!
).
putExtra
(
IYDLRouterConstant
.
EXTRA_SHOWTYPE
,
"0"
))
YDLRouterParams
().
putExtra
(
IYDLRouterConstant
.
EXTRA_CATEID
,
data
.
cateId
.
toString
()
).
putExtra
(
IYDLRouterConstant
.
EXTRA_CATETITLE
,
data
.
cateTitle
!!
).
putExtra
(
IYDLRouterConstant
.
EXTRA_SHOWTYPE
,
"0"
)
)
}
}
...
...
@@ -245,7 +268,7 @@ open class HomeBaseImpl: IHomeBaseEvent {
//防止连击
return
}
EventBus
.
getDefault
().
post
(
HomeModuleTabEvent
(
2
))
EventBus
.
getDefault
().
post
(
com
.
yidianling
.
home
.
api
.
event
.
HomeModuleTabEvent
(
2
))
// YDLRouterManager.router(IYDLRouterConstant.ROUTER_MAIN_TAB,YDLRouterParams().putExtra(IYDLRouterConstant.EXTRA_TAB, "2"))
ActionCountUtils
.
count
(
HomeBIConstants
.
YDL_USER_CONSULT_CLICK
)
// 咨询列表页(专家服务搜索页面) ydl-user://consult/list
...
...
@@ -313,12 +336,16 @@ open class HomeBaseImpl: IHomeBaseEvent {
return
}
ActionCountUtils
.
count
(
HomeBIConstants
.
YDL_USER_LISTENER_INTRODUCTION_CLICK
,
doctorId
.
toString
())
ActionCountUtils
.
count
(
HomeBIConstants
.
YDL_USER_LISTENER_INTRODUCTION_CLICK
,
doctorId
.
toString
()
)
if
(
linkUrl
.
startsWith
(
"http"
))
{
YDLRouterManager
.
router
(
IYDLRouterConstant
.
ROUTER_H5_H5
,
YDLRouterParams
().
putExtra
(
IYDLRouterConstant
.
EXTRA_URL
,
linkUrl
),
""
)
YDLRouterParams
().
putExtra
(
IYDLRouterConstant
.
EXTRA_URL
,
linkUrl
),
""
)
}
else
{
YDLRouterManager
.
router
(
linkUrl
)
}
...
...
@@ -343,30 +370,31 @@ open class HomeBaseImpl: IHomeBaseEvent {
IYDLRouterConstant
.
ROUTER_CHAT_PRIVATE
,
YDLRouterParams
()
.
putExtra
(
IYDLRouterConstant
.
EXTRA_TOUID
,
doctorId
!!
)
.
putExtra
(
IYDLRouterConstant
.
EXTRA_USERTYPE
,
"1"
))
}
//todo xj
RouterManager
.
getImRouter
().
createTextMessage
(
doctorId
,
"你好,我想找你倾诉,请尽快上线私聊我,我在等你。"
,
object
:
IMRequestCallback
<
Void
>
{
override
fun
onSuccess
(
aVoid
:
Void
?)
{
(
mContext
as
BaseActivity
).
dismissProgressDialog
()
ToastHelper
.
show
(
"发送成功"
)
}
.
putExtra
(
IYDLRouterConstant
.
EXTRA_USERTYPE
,
"1"
)
)
}
ModularServiceManager
.
provide
(
IImService
::
class
.
java
)
.
createTextMessage
(
doctorId
,
"你好,我想找你倾诉,请尽快上线私聊我,我在等你。"
,
object
:
IMRequestCallback
<
Void
>
{
override
fun
onSuccess
(
aVoid
:
Void
?)
{
(
mContext
as
BaseActivity
).
dismissProgressDialog
()
ToastHelper
.
show
(
"发送成功"
)
}
override
fun
onFailed
(
i
:
Int
)
{
(
mContext
as
BaseActivity
).
dismissProgressDialog
()
var
message
=
"发送失败"
if
(
i
==
7101
)
{
message
=
"您已被对方拉黑!"
override
fun
onFailed
(
i
:
Int
)
{
(
mContext
as
BaseActivity
).
dismissProgressDialog
()
var
message
=
"发送失败"
if
(
i
==
7101
)
{
message
=
"您已被对方拉黑!"
}
ToastHelper
.
show
(
message
)
}
ToastHelper
.
show
(
message
)
}
override
fun
onException
(
throwable
:
Throwable
?)
{
(
mContext
as
BaseActivity
).
dismissProgressDialog
()
ToastHelper
.
show
(
"发送异常"
)
}
})
override
fun
onException
(
throwable
:
Throwable
?)
{
(
mContext
as
BaseActivity
).
dismissProgressDialog
()
ToastHelper
.
show
(
"发送异常"
)
}
})
}
...
...
@@ -388,9 +416,17 @@ open class HomeBaseImpl: IHomeBaseEvent {
}
ActionCountUtils
.
count
(
HomeBIConstants
.
YDL_USER_COURSE_CLICK
,
bean
.
id
.
toString
())
val
h5Params
=
H5Params
(
COURSE_DETAIL_H5
+
bean
.
id
,
mContext
?.
getString
(
R
.
string
.
platform_course_detail
))
val
h5Params
=
H5Params
(
COURSE_DETAIL_H5
+
bean
.
id
,
mContext
?.
getString
(
R
.
string
.
platform_course_detail
)
)
if
(!
TextUtils
.
isEmpty
(
bean
.
shareData
?.
shareUrl
))
{
val
shareData
=
ShareData
(
bean
.
shareData
?.
shareUrl
,
bean
.
shareData
?.
title
,
bean
.
shareData
?.
cover
,
bean
.
shareData
?.
desc
)
val
shareData
=
ShareData
(
bean
.
shareData
?.
shareUrl
,
bean
.
shareData
?.
title
,
bean
.
shareData
?.
cover
,
bean
.
shareData
?.
desc
)
h5Params
.
shareData
=
shareData
}
...
...
@@ -436,7 +472,8 @@ open class HomeBaseImpl: IHomeBaseEvent {
//电台详情页面
YDLRouterManager
.
router
(
IYDLRouterConstant
.
ROUTER_FM_DETAIL
,
YDLRouterParams
().
putExtra
(
IYDLRouterConstant
.
EXTRA_ID
,
bean
.
id
.
toString
()))
YDLRouterParams
().
putExtra
(
IYDLRouterConstant
.
EXTRA_ID
,
bean
.
id
.
toString
())
)
}
override
fun
fmPlayClick
(
fmDetail
:
HomeFMBean
.
ListBean
)
{
...
...
@@ -491,7 +528,8 @@ open class HomeBaseImpl: IHomeBaseEvent {
YDLRouterManager
.
router
(
IYDLRouterConstant
.
ROUTER_H5_H5
,
YDLRouterParams
().
putExtra
(
IYDLRouterConstant
.
EXTRA_URL
,
bean
.
gethUrl
()
!!
),
""
)
YDLRouterParams
().
putExtra
(
IYDLRouterConstant
.
EXTRA_URL
,
bean
.
gethUrl
()
!!
),
""
)
}
override
fun
articleMoreClick
()
{
...
...
@@ -548,7 +586,8 @@ open class HomeBaseImpl: IHomeBaseEvent {
override
fun
getConfideData
(
type
:
HomeHeaderBean
.
ListenCategoryDateBean
,
selectPosition
:
Int
)
{
ActionCountUtils
.
count
(
HomeBIConstants
.
YDL_USER_LISTEN_TYPE_CLICK
,
type
.
name
?:
""
)
?:
""
)
mHomeView
!!
.
getConfideData
(
type
.
id
.
toString
(),
selectPosition
)
}
...
...
@@ -569,11 +608,13 @@ open class HomeBaseImpl: IHomeBaseEvent {
}
else
if
(
linkUrl
.
startsWith
(
"http"
))
{
YDLRouterManager
.
router
(
IYDLRouterConstant
.
ROUTER_H5_H5
,
YDLRouterParams
().
putExtra
(
IYDLRouterConstant
.
EXTRA_URL
,
linkUrl
),
""
)
YDLRouterParams
().
putExtra
(
IYDLRouterConstant
.
EXTRA_URL
,
linkUrl
),
""
)
}
else
if
(
linkUrl
.
contains
(
"ceshi/detail?"
))
{
val
routerParamsUrls
=
YDLRouterParamsUrls
(
linkUrl
)
val
jsonObject
=
JSONObject
(
routerParamsUrls
.
getParams
())
ModularServiceManager
.
provide
(
ITestsApiService
::
class
.
java
).
testDetailH5
(
jsonObject
.
getString
(
"id"
).
toString
())
ModularServiceManager
.
provide
(
ITestsApiService
::
class
.
java
)
.
testDetailH5
(
jsonObject
.
getString
(
"id"
).
toString
())
}
else
{
YDLRouterManager
.
router
(
linkUrl
)
}
...
...
m-home/src/main/java/com/yidianling/home/modular/HomeServiceImpl.kt
0 → 100644
View file @
b81ea17f
package
com.yidianling.home.modular
import
android.content.Context
import
com.alibaba.android.arouter.facade.annotation.Route
import
com.yidianling.home.api.service.IHomeService
import
com.yidianling.home.ui.utils.Double11ActivityManagerUtils
@Route
(
path
=
"/home/HomeService"
)
class
HomeServiceImpl
:
IHomeService
{
override
fun
init
(
context
:
Context
?)
{
}
override
fun
setDouble11ShowType
(
mBool
:
Boolean
)
{
Double11ActivityManagerUtils
.
notShowDouble11Activity
=
mBool
}
}
\ No newline at end of file
m-home/src/main/java/com/yidianling/home/ui/utils/Double11ActivityManagerUtils.java
View file @
b81ea17f
...
...
@@ -8,7 +8,6 @@ public class Double11ActivityManagerUtils {
/**
* 不显示双11活动,仅用于2019年双11活动使用
*/
//todo xj 国威说需要在登录接口设置该字段,如果是第一次登录则设置为true,表示不显示,避免与新用户弹框重复
public
static
boolean
notShowDouble11Activity
=
false
;
}
m-home/src/main/modular_api/com/yidianling/home/event/HomeModuleTabEvent.java
→
m-home/src/main/modular_api/com/yidianling/home/
api/
event/HomeModuleTabEvent.java
View file @
b81ea17f
package
com
.
yidianling
.
home
.
event
;
package
com
.
yidianling
.
home
.
api
.
event
;
public
class
HomeModuleTabEvent
{
int
tabIndex
;
...
...
m-home/src/main/modular_api/com/yidianling/home/api/service/IHomeService.kt
0 → 100644
View file @
b81ea17f
package
com.yidianling.home.api.service
import
com.alibaba.android.arouter.facade.template.IProvider
interface
IHomeService
:
IProvider
{
//如果是第一次登录则设置为true,表示不显示,避免与新用户弹框重复
fun
setDouble11ShowType
(
mBool
:
Boolean
)
}
\ No newline at end of file
m-home/src/xlzx/java/com/yidianling/home/ui/fragment/YdlHomeFragment.kt
View file @
b81ea17f
...
...
@@ -27,7 +27,6 @@ import com.yidianling.home.constract.IHomeContract
import
com.yidianling.home.dialog.ActivityDialog
import
com.yidianling.home.dialog.ActivityGuideDialog
import
com.yidianling.home.event.HomeImpl
import
com.yidianling.home.event.IHomeEvent
import
com.yidianling.home.listener.HomeConfideRecyleSuspendListener
import
com.yidianling.home.model.bean.*
import
com.yidianling.home.presenter.HomePresenterImpl
...
...
@@ -49,8 +48,8 @@ import kotlinx.android.synthetic.xlzx.layout_home_module_toolbar.*
*/
class
YdlHomeFragment
:
BaseMvpFragment
<
IHomeContract
.
View
,
HomePresenterImpl
>(),
IHomeContract
.
View
,
SwipeRefreshLayout
.
OnRefreshListener
{
IHomeContract
.
View
,
SwipeRefreshLayout
.
OnRefreshListener
{
private
var
adapter
:
YdlHomeAdapter
?
=
null
...
...
@@ -96,7 +95,12 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
private
fun
initView
()
{
home_swipe_refresh_layout
.
setOnRefreshListener
(
this
)
home_swipe_refresh_layout
.
setColorSchemeColors
(
ContextCompat
.
getColor
(
context
,
R
.
color
.
platform_main_theme_blue
))
home_swipe_refresh_layout
.
setColorSchemeColors
(
ContextCompat
.
getColor
(
context
,
R
.
color
.
platform_main_theme_blue
)
)
home_swipe_refresh_layout
.
setProgressViewOffset
(
false
,
0
,
200
)
home_swipe_refresh_layout
.
isEnabled
=
false
etSearch
.
setOnClickListener
{
homeEvent
?.
searchTvClick
(
""
)
}
...
...
@@ -108,7 +112,9 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
appbar_layout
.
addOnOffsetChangedListener
{
appBarLayout
,
i
->
home_swipe_refresh_layout
.
isEnabled
=
i
>=
0
val
scale
=
java
.
lang
.
Float
.
valueOf
(
Math
.
abs
(
i
).
toFloat
())
!!
/
java
.
lang
.
Float
.
valueOf
(
appBarLayout
.
totalScrollRange
.
toFloat
())
!!
val
scale
=
java
.
lang
.
Float
.
valueOf
(
Math
.
abs
(
i
).
toFloat
())
!!
/
java
.
lang
.
Float
.
valueOf
(
appBarLayout
.
totalScrollRange
.
toFloat
()
)
!!
view_search_toolbar_bg
.
alpha
=
scale
val
leftMargin
=
inputOriginMargin
-
inputOffset
*
scale
val
rightMargin
=
inputOriginMargin
-
inputOffset
*
scale
...
...
@@ -222,12 +228,18 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
aa
=
ActivityDialog
(
activity
,
act
.
imageBanner
,
act
.
linkUrl
,
act
.
title
)
aa
?.
show
()
aa
?.
setOnDismissListener
{
if
(!
TextUtils
.
isEmpty
(
act
.
title
)){
if
(!
TextUtils
.
isEmpty
(
act
.
title
))
{
img_ad
.
post
{
val
heig
=
StatusBarUtils
.
getStatusBarHeight
(
context
)
var
location
=
IntArray
(
2
)
img_ad
.
getLocationInWindow
(
location
)
ActivityGuideDialog
(
activity
,
act
.
imageUrl
,
act
.
title
,
location
[
1
]
-
heig
,
location
[
0
]).
show
()
ActivityGuideDialog
(
activity
,
act
.
imageUrl
,
act
.
title
,
location
[
1
]
-
heig
,
location
[
0
]
).
show
()
}
}
}
...
...
@@ -269,10 +281,14 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
for
(
item
in
cacheList
)
{
imageViews
.
add
(
item
.
imageUrl
!!
)
}
banner_search
.
setImageLoader
(
GlideImageLoader
(
R
.
drawable
.
home_module_image_default_back
)).
setImages
(
imageViews
).
start
()
banner_search
.
setImageLoader
(
GlideImageLoader
(
R
.
drawable
.
home_module_image_default_back
))
.
setImages
(
imageViews
).
start
()
banner_search
.
setOnBannerListener
{
homeEvent
?.
bannerClick
(
cacheList
!!
[
it
])
YdlBuryPointUtil
.
sendClick
(
"ydl-xinlizixun-home-banner$it"
,
"${cacheList[it].imageUrl}"
)
YdlBuryPointUtil
.
sendClick
(
"ydl-xinlizixun-home-banner$it"
,
"${cacheList[it].imageUrl}"
)
}
banner_search
.
setIndicatorBottomPadding
(
20
)
}
...
...
@@ -361,7 +377,8 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
}
private
fun
showConsultAssistantDialog
()
{
ModularServiceManager
.
provide
(
IConsultantService
::
class
.
java
).
showConsultAssistantDialog
(
activity
)
ModularServiceManager
.
provide
(
IConsultantService
::
class
.
java
)
.
showConsultAssistantDialog
(
activity
)
}
private
fun
hideConsultAssistantDialog
()
{
...
...
m-user/build.gradle
View file @
b81ea17f
...
...
@@ -87,9 +87,11 @@ dependencies {
api
project
(
':ydl-platform'
)
implementation
modularPublication
(
'com.ydl:m-user-api'
)
implementation
modularPublication
(
'com.ydl:m-audioim-api'
)
implementation
modularPublication
(
'com.ydl:m-home-api'
)
}
else
{
//发布时使用
compileOnly
rootProject
.
ext
.
dependencies
[
"ydl-m-user-api"
]
compileOnly
rootProject
.
ext
.
dependencies
[
'm-home-api'
]
compileOnly
rootProject
.
ext
.
dependencies
[
"ydl-m-audioim-api"
]
api
rootProject
.
ext
.
dependencies
[
"ydl-webview"
]
api
(
rootProject
.
ext
.
dependencies
[
"ydl-platform"
])
{
...
...
m-user/src/main/java/com/yidianling/user/ui/SmsLoginActivity.kt
View file @
b81ea17f
...
...
@@ -9,11 +9,13 @@ import com.ydl.ydlcommon.base.BaseActivity
import
com.ydl.ydlcommon.bean.StatusBarOptions
import
com.ydl.ydlcommon.data.http.RxUtils
import
com.ydl.ydlcommon.data.http.ThrowableConsumer
import
com.ydl.ydlcommon.modular.ModularServiceManager
import
com.ydl.ydlcommon.router.YdlCommonOut
import
com.ydl.ydlcommon.utils.ActivityManager
import
com.ydl.ydlcommon.utils.UserInfoCache
import
com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import
com.ydl.ydlcommon.utils.remind.ToastHelper
import
com.yidianling.home.api.service.IHomeService
import
com.yidianling.router.im.IMLoginInfo
import
com.yidianling.router.im.IMRequestCallback
import
com.yidianling.user.api.bean.UserResponseBean
...
...
@@ -148,6 +150,7 @@ class SmsLoginActivity : BaseActivity() {
//关闭手势解锁页面与指纹解锁页面
finishFinger
()
if
(
it
.
firstLogin
==
1
)
{
ModularServiceManager
.
provide
(
IHomeService
::
class
.
java
).
setDouble11ShowType
(
true
)
baiduActionBury
()
}
else
{
ActionCountUtils
.
countUid
(
it
.
uid
!!
,
UserBIConstants
.
ACTION_TYPE_CODE_LOGIN
)
...
...
m-user/src/main/java/com/yidianling/user/ui/login/presenter/InputPassWordPresenterImpl.kt
View file @
b81ea17f
...
...
@@ -2,6 +2,7 @@ package com.yidianling.user.ui.login.presenter
import
android.annotation.SuppressLint
import
android.text.TextUtils
import
com.ydl.ydlcommon.modular.ModularServiceManager
import
com.ydl.ydlcommon.mvp.base.BasePresenter
import
com.ydl.ydlcommon.router.YdlCommonOut
import
com.ydl.ydlcommon.utils.StringUtils
...
...
@@ -10,6 +11,7 @@ import com.ydl.ydlcommon.utils.YDLCacheUtils
import
com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import
com.ydl.ydlcommon.utils.log.LogHelper
import
com.yidianling.common.tools.ToastUtil
import
com.yidianling.home.api.service.IHomeService
import
com.yidianling.user.api.bean.UserResponseBean
import
com.yidianling.user.LoginUtils
import
com.yidianling.user.constants.UserBIConstants
...
...
@@ -58,6 +60,7 @@ class InputPassWordPresenterImpl : BasePresenter<IInputPassWordContract.View, II
saveUserData
(
it
.
data
)
ActionCountUtils
.
count
(
UserBIConstants
.
ACTION_TYPE_RESET_PWD
)
if
(
it
.
data
.
firstLogin
==
1
)
{
//第一次登录:是注册
ModularServiceManager
.
provide
(
IHomeService
::
class
.
java
).
setDouble11ShowType
(
true
)
// 重设密码登录已经不可能是首次登录,所以不进行百度埋点
//view.baiduActionBury()
}
else
{
...
...
@@ -96,6 +99,7 @@ class InputPassWordPresenterImpl : BasePresenter<IInputPassWordContract.View, II
}
else
{
saveUserData
(
it
.
data
)
if
(
it
.
data
.
firstLogin
==
1
)
{
//第一次登录:是注册
ModularServiceManager
.
provide
(
IHomeService
::
class
.
java
).
setDouble11ShowType
(
true
)
mView
.
baiduActionBury
()
}
else
{
ActionCountUtils
.
countUid
(
UserBIConstants
.
ACTION_TYPE_PWD_LOGIN
,
it
.
data
.
uid
!!
)
...
...
m-user/src/main/java/com/yidianling/user/ui/login/presenter/LoginPresenterImpl.kt
View file @
b81ea17f
...
...
@@ -4,6 +4,7 @@ import android.annotation.SuppressLint
import
android.app.Activity
import
android.text.TextUtils
import
com.umeng.socialize.bean.SHARE_MEDIA
import
com.ydl.ydlcommon.modular.ModularServiceManager
import
com.ydl.ydlcommon.mvp.base.BasePresenter
import
com.ydl.ydlcommon.router.YdlCommonOut
...
...
@@ -11,6 +12,7 @@ import com.ydl.ydlcommon.utils.YDLCacheUtils
import
com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import
com.ydl.ydlcommon.utils.log.LogHelper
import
com.yidianling.common.tools.ToastUtil
import
com.yidianling.home.api.service.IHomeService
import
com.yidianling.user.api.bean.UserResponseBean
import
com.yidianling.user.LoginUtils
import
com.yidianling.user.UserHelper
...
...
@@ -71,6 +73,7 @@ class LoginPresenterImpl(view: ILoginContract.View) : BasePresenter<ILoginContra
//绑定手机号
saveUserData
(
it
.
data
)
if
(
it
.
data
.
firstLogin
==
1
)
{
//第一次登录:是注册
ModularServiceManager
.
provide
(
IHomeService
::
class
.
java
).
setDouble11ShowType
(
true
)
mView
.
baiduActionBury
(
it
.
data
.
uid
,
UserBIConstants
.
POSITION_ALIYUN_REGISTER_CLICK
)
}
else
{
ActionCountUtils
.
count
(
UserBIConstants
.
ACTION_TYPE_DIRECT_LOGIN
)
...
...
@@ -201,6 +204,7 @@ class LoginPresenterImpl(view: ILoginContract.View) : BasePresenter<ILoginContra
LogHelper
.
getInstance
().
writeLogSync
(
media
.
getName
()
+
"登录成功"
)
if
(
media
==
SHARE_MEDIA
.
QQ
)
{
if
(
it
.
data
.
firstLogin
==
1
)
{
//第一次登录:是注册
ModularServiceManager
.
provide
(
IHomeService
::
class
.
java
).
setDouble11ShowType
(
true
)
mView
.
baiduActionBury
(
it
.
data
.
uid
,
UserBIConstants
.
POSITION_QQ_REGISTER_CLICK
)
}
else
{
ActionCountUtils
.
count
(
UserHelper
.
getUserInfo
()
!!
.
uid
,
UserBIConstants
.
PART_ID_LOGIN_MAIN
,
...
...
@@ -209,6 +213,7 @@ class LoginPresenterImpl(view: ILoginContract.View) : BasePresenter<ILoginContra
}
}
else
{
if
(
it
.
data
.
firstLogin
==
1
)
{
//第一次登录:是注册
ModularServiceManager
.
provide
(
IHomeService
::
class
.
java
).
setDouble11ShowType
(
true
)
mView
.
baiduActionBury
(
it
.
data
.
uid
,
UserBIConstants
.
POSITION_WX_REGISTER_CLICK
)
}
else
{
ActionCountUtils
.
count
(
UserHelper
.
getUserInfo
()
!!
.
uid
,
UserBIConstants
.
PART_ID_LOGIN_MAIN
,
...
...
m-user/src/main/java/com/yidianling/user/ui/login/presenter/VerificationCodePresenterImpl.kt
View file @
b81ea17f
package
com.yidianling.user.ui.login.presenter
import
android.text.TextUtils
import
com.ydl.ydlcommon.modular.ModularServiceManager
import
com.ydl.ydlcommon.mvp.base.BasePresenter
import
com.ydl.ydlcommon.utils.YDLCacheUtils
import
com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import
com.ydl.ydlcommon.utils.log.LogHelper
import
com.yidianling.common.tools.ToastUtil
import
com.yidianling.home.api.service.IHomeService
import
com.yidianling.user.api.bean.UserResponseBean
import
com.yidianling.user.LoginUtils
import
com.yidianling.user.constants.UserBIConstants
...
...
@@ -144,6 +146,7 @@ class VerificationCodePresenterImpl(view: IVerificationCodeContract.View) : Base
saveUserData
(
it
.
data
)
if
(
it
.
data
.
firstLogin
==
1
)
{
//第一次登录:是注册
ModularServiceManager
.
provide
(
IHomeService
::
class
.
java
).
setDouble11ShowType
(
true
)
mView
.
baiduActionBury
()
}
else
{
ActionCountUtils
.
countUid
(
UserBIConstants
.
ACTION_TYPE_CODE_LOGIN
,
it
.
data
.
uid
!!
)
...
...
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