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
a4bf525c
Commit
a4bf525c
authored
Feb 04, 2021
by
刘鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.课程模块,登录接入优先一键登录功能
parent
56a15b4a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
5 deletions
+13
-5
CoursePlayActivity.kt
m-course/src/main/java/com/yidianling/course/coursePlay/CoursePlayActivity.kt
+2
-4
CoursePlugin.kt
m-course/src/main/java/com/yidianling/course/flutterPlugin/CoursePlugin.kt
+1
-1
CourseIn.kt
m-course/src/main/java/com/yidianling/course/router/CourseIn.kt
+10
-0
No files found.
m-course/src/main/java/com/yidianling/course/coursePlay/CoursePlayActivity.kt
View file @
a4bf525c
...
...
@@ -572,7 +572,7 @@ class CoursePlayActivity : BaseActivity() {
}
val
userInfo
=
YdlCommonRouterManager
.
getYdlCommonRoute
().
getUserInfo
()
if
(
userInfo
==
null
||
TextUtils
.
isEmpty
(
userInfo
.
userId
))
{
YDLRouterManager
.
router
(
IYDLRouterConstant
.
ROUTER_MINE_LOGIN
)
CourseIn
.
loginByOneKeyLogin
(
mContext
,
true
)
return
}
...
...
@@ -617,9 +617,7 @@ class CoursePlayActivity : BaseActivity() {
if
(
1
==
type
)
{
ModularServiceManager
.
getPlatformUserService
()
if
(
CourseIn
.
isLogin
())
{
CourseIn
.
loginWayIntent
(
this
@CoursePlayActivity
)
}
else
{
if
(
CourseIn
.
loginByOneKeyLogin
(
this
@CoursePlayActivity
,
true
))
{
//分享到心事动态
toTrend
(
share
)
}
...
...
m-course/src/main/java/com/yidianling/course/flutterPlugin/CoursePlugin.kt
View file @
a4bf525c
...
...
@@ -128,7 +128,7 @@ class CoursePlugin : MethodChannel.MethodCallHandler {
"0"
)
)
{
mFragment
!!
.
startActivity
(
CourseIn
.
loginWayIntent
(
mFragment
!!
.
activity
!!
)
)
CourseIn
.
loginByOneKeyLogin
(
mFragment
!!
.
activity
!!
,
true
)
}
else
{
MyCourseActivity
.
start
(
mFragment
!!
.
activity
)
}
...
...
m-course/src/main/java/com/yidianling/course/router/CourseIn.kt
View file @
a4bf525c
package
com.yidianling.course.router
import
android.app.Activity
import
android.content.Context
import
android.content.Intent
import
com.ydl.ydlcommon.modular.ModularServiceManager
import
com.yidianling.dynamic.api.IDynamicService
...
...
@@ -29,4 +30,12 @@ object CourseIn {
return
ModularServiceManager
.
provide
(
IUserService
::
class
.
java
).
loginWayIntent
(
activity
)
}
/**
* 调用优先使用一键登录,并返回调用时的登录状态,
* @param isOpenDialog true:一键登录使用弹窗展示 false:一键登录使用全屏模式
* @return true:已登录,不触发登录跳转,false:未登录,优先一键登录
* */
fun
loginByOneKeyLogin
(
context
:
Context
,
isOpenDialog
:
Boolean
)
:
Boolean
{
return
ModularServiceManager
.
provide
(
IUserService
::
class
.
java
).
loginByOneKeyLogin
(
context
,
isOpenDialog
)
}
}
\ 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