Commit 402ac5e5 by 刘鹏

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

parent 05ac3e79
......@@ -7,7 +7,7 @@ ext {
//第三步 若干
"m-confide" : "0.0.48.92",
"m-consultant" : "0.0.59.65",
"m-fm" : "0.0.30.00",
"m-fm" : "0.0.30.01",
"m-user" : "0.0.60.91",
"m-home" : "0.0.22.52",
"m-im" : "0.0.18.34",
......
......@@ -462,8 +462,7 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen
}
} else if (i == R.id.iv_love) {
if (!FMIn.INSTANCE.isLogin()) {
startActivity(FMIn.INSTANCE.loginWayIntent(this));
if (!FMIn.INSTANCE.loginByOneKeyLogin(this,true)){
return;
}
collect();
......@@ -491,10 +490,9 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen
YDLShareDialog dialog = YDLShareDialog.Companion.style1(this, fmDetail.getTitle(), fmDetail.getShare_url(), "", fmDetail.getImage_url());
dialog.setCallBack(type -> {
if (1 == type) {
if (!FMIn.INSTANCE.isLogin()) {
if (!FMIn.INSTANCE.loginByOneKeyLogin(this,true)){
isToTrend = true;
startActivity(FMIn.INSTANCE.loginWayIntent(this));
} else {
}else {
//分享到心事动态
toTrend();
}
......
package com.yidianling.fm.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
......@@ -39,6 +40,13 @@ object FMIn {
fun publisFmToTrend(activity: Activity, url: String, cover: String, title: String) : Intent?{
return getDynamicService()?.publishFmToTrend(activity,url,cover,title)
}
/**
* 调用优先使用一键登录,并返回调用时的登录状态,
* @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