Commit a4bf525c by 刘鹏

1.课程模块,登录接入优先一键登录功能

parent 56a15b4a
......@@ -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)
}
......
......@@ -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)
}
......
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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment