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
a035c744
Commit
a035c744
authored
Apr 08, 2022
by
yang.kai
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/最新Dev' into 最新Dev
parents
1ead59d1
fe9433f7
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
98 additions
and
17 deletions
+98
-17
config.gradle
config.gradle
+8
-8
ConsultAssistantDialogUtils.kt
m-consultant/src/main/java/com/yidianling/consultant/modular/singlton/ConsultAssistantDialogUtils.kt
+38
-6
CmsExamQuestionPaperActivity.kt
m-im/src/main/java/com/yidianling/im/ui/activity/CmsExamQuestionPaperActivity.kt
+1
-1
LoginUtils.kt
m-user/src/main/java/com/yidianling/user/LoginUtils.kt
+6
-1
UserServiceImp.kt
m-user/src/main/java/com/yidianling/user/modular_service/UserServiceImp.kt
+10
-0
OneKeyLoginHelp.kt
m-user/src/main/java/com/yidianling/user/ui/login/OneKeyLoginHelp.kt
+19
-1
LoginCallBackListener.kt
m-user/src/main/modular_api/com/yidianling/user/api/listener/LoginCallBackListener.kt
+7
-0
IUserService.kt
m-user/src/main/modular_api/com/yidianling/user/api/service/IUserService.kt
+9
-0
No files found.
config.gradle
View file @
a035c744
...
...
@@ -6,11 +6,11 @@ ext {
// -------------- 业务模块 --------------
//第三步 若干
"m-confide"
:
"0.0.49.52"
,
"m-consultant"
:
"0.0.60.0
4
"
,
"m-consultant"
:
"0.0.60.0
8
"
,
"m-fm"
:
"0.0.30.04"
,
"m-user"
:
"0.0.61.9
4
"
,
"m-user"
:
"0.0.61.9
6
"
,
"m-home"
:
"0.0.22.85"
,
"m-im"
:
"0.0.21.1
7
"
,
"m-im"
:
"0.0.21.1
8
"
,
"m-dynamic"
:
"0.0.7.35"
,
"m-article"
:
"0.0.0.10"
,
...
...
@@ -26,7 +26,7 @@ ext {
"m-fm-api"
:
"0.0.3"
,
"m-muse-api"
:
"0.0.1"
,
"m-tests-api"
:
"0.0.2"
,
"m-user-api"
:
"0.0.10.1
7
"
,
"m-user-api"
:
"0.0.10.1
9
"
,
"m-home-api"
:
"0.0.4.2"
,
"m-im-api"
:
"0.0.12.23"
,
"m-dynamic-api"
:
"0.0.3.71"
,
...
...
@@ -90,11 +90,11 @@ ext {
//第三步 若干
"m-confide"
:
"0.0.49.52"
,
"m-consultant"
:
"0.0.60.0
3
"
,
"m-consultant"
:
"0.0.60.0
8
"
,
"m-fm"
:
"0.0.30.07"
,
"m-user"
:
"0.0.61.9
4
"
,
"m-user"
:
"0.0.61.9
6
"
,
"m-home"
:
"0.0.22.85"
,
"m-im"
:
"0.0.21.1
7
"
,
"m-im"
:
"0.0.21.1
8
"
,
"m-dynamic"
:
"0.0.7.35"
,
"m-article"
:
"0.0.0.8"
,
...
...
@@ -109,7 +109,7 @@ ext {
"m-fm-api"
:
"0.0.3"
,
"m-muse-api"
:
"0.0.1"
,
"m-tests-api"
:
"0.0.2"
,
"m-user-api"
:
"0.0.10.1
7
"
,
"m-user-api"
:
"0.0.10.1
9
"
,
"m-home-api"
:
"0.0.4.2"
,
"m-im-api"
:
"0.0.12.23"
,
"m-dynamic-api"
:
"0.0.3.71"
,
...
...
m-consultant/src/main/java/com/yidianling/consultant/modular/singlton/ConsultAssistantDialogUtils.kt
View file @
a035c744
...
...
@@ -5,6 +5,7 @@ import android.app.Activity
import
androidx.appcompat.app.AppCompatActivity
import
com.ydl.ydlcommon.data.http.ThrowableConsumer
import
com.ydl.ydlcommon.utils.ActivityManager
import
com.ydl.ydlcommon.utils.LogUtil
import
com.ydl.ydlcommon.utils.Utils
import
com.ydl.ydlcommon.utils.YdlBuryPointUtil
import
com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
...
...
@@ -16,6 +17,7 @@ import com.yidianling.consultant.dialog.ConsultAssistantDialog
import
com.yidianling.consultant.model.SearchApi
import
com.yidianling.consultant.router.ConsultantIn
import
com.yidianling.home.api.event.HomeModuleTabEvent
import
com.yidianling.user.api.listener.LoginCallBackListener
import
de.greenrobot.event.EventBus
import
io.reactivex.android.schedulers.AndroidSchedulers
import
io.reactivex.functions.Consumer
...
...
@@ -114,11 +116,22 @@ class ConsultAssistantDialogUtils private constructor() {
if
(
Utils
.
isFastClick
())
{
return
onClickAction
()
}
if
(
ConsultantIn
.
getUserImpl
().
loginByOneKeyLogin
(
activity
,
true
)){
if
(
ConsultantIn
.
getUserImpl
().
isLogin
(
)){
//获取用户uid
ActionCountUtils
.
count
(
"main_page|main_daoyi_entry_click"
)
YdlBuryPointUtil
.
sendClick
(
"home_page_assistant_click"
)
getConsultAssistantUid
(
""
,
activity
,
1
)
}
else
{
ConsultantIn
.
getUserImpl
().
loginByOneKeyLoginCallBack
(
activity
,
true
,
object
:
LoginCallBackListener
{
override
fun
loginSuccess
()
{
//获取用户uid
ActionCountUtils
.
count
(
"main_page|main_daoyi_entry_click"
)
YdlBuryPointUtil
.
sendClick
(
"home_page_assistant_click"
)
getConsultAssistantUid
(
""
,
activity
,
1
)
}
override
fun
notLogin
()
{
}
})
}
}
...
...
@@ -150,10 +163,20 @@ class ConsultAssistantDialogUtils private constructor() {
if
(
Utils
.
isFastClick
())
{
return
onClickAction
()
}
if
(!
ConsultantIn
.
getUserImpl
().
loginByOneKeyLogin
(
activity
,
true
))
{
return
if
(
ConsultantIn
.
getUserImpl
().
isLogin
()){
//获取用户uid
getConsultAssistantUid
(
""
,
activity
,
17
)
}
else
{
ConsultantIn
.
getUserImpl
().
loginByOneKeyLoginCallBack
(
activity
,
true
,
object
:
LoginCallBackListener
{
override
fun
loginSuccess
()
{
//获取用户uid
getConsultAssistantUid
(
""
,
activity
,
17
)
}
override
fun
notLogin
()
{
}
})
}
getConsultAssistantUid
(
""
,
activity
,
17
)
}
})
...
...
@@ -243,10 +266,19 @@ class ConsultAssistantDialogUtils private constructor() {
}
ActionCountUtils
.
count
(
"app_consult_list_page|app_consult_list_daoyi_entry_click"
)
YdlBuryPointUtil
.
sendClick
(
"assistant_list_click"
)
// 咨询师列表页面且未登录情况下,跳转登录页面
if
(
ConsultantIn
.
loginByOneKeyLogin
(
activity
,
true
))
{
if
(
ConsultantIn
.
getUserImpl
().
isLogin
())
{
//获取用户uid
getConsultAssistantUid
(
origin
,
activity
,
6
)
}
else
{
ConsultantIn
.
getUserImpl
().
loginByOneKeyLoginCallBack
(
activity
,
true
,
object
:
LoginCallBackListener
{
override
fun
loginSuccess
()
{
//获取用户uid
getConsultAssistantUid
(
origin
,
activity
,
6
)
}
override
fun
notLogin
()
{
}
})
}
}
...
...
m-im/src/main/java/com/yidianling/im/ui/activity/CmsExamQuestionPaperActivity.kt
View file @
a035c744
...
...
@@ -841,7 +841,7 @@ class CmsExamQuestionPaperActivity : BaseActivity() {
ToastUtil
.
toastShort
(
"咨询助理忙碌中,请稍后再试"
)
})
}
},
2
000
)
},
1
000
)
}
...
...
m-user/src/main/java/com/yidianling/user/LoginUtils.kt
View file @
a035c744
...
...
@@ -14,6 +14,7 @@ import com.yidianling.im.api.bean.IMRequestCallback
import
com.yidianling.user.api.bean.UserResponseBean
import
com.yidianling.user.api.event.UserLoginEvent
import
com.yidianling.user.api.event.UserLogoutEvent
import
com.yidianling.user.api.listener.LoginCallBackListener
import
com.yidianling.user.http.UserHttpImpl
import
com.yidianling.user.http.request.Logout
import
com.yidianling.user.route.UserIn
...
...
@@ -35,7 +36,10 @@ import io.reactivex.android.schedulers.AndroidSchedulers
* time : 2018/05/09
*/
object
LoginUtils
{
var
logingCallBackListener
:
LoginCallBackListener
?
=
null
fun
setLoginCallBack
(
listener
:
LoginCallBackListener
)
{
logingCallBackListener
=
listener
}
@JvmStatic
fun
saveData
(
userInfo
:
UserResponseBean
?)
{
UserHelper
.
setUserinfo
(
userInfo
)
...
...
@@ -107,6 +111,7 @@ object LoginUtils {
@JvmStatic
fun
loginSuccessOperate
(
activity
:
Activity
)
{
logingCallBackListener
?.
loginSuccess
()
// 登录成功后,如果一键登录界面没有关闭,则关闭掉
OneKeyLoginHelp
.
quitLoginPage
()
val
size
=
ActivityManager
.
getActivitySize
()
...
...
m-user/src/main/java/com/yidianling/user/modular_service/UserServiceImp.kt
View file @
a035c744
...
...
@@ -20,6 +20,7 @@ import com.yidianling.user.UserConstants
import
com.yidianling.user.UserHelper
import
com.yidianling.user.api.bean.UserResponseBean
import
com.yidianling.user.api.bean.UserSettingBean
import
com.yidianling.user.api.listener.LoginCallBackListener
import
com.yidianling.user.api.listener.SecretDataListener
import
com.yidianling.user.api.listener.UserInfoFromApiListener
import
com.yidianling.user.api.listener.VersionUpdateStatusListener
...
...
@@ -321,4 +322,12 @@ public class UserServiceImp : IUserService {
override
fun
loginByOneKeyLogin
(
context
:
Context
,
isOpenDialog
:
Boolean
):
Boolean
{
return
OneKeyLoginHelp
.
startLoginByStatus
(
context
,
isOpenDialog
)
}
override
fun
loginByOneKeyLoginCallBack
(
context
:
Context
,
isOpenDialog
:
Boolean
,
listener
:
LoginCallBackListener
)
{
OneKeyLoginHelp
.
startLoginByStatusLoginCallBack
(
context
,
isOpenDialog
,
listener
)
}
}
\ No newline at end of file
m-user/src/main/java/com/yidianling/user/ui/login/OneKeyLoginHelp.kt
View file @
a035c744
...
...
@@ -35,6 +35,7 @@ import com.yidianling.user.LoginUtils
import
com.yidianling.user.StatusUtils
import
com.yidianling.user.UserHelper
import
com.yidianling.user.api.bean.UserResponseBean
import
com.yidianling.user.api.listener.LoginCallBackListener
import
com.yidianling.user.constants.UserBIConstants
import
com.yidianling.user.http.LoginApiRequestUtil
import
com.yidianling.user.http.request.PhoneLoginAutoParam
...
...
@@ -526,6 +527,7 @@ object OneKeyLoginHelp {
// 号码验证监听
private
lateinit
var
verifyTokenResultListener
:
VerifyTokenResultListener
interface
VerifyTokenResultListener
{
fun
onTokenSuccess
(
result
:
String
)
...
...
@@ -591,7 +593,23 @@ object OneKeyLoginHelp {
}
return
UserHelper
.
isLogin
()
}
/**
* @param isOpenDialog true: 使用弹窗展示一键登录
* false: 使用全页面展示一键登录
* @return true:登录。false:未登录
* */
fun
startLoginByStatusLoginCallBack
(
context
:
Context
,
isOpenDialog
:
Boolean
,
listener
:
LoginCallBackListener
)
{
LoginUtils
.
setLoginCallBack
(
listener
)
if
(!
UserHelper
.
isLogin
())
{
if
(
this
::
mActivity
.
isInitialized
)
{
//如果mActivity有初始化,代表项目使用了一键登录
startLogin
(
context
as
Activity
,
isOpenDialog
)
}
else
{
//如果mActivity未初始化,使用正常登录
RegisterAndLoginActivity
.
start
(
context
)
}
}
}
/**
* @param isOpenDialog true 使用弹窗
* */
...
...
m-user/src/main/modular_api/com/yidianling/user/api/listener/LoginCallBackListener.kt
0 → 100644
View file @
a035c744
package
com.yidianling.user.api.listener
interface
LoginCallBackListener
{
fun
loginSuccess
()
fun
notLogin
()
}
\ No newline at end of file
m-user/src/main/modular_api/com/yidianling/user/api/service/IUserService.kt
View file @
a035c744
...
...
@@ -7,6 +7,7 @@ import androidx.fragment.app.Fragment
import
com.alibaba.android.arouter.facade.template.IProvider
import
com.yidianling.user.api.bean.UserResponseBean
import
com.yidianling.user.api.bean.UserSettingBean
import
com.yidianling.user.api.listener.LoginCallBackListener
import
com.yidianling.user.api.listener.SecretDataListener
import
com.yidianling.user.api.listener.UserInfoFromApiListener
import
com.yidianling.user.api.listener.VersionUpdateStatusListener
...
...
@@ -114,4 +115,11 @@ interface IUserService : IProvider {
* @return true:已登录,不触发登录跳转,false:未登录,优先一键登录
* */
fun
loginByOneKeyLogin
(
context
:
Context
,
isOpenDialog
:
Boolean
)
:
Boolean
/**
* 调用优先使用一键登录,并返回调用时的登录状态,
* @param isOpenDialog true:一键登录使用弹窗展示 false:一键登录使用全屏模式
* @return true:已登录,不触发登录跳转,false:未登录,优先一键登录
* */
fun
loginByOneKeyLoginCallBack
(
context
:
Context
,
isOpenDialog
:
Boolean
,
listener
:
LoginCallBackListener
)
}
\ No newline at end of file
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