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
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
78 additions
and
13 deletions
+78
-13
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
+0
-0
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
This diff is collapsed.
Click to expand it.
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