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
05ac3e79
Commit
05ac3e79
authored
Feb 03, 2021
by
刘鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.IM模块登录,接入优先一键登录功能
parent
cce935af
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
18 additions
and
11 deletions
+18
-11
config.gradle
config.gradle
+2
-2
IMChatUtil.kt
m-im/src/main/java/com/yidianling/im/helper/IMChatUtil.kt
+3
-3
IMServiceImpl.kt
m-im/src/main/java/com/yidianling/im/modular/service/IMServiceImpl.kt
+1
-2
ImIn.kt
m-im/src/main/java/com/yidianling/im/router/ImIn.kt
+9
-1
ChatFragment.kt
m-im/src/main/java/com/yidianling/im/ui/page/fragment/ChatFragment.kt
+1
-1
InteractFragment.kt
m-im/src/main/java/com/yidianling/im/ui/page/fragment/InteractFragment.kt
+1
-1
NoticeFragment.kt
m-im/src/main/java/com/yidianling/im/ui/page/fragment/NoticeFragment.kt
+1
-1
No files found.
config.gradle
View file @
05ac3e79
...
...
@@ -10,7 +10,7 @@ ext {
"m-fm"
:
"0.0.30.00"
,
"m-user"
:
"0.0.60.91"
,
"m-home"
:
"0.0.22.52"
,
"m-im"
:
"0.0.18.3
3
"
,
"m-im"
:
"0.0.18.3
4
"
,
"m-dynamic"
:
"0.0.7.13"
,
"m-article"
:
"0.0.0.6"
,
...
...
@@ -93,7 +93,7 @@ ext {
"m-fm"
:
"0.0.23.5"
,
"m-user"
:
"0.0.60.91"
,
"m-home"
:
"0.0.22.52"
,
"m-im"
:
"0.0.3.
15
"
,
"m-im"
:
"0.0.3.
34
"
,
"m-dynamic"
:
"0.0.1.7"
,
"m-muse"
:
"0.0.20.7"
,
...
...
m-im/src/main/java/com/yidianling/im/helper/IMChatUtil.kt
View file @
05ac3e79
...
...
@@ -30,8 +30,8 @@ import com.yidianling.im.bridge.P2PCustomActionHandlerImpl
import
com.yidianling.im.config.constants.ImConstants
import
com.yidianling.im.http.ImRetrofitApi.Companion.getImJavaApi
import
com.yidianling.im.http.ImRetrofitApi.Companion.getImRetrofitApi
import
com.yidianling.im.router.ImIn
import
com.yidianling.im.router.ImIn.isLogin
import
com.yidianling.im.router.ImIn.loginWayIntent
import
com.yidianling.im.session.SessionHelper
import
com.yidianling.im.ui.page.fragment.bean.ChatItemBean
import
com.yidianling.uikit.business.session.fragment.YDLMessageFragment
...
...
@@ -278,7 +278,7 @@ object IMChatUtil {
}
else
{
upLoadLog
(
"consult/get-expert"
,
resp
.
code
,
resp
.
msg
)
if
(
resp
.
code
==
ImConstants
.
HTTP_CODE_UNLOGIN
)
{
context
.
startActivity
(
loginWayIntent
(
context
)
)
ImIn
.
loginByOneKeyLogin
(
context
,
true
)
ToastUtil
.
toastShort
(
resp
.
msg
)
}
else
if
(
resp
.
code
==
ImConstants
.
SILENCED_CODE
)
{
//禁言
showSilencedDialog
(
context
,
resp
.
data
.
tips
,
resp
.
data
.
url
)
...
...
@@ -326,7 +326,7 @@ object IMChatUtil {
}
else
{
upLoadLog
(
"consult/get-expert"
,
resp
.
code
,
resp
.
msg
)
if
(
resp
.
code
==
ImConstants
.
HTTP_CODE_UNLOGIN
)
{
context
.
startActivity
(
loginWayIntent
(
context
)
)
ImIn
.
loginByOneKeyLogin
(
context
,
true
)
ToastUtil
.
toastShort
(
resp
.
msg
)
}
else
if
(
resp
.
code
==
ImConstants
.
SILENCED_CODE
)
{
//禁言
showSilencedDialog
(
context
,
resp
.
data
.
tips
,
resp
.
data
.
url
)
...
...
m-im/src/main/java/com/yidianling/im/modular/service/IMServiceImpl.kt
View file @
05ac3e79
...
...
@@ -70,8 +70,7 @@ class IMServiceImpl : IImService {
}
override
fun
startP2PXiaoYi
(
context
:
Context
)
{
if
(!
ImIn
.
isLogin
())
{
context
.
startActivity
(
ImIn
.
loginWayIntent
(
context
))
if
(!
ImIn
.
loginByOneKeyLogin
(
context
,
true
))
{
return
}
SessionHelper
.
startP2PSession
(
context
,
-
1
,
ImConstants
.
KEFUXIAOYI
,
null
,
P2PCustomActionHandlerImpl
(
"14"
,
"客服小壹"
,
"https://static.ydlcdn.com/mobile/images/avatar_girl_app.png"
))
...
...
m-im/src/main/java/com/yidianling/im/router/ImIn.kt
View file @
05ac3e79
...
...
@@ -103,7 +103,7 @@ object ImIn {
*/
fun
isLogin
(
activity
:
Context
,
flag
:
Boolean
):
Boolean
{
if
(!
isLogin
()
&&
flag
)
{
YDLRouterManager
.
router
(
IYDLRouterConstant
.
ROUTER_MINE_LOGIN
)
getUserService
().
loginByOneKeyLogin
(
activity
,
true
)
return
false
}
else
{
return
true
...
...
@@ -293,4 +293,12 @@ object ImIn {
fun
getGlobalInfo
():
GlobalInfo
?
{
return
PlatformDataManager
.
getRam
().
getGlobalInfo
()
}
/**
* 调用优先使用一键登录,并返回调用时的登录状态,
* @param isOpenDialog true:一键登录使用弹窗展示 false:一键登录使用全屏模式
* @return true:已登录,不触发登录跳转,false:未登录,优先一键登录
* */
fun
loginByOneKeyLogin
(
context
:
Context
,
isOpenDialog
:
Boolean
)
:
Boolean
{
return
getUserService
().
loginByOneKeyLogin
(
context
,
isOpenDialog
)
}
}
m-im/src/main/java/com/yidianling/im/ui/page/fragment/ChatFragment.kt
View file @
05ac3e79
...
...
@@ -280,7 +280,7 @@ class ChatFragment : BaseFragment(), XRecyclerView.LoadingListener {
ll_chat_unusual_view
.
setUnusualType
(
ChatUnusualView
.
TYPE_UNLOGIN
)
ll_chat_unusual_view
.
setListener
(
object
:
ChatUnusualView
.
ChatUnusualListener
{
override
fun
onButtonClick
()
{
context
.
startActivity
(
ImIn
.
loginWayIntent
(
context
)
)
ImIn
.
loginByOneKeyLogin
(
context
,
true
)
}
})
}
...
...
m-im/src/main/java/com/yidianling/im/ui/page/fragment/InteractFragment.kt
View file @
05ac3e79
...
...
@@ -196,7 +196,7 @@ class InteractFragment : BaseFragment(), XRecyclerView.LoadingListener {
ll_interact_unusual_view
.
setUnusualType
(
ChatUnusualView
.
TYPE_UNLOGIN
)
ll_interact_unusual_view
.
setListener
(
object
:
ChatUnusualView
.
ChatUnusualListener
{
override
fun
onButtonClick
()
{
context
.
startActivity
(
ImIn
.
loginWayIntent
(
context
)
)
ImIn
.
loginByOneKeyLogin
(
context
,
true
)
}
})
}
...
...
m-im/src/main/java/com/yidianling/im/ui/page/fragment/NoticeFragment.kt
View file @
05ac3e79
...
...
@@ -120,7 +120,7 @@ class NoticeFragment : BaseFragment(), XRecyclerView.LoadingListener {
ll_notice_unusual_view
.
setUnusualType
(
ChatUnusualView
.
TYPE_UNLOGIN
)
ll_notice_unusual_view
.
setListener
(
object
:
ChatUnusualView
.
ChatUnusualListener
{
override
fun
onButtonClick
()
{
context
.
startActivity
(
ImIn
.
loginWayIntent
(
context
)
)
ImIn
.
loginByOneKeyLogin
(
context
,
true
)
}
})
}
...
...
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