Commit 80de5327 by 刘鹏

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

parent 402ac5e5
...@@ -11,12 +11,12 @@ ext { ...@@ -11,12 +11,12 @@ ext {
"m-user" : "0.0.60.91", "m-user" : "0.0.60.91",
"m-home" : "0.0.22.52", "m-home" : "0.0.22.52",
"m-im" : "0.0.18.34", "m-im" : "0.0.18.34",
"m-dynamic" : "0.0.7.13", "m-dynamic" : "0.0.7.15",
"m-article" : "0.0.0.6", "m-article" : "0.0.0.6",
"m-muse" : "0.0.28.20", "m-muse" : "0.0.28.20",
"m-tests" : "0.0.24.10", "m-tests" : "0.0.24.10",
"m-course" : "0.0.42.14", "m-course" : "0.0.42.16",
//-------------- 业务模块 API 层 -------------- //-------------- 业务模块 API 层 --------------
"m-audioim-api" : "0.0.6", "m-audioim-api" : "0.0.6",
...@@ -90,15 +90,15 @@ ext { ...@@ -90,15 +90,15 @@ ext {
"m-confide" : "0.0.48.92", "m-confide" : "0.0.48.92",
"m-consultant" : "0.0.59.65", "m-consultant" : "0.0.59.65",
"m-fm" : "0.0.23.5", "m-fm" : "0.0.30.01",
"m-user" : "0.0.60.91", "m-user" : "0.0.60.91",
"m-home" : "0.0.22.52", "m-home" : "0.0.22.52",
"m-im" : "0.0.3.34", "m-im" : "0.0.3.34",
"m-dynamic" : "0.0.1.7", "m-dynamic" : "0.0.7.15",
"m-muse" : "0.0.20.7", "m-muse" : "0.0.20.7",
"m-tests" : "0.0.24.9", "m-tests" : "0.0.24.9",
"m-course" : "0.0.34.10", "m-course" : "0.0.42.16",
//-------------- 业务模块 API 层 -------------- //-------------- 业务模块 API 层 --------------
"m-audioim-api" : "0.0.6", "m-audioim-api" : "0.0.6",
"m-confide-api" : "0.0.2.1", "m-confide-api" : "0.0.2.1",
......
...@@ -29,13 +29,14 @@ import com.ydl.ydl_image.module.GlideApp; ...@@ -29,13 +29,14 @@ import com.ydl.ydl_image.module.GlideApp;
import com.ydl.ydlcommon.base.BaseActivity; import com.ydl.ydlcommon.base.BaseActivity;
import com.ydl.ydlcommon.base.config.YDLConstants; import com.ydl.ydlcommon.base.config.YDLConstants;
import com.ydl.ydlcommon.data.http.RxUtils; import com.ydl.ydlcommon.data.http.RxUtils;
import com.ydl.ydlcommon.ui.ParcelableImage;
import com.ydl.ydlcommon.utils.StatusBarUtils; import com.ydl.ydlcommon.utils.StatusBarUtils;
import com.ydl.ydlcommon.view.dialog.ListDialog; import com.ydl.ydlcommon.view.dialog.ListDialog;
import com.ydl.ydlcommon.view.widgets.BorderCircleImageView; import com.ydl.ydlcommon.view.widgets.BorderCircleImageView;
import com.ydl.ydlcommon.view.widgets.MyNestedScrollView; import com.ydl.ydlcommon.view.widgets.MyNestedScrollView;
import com.yidianling.common.tools.ToastUtil; import com.yidianling.common.tools.ToastUtil;
import com.yidianling.dynamic.bean.DynamicConstants;
import com.yidianling.dynamic.R; import com.yidianling.dynamic.R;
import com.yidianling.dynamic.bean.DynamicConstants;
import com.yidianling.dynamic.common.browsePictures.BrowsePicturesActivity; import com.yidianling.dynamic.common.browsePictures.BrowsePicturesActivity;
import com.yidianling.dynamic.common.net.DynamicApiUtils; import com.yidianling.dynamic.common.net.DynamicApiUtils;
import com.yidianling.dynamic.dialog.CancelFocusDialog; import com.yidianling.dynamic.dialog.CancelFocusDialog;
...@@ -43,7 +44,6 @@ import com.yidianling.dynamic.event.BlackEvent; ...@@ -43,7 +44,6 @@ import com.yidianling.dynamic.event.BlackEvent;
import com.yidianling.dynamic.event.LoginStateEvent; import com.yidianling.dynamic.event.LoginStateEvent;
import com.yidianling.dynamic.model.Command; import com.yidianling.dynamic.model.Command;
import com.yidianling.dynamic.model.MemberInfoBean; import com.yidianling.dynamic.model.MemberInfoBean;
import com.ydl.ydlcommon.ui.ParcelableImage;
import com.yidianling.dynamic.router.DynamicIn; import com.yidianling.dynamic.router.DynamicIn;
import com.yidianling.dynamic.trendList.TrendListInFragment; import com.yidianling.dynamic.trendList.TrendListInFragment;
import com.yidianling.user.api.event.UserLoginEvent; import com.yidianling.user.api.event.UserLoginEvent;
...@@ -325,10 +325,7 @@ public class MembersActivity extends BaseActivity implements View.OnClickListene ...@@ -325,10 +325,7 @@ public class MembersActivity extends BaseActivity implements View.OnClickListene
if (v.getId()==R.id.members_title_back_iv){ if (v.getId()==R.id.members_title_back_iv){
onBackPressed(); onBackPressed();
}else if (v.getId()==R.id.members_title_top_right_tv){ }else if (v.getId()==R.id.members_title_top_right_tv){
boolean loginstate = DynamicIn.INSTANCE.isLogin(); if (DynamicIn.INSTANCE.loginByOneKeyLogin(this, true)) {
if (false == loginstate) {
startActivity(DynamicIn.INSTANCE.loginWayIntent(this));
} else {
RightSet(); RightSet();
} }
}else if (v.getId()==R.id.members_trend_rel){ }else if (v.getId()==R.id.members_trend_rel){
...@@ -336,10 +333,7 @@ public class MembersActivity extends BaseActivity implements View.OnClickListene ...@@ -336,10 +333,7 @@ public class MembersActivity extends BaseActivity implements View.OnClickListene
}else if (v.getId()==R.id.members_information_rel){ }else if (v.getId()==R.id.members_information_rel){
setTabSelection(1); setTabSelection(1);
}else if (v.getId()==R.id.members_top_user_focus_ortion_rel){ }else if (v.getId()==R.id.members_top_user_focus_ortion_rel){
if (DynamicIn.INSTANCE.isLogin() == false) { if (DynamicIn.INSTANCE.loginByOneKeyLogin(this, true)) {
startActivity(DynamicIn.INSTANCE.loginWayIntent(this));
// startActivity(new Intent(mContext, ChooseLoginWayActivity.class));
} else {
if (shielding == false) { if (shielding == false) {
if ("1".equals(focus_state)) {//1已关注,2未关注,4代表自己 if ("1".equals(focus_state)) {//1已关注,2未关注,4代表自己
String phone = DynamicIn.INSTANCE.getUserInfo().getPhone(); String phone = DynamicIn.INSTANCE.getUserInfo().getPhone();
...@@ -360,12 +354,8 @@ public class MembersActivity extends BaseActivity implements View.OnClickListene ...@@ -360,12 +354,8 @@ public class MembersActivity extends BaseActivity implements View.OnClickListene
} }
} }
}else if (v.getId()==R.id.members_top_user_focus_iv){ }else if (v.getId()==R.id.members_top_user_focus_iv){
if (DynamicIn.INSTANCE.isLogin() == false) { if (DynamicIn.INSTANCE.loginByOneKeyLogin(this,true)) {
startActivity(DynamicIn.INSTANCE.loginWayIntent(this));
// startActivity(new Intent(mContext, ChooseLoginWayActivity.class));
} else {
Zan(); Zan();
} }
}else if (v.getId()== R.id.members_top_head_iv){ }else if (v.getId()== R.id.members_top_head_iv){
Intent intent = new Intent(); Intent intent = new Intent();
...@@ -686,13 +676,8 @@ public class MembersActivity extends BaseActivity implements View.OnClickListene ...@@ -686,13 +676,8 @@ public class MembersActivity extends BaseActivity implements View.OnClickListene
builder1.SetOnItemClickLister(new ListDialog.Builder.OnItemClickLister() { builder1.SetOnItemClickLister(new ListDialog.Builder.OnItemClickLister() {
@Override @Override
public void onItemClick(Dialog dialog, View view, int position) { public void onItemClick(Dialog dialog, View view, int position) {
// ToastUtil.toastShort(mContext, dialog_datas.get(position));
dialog.dismiss(); dialog.dismiss();
if (!DynamicIn.INSTANCE.isLogin()) { if (!DynamicIn.INSTANCE.loginByOneKeyLogin(MembersActivity.this,true)) {
//未登录则跳转登录页面
startActivity(DynamicIn.INSTANCE.loginWayIntent(MembersActivity.this));
// Intent intent = new Intent(mContext, ChooseLoginWayActivity.class);
// startActivity(intent);
return; return;
} }
Command.ReportWorry cmd = new Command.ReportWorry(Integer.valueOf(mem_id), Integer.valueOf(reportReasonsId.get(position)), 0, reportReasons.get(position), 2); Command.ReportWorry cmd = new Command.ReportWorry(Integer.valueOf(mem_id), Integer.valueOf(reportReasonsId.get(position)), 0, reportReasons.get(position), 2);
......
package com.yidianling.dynamic.router package com.yidianling.dynamic.router
import android.app.Activity import android.app.Activity
import android.content.Context
import android.content.Intent import android.content.Intent
import android.support.v4.app.DialogFragment import android.support.v4.app.DialogFragment
import android.support.v7.app.AppCompatActivity import android.support.v7.app.AppCompatActivity
...@@ -172,4 +173,12 @@ object DynamicIn { ...@@ -172,4 +173,12 @@ object DynamicIn {
fun startCoursePlayPage(activity: Activity){ fun startCoursePlayPage(activity: Activity){
getCourseService().startCoursePlayPage(activity,1) getCourseService().startCoursePlayPage(activity,1)
} }
/**
* 调用优先使用一键登录,并返回调用时的登录状态,
* @param isOpenDialog true:一键登录使用弹窗展示 false:一键登录使用全屏模式
* @return true:已登录,不触发登录跳转,false:未登录,优先一键登录
* */
fun loginByOneKeyLogin(context: Context, isOpenDialog: Boolean) :Boolean{
return getUserService().loginByOneKeyLogin(context,isOpenDialog)
}
} }
\ No newline at end of file
...@@ -98,12 +98,9 @@ public class ShowIntroduceDialogFragment extends BaseDialogFragment { ...@@ -98,12 +98,9 @@ public class ShowIntroduceDialogFragment extends BaseDialogFragment {
NewH5Activity.start(getActivity(), h5Params); NewH5Activity.start(getActivity(), h5Params);
} else if (zjservice.is_online.equals("2")) { } else if (zjservice.is_online.equals("2")) {
if (!DynamicIn.INSTANCE.isLogin()) { if (!DynamicIn.INSTANCE.loginByOneKeyLogin(getActivity(),true)) {
// OuterEmptyImp.gotoChooseLoginWay(getActivity());
startActivity(DynamicIn.INSTANCE.loginWayIntent(getActivity()));
return; return;
} }
H5Params h5Params = new H5Params(DynamicConstants.Companion.getWWWXIADAN() + docid, null); H5Params h5Params = new H5Params(DynamicConstants.Companion.getWWWXIADAN() + docid, null);
NewH5Activity.start(getActivity(), h5Params); NewH5Activity.start(getActivity(), h5Params);
} else if (zjservice.is_online.equals("3")) { } else if (zjservice.is_online.equals("3")) {
......
...@@ -6,7 +6,6 @@ import android.view.View ...@@ -6,7 +6,6 @@ import android.view.View
import android.widget.LinearLayout import android.widget.LinearLayout
import com.ydl.ydl_image.module.GlideApp import com.ydl.ydl_image.module.GlideApp
import com.ydl.ydl_image.transform.GlideCircleTransform import com.ydl.ydl_image.transform.GlideCircleTransform
import com.ydl.ydl_router.manager.YDLRouterManager
import com.ydl.ydlcommon.base.BaseActivity import com.ydl.ydlcommon.base.BaseActivity
import com.ydl.ydlcommon.data.PlatformDataManager import com.ydl.ydlcommon.data.PlatformDataManager
import com.ydl.ydlcommon.router.IYDLRouterConstant import com.ydl.ydlcommon.router.IYDLRouterConstant
...@@ -186,7 +185,7 @@ class ThankHeadView(activity: Activity) : LinearLayout(activity) { ...@@ -186,7 +185,7 @@ class ThankHeadView(activity: Activity) : LinearLayout(activity) {
fun toPay(payId: String, money: Float) { fun toPay(payId: String, money: Float) {
val userInfo = DynamicIn.getUserInfo() val userInfo = DynamicIn.getUserInfo()
if (userInfo == null || TextUtils.isEmpty(userInfo.uid)) { if (userInfo == null || TextUtils.isEmpty(userInfo.uid)) {
YDLRouterManager.router(IYDLRouterConstant.ROUTER_MINE_LOGIN) DynamicIn.loginByOneKeyLogin(activity,true)
return return
} }
// //
......
...@@ -121,11 +121,7 @@ public class AllTopicFragment extends DynamicFragment { ...@@ -121,11 +121,7 @@ public class AllTopicFragment extends DynamicFragment {
adapterr.setmOnFocusClickLister(new AllTopicAdapter.OnFocusClickLister() { adapterr.setmOnFocusClickLister(new AllTopicAdapter.OnFocusClickLister() {
@Override @Override
public void onFocusClick(View view, int position) { public void onFocusClick(View view, int position) {
if (!DynamicIn.INSTANCE.isLogin()) { if (DynamicIn.INSTANCE.loginByOneKeyLogin(getActivity(), true)) {
startActivity(DynamicIn.INSTANCE.loginWayIntent(getActivity()));
// OuterEmptyImp.gotoChooseLoginWay(getActivity());
// startActivity(new Intent(getActivity(), ChooseLoginWayActivity.class));
} else {
BuryPointUtils.getInstance().createMap() BuryPointUtils.getInstance().createMap()
.put("theme_name", mDatasr.get(position).getTopic_title()) .put("theme_name", mDatasr.get(position).getTopic_title())
.put("theme_ID", mDatasr.get(position).getTopic_id()) .put("theme_ID", mDatasr.get(position).getTopic_id())
......
...@@ -342,9 +342,7 @@ public class TopicDetailActivity extends BaseMvpActivity<TopicDetailView, TopicD ...@@ -342,9 +342,7 @@ public class TopicDetailActivity extends BaseMvpActivity<TopicDetailView, TopicD
mTopicDetailVp.setCurrentItem(1); mTopicDetailVp.setCurrentItem(1);
setTabSelection(1); setTabSelection(1);
} else if (view.getId() == R.id.publish_trend_btn) { } else if (view.getId() == R.id.publish_trend_btn) {
if (!DynamicIn.INSTANCE.isLogin()) { if (DynamicIn.INSTANCE.loginByOneKeyLogin(TopicDetailActivity.this,true)) {
startActivity(DynamicIn.INSTANCE.loginWayIntent(TopicDetailActivity.this));
} else {
Intent intent = new Intent(); Intent intent = new Intent();
intent.setClass(TopicDetailActivity.this, PublishTrendActivity.class); intent.setClass(TopicDetailActivity.this, PublishTrendActivity.class);
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();
...@@ -355,9 +353,7 @@ public class TopicDetailActivity extends BaseMvpActivity<TopicDetailView, TopicD ...@@ -355,9 +353,7 @@ public class TopicDetailActivity extends BaseMvpActivity<TopicDetailView, TopicD
startActivity(intent); startActivity(intent);
} }
} else if (view.getId() == R.id.topic_detail_focus_tv) { } else if (view.getId() == R.id.topic_detail_focus_tv) {
if (!DynamicIn.INSTANCE.isLogin()) { if (DynamicIn.INSTANCE.loginByOneKeyLogin(TopicDetailActivity.this,true)) {
startActivity(DynamicIn.INSTANCE.loginWayIntent(TopicDetailActivity.this));
} else {
getPresenter().focusTopic(topicId); getPresenter().focusTopic(topicId);
} }
} else if (view.getId() == R.id.topic_detail_users_rel) { } else if (view.getId() == R.id.topic_detail_users_rel) {
......
...@@ -289,10 +289,7 @@ public class TrendListInFragment extends DynamicFragment implements ITrendsListV ...@@ -289,10 +289,7 @@ public class TrendListInFragment extends DynamicFragment implements ITrendsListV
} }
private void doLikeAction(View view, int position, List<TrendsListBean.Trend> mDatas) { private void doLikeAction(View view, int position, List<TrendsListBean.Trend> mDatas) {
if (!DynamicIn.INSTANCE.isLogin()) { if (DynamicIn.INSTANCE.loginByOneKeyLogin(getActivity(),true)) {
// OuterEmptyImp.gotoChooseLoginWay(getActivity());
startActivity(DynamicIn.INSTANCE.loginWayIntent(getActivity()));
} else {
if (!isDoLikeAction) { if (!isDoLikeAction) {
isDoLikeAction = true; isDoLikeAction = true;
mPresenter.doLikeAction(view, position, Integer.valueOf(mDatas.get(position).id), mDatas); mPresenter.doLikeAction(view, position, Integer.valueOf(mDatas.get(position).id), mDatas);
......
...@@ -362,9 +362,7 @@ class TrendsListFragment : BaseLazyFragment(), ITrendsListView, ...@@ -362,9 +362,7 @@ class TrendsListFragment : BaseLazyFragment(), ITrendsListView,
private fun doLikeAction(view: View, position: Int, mDatas: List<TrendsListBean.Trend>) { private fun doLikeAction(view: View, position: Int, mDatas: List<TrendsListBean.Trend>) {
if (!DynamicIn.isLogin()) { if (DynamicIn.loginByOneKeyLogin(activity,true)) {
startActivity(DynamicIn.loginWayIntent(activity))
} else {
if (!isDoLikeAction) { if (!isDoLikeAction) {
isDoLikeAction = true isDoLikeAction = true
mPresenter!!.doLikeAction( mPresenter!!.doLikeAction(
...@@ -467,10 +465,7 @@ class TrendsListFragment : BaseLazyFragment(), ITrendsListView, ...@@ -467,10 +465,7 @@ class TrendsListFragment : BaseLazyFragment(), ITrendsListView,
fun initClick() { fun initClick() {
recommend_trend_add_iv.setOnClickListener { recommend_trend_add_iv.setOnClickListener {
if (!DynamicIn.isLogin()) { if (DynamicIn.loginByOneKeyLogin(activity,true)) {
startActivity(DynamicIn.loginWayIntent(activity))
LogUtil.d("start ChooseLoginWayActivity")
} else {
val intent = Intent(activity.applicationContext, PublishTrendActivity::class.java) val intent = Intent(activity.applicationContext, PublishTrendActivity::class.java)
val bundle = Bundle() val bundle = Bundle()
bundle.putString(DynamicConstants.PUBLISH_TYPE, "default_publish") bundle.putString(DynamicConstants.PUBLISH_TYPE, "default_publish")
......
...@@ -921,11 +921,9 @@ public class TrendsDetailActivity extends BaseMvpActivity<ITrendsDetailView, ITr ...@@ -921,11 +921,9 @@ public class TrendsDetailActivity extends BaseMvpActivity<ITrendsDetailView, ITr
NewH5Activity.start(TrendsDetailActivity.this, new H5Params(data.getListenLinkUrl(), "开始倾诉")); NewH5Activity.start(TrendsDetailActivity.this, new H5Params(data.getListenLinkUrl(), "开始倾诉"));
}) })
.setOnClickListener(R.id.text_chat, v -> { .setOnClickListener(R.id.text_chat, v -> {
if (!DynamicIn.INSTANCE.isLogin()) { if (!DynamicIn.INSTANCE.loginByOneKeyLogin(TrendsDetailActivity.this,true)) {
startActivity(DynamicIn.INSTANCE.loginWayIntent(TrendsDetailActivity.this));
// startActivity(new Intent(TrendsDetailActivity.this, ChooseLoginWayActivity.class));
return; return;
} else { }else {
BuryPointUtils.getInstance().createMap() BuryPointUtils.getInstance().createMap()
.put("expert_entrance", "动态详情") .put("expert_entrance", "动态详情")
.put("expert_ID", data.getDoctor_id()) .put("expert_ID", data.getDoctor_id())
...@@ -935,10 +933,7 @@ public class TrendsDetailActivity extends BaseMvpActivity<ITrendsDetailView, ITr ...@@ -935,10 +933,7 @@ public class TrendsDetailActivity extends BaseMvpActivity<ITrendsDetailView, ITr
} }
}) })
.setOnClickListener(R.id.iv_shang, v -> { .setOnClickListener(R.id.iv_shang, v -> {
if (!DynamicIn.INSTANCE.isLogin()) { if (!DynamicIn.INSTANCE.loginByOneKeyLogin(TrendsDetailActivity.this,true)) {
//未登录则跳转登录页面
startActivity(DynamicIn.INSTANCE.loginWayIntent(TrendsDetailActivity.this));
// startActivity(new Intent(TrendsDetailActivity.this, ChooseLoginWayActivity.class));
return; return;
} }
BuryPointUtils.getInstance().createMap() BuryPointUtils.getInstance().createMap()
...@@ -1112,15 +1107,12 @@ public class TrendsDetailActivity extends BaseMvpActivity<ITrendsDetailView, ITr ...@@ -1112,15 +1107,12 @@ public class TrendsDetailActivity extends BaseMvpActivity<ITrendsDetailView, ITr
public void doClick(View v) { public void doClick(View v) {
if (v.getId() == R.id.trend_disscuss_send_tv) { if (v.getId() == R.id.trend_disscuss_send_tv) {
LogUtil.d("click send comment"); LogUtil.d("click send comment");
if (DynamicIn.INSTANCE.isLogin()) { if (DynamicIn.INSTANCE.loginByOneKeyLogin(TrendsDetailActivity.this,true)) {
if (TextUtils.isEmpty(edCommentContent.getText().toString())) { if (TextUtils.isEmpty(edCommentContent.getText().toString())) {
ToastUtil.toastShort("评论内容不能为空"); ToastUtil.toastShort("评论内容不能为空");
return; return;
} }
sendComment(type, id, edCommentContent.getText().toString(), toContent, toUsername); sendComment(type, id, edCommentContent.getText().toString(), toContent, toUsername);
} else {
startActivity(DynamicIn.INSTANCE.loginWayIntent(TrendsDetailActivity.this));
// startActivity(new Intent(this, ChooseLoginWayActivity.class));
} }
} else if (v.getId() == R.id.publish_emoji_iv) { } else if (v.getId() == R.id.publish_emoji_iv) {
//点击发送表情 //点击发送表情
...@@ -1221,10 +1213,7 @@ public class TrendsDetailActivity extends BaseMvpActivity<ITrendsDetailView, ITr ...@@ -1221,10 +1213,7 @@ public class TrendsDetailActivity extends BaseMvpActivity<ITrendsDetailView, ITr
} }
private void doLikeAction(int type, int id) { private void doLikeAction(int type, int id) {
if (!DynamicIn.INSTANCE.isLogin()) { if (DynamicIn.INSTANCE.loginByOneKeyLogin(TrendsDetailActivity.this,true)) {
startActivity(DynamicIn.INSTANCE.loginWayIntent(TrendsDetailActivity.this));
// startActivity(new Intent(this, ChooseLoginWayActivity.class));
} else {
getPresenter().doLikeAction(type, id); getPresenter().doLikeAction(type, id);
} }
} }
...@@ -1360,9 +1349,7 @@ public class TrendsDetailActivity extends BaseMvpActivity<ITrendsDetailView, ITr ...@@ -1360,9 +1349,7 @@ public class TrendsDetailActivity extends BaseMvpActivity<ITrendsDetailView, ITr
@Override @Override
public void onItemClick(Dialog dialog, View view, int position) { public void onItemClick(Dialog dialog, View view, int position) {
dialog.dismiss(); dialog.dismiss();
if (!DynamicIn.INSTANCE.isLogin()) { if (!DynamicIn.INSTANCE.loginByOneKeyLogin(TrendsDetailActivity.this,true)) {
//未登录则跳转登录页面
startActivity(DynamicIn.INSTANCE.loginWayIntent(TrendsDetailActivity.this));
return; return;
} }
getPresenter().report(trendId, ttype, Integer.valueOf(reportReasonsId.get(position)), answerId, answerContent); getPresenter().report(trendId, ttype, Integer.valueOf(reportReasonsId.get(position)), answerId, answerContent);
...@@ -1557,20 +1544,9 @@ public class TrendsDetailActivity extends BaseMvpActivity<ITrendsDetailView, ITr ...@@ -1557,20 +1544,9 @@ public class TrendsDetailActivity extends BaseMvpActivity<ITrendsDetailView, ITr
String[] strs = realUrl.split("/"); String[] strs = realUrl.split("/");
strs = strs[strs.length - 1].split("&"); strs = strs[strs.length - 1].split("&");
String containsId = strs[0]; String containsId = strs[0];
if (!DynamicIn.INSTANCE.isLogin()) { if (!DynamicIn.INSTANCE.loginByOneKeyLogin(TrendsDetailActivity.this,true)) {
startActivity(DynamicIn.INSTANCE.loginWayIntent(TrendsDetailActivity.this));
return; return;
} }
// RetrofitUtils.fetchTestDetail(new Command.FetchTestDetailCommand(containsId))
// .subscribeOn(Schedulers.io())
// .observeOn(AndroidSchedulers.mainThread())
// .subscribe(testDetailBaseResponse -> {
//// OuterEmptyImp.jumpToTestAnswerActivity(this,testDetailBaseResponse.data);
// startActivity(DynamicIn.INSTANCE.testAnswerIntent(this));
//// TestAnswerActivity.Companion.start(this, testDetailBaseResponse.data),
// }, throwble -> {
// throwble.printStackTrace();
// });
DynamicIn.INSTANCE.testDetailH5(Integer.valueOf(containsId)); DynamicIn.INSTANCE.testDetailH5(Integer.valueOf(containsId));
} else if (realUrl.contains("fm/detail")) { } else if (realUrl.contains("fm/detail")) {
//因为ios已经做了,就是这么判断的,所以后续改吧 //因为ios已经做了,就是这么判断的,所以后续改吧
...@@ -1627,14 +1603,7 @@ public class TrendsDetailActivity extends BaseMvpActivity<ITrendsDetailView, ITr ...@@ -1627,14 +1603,7 @@ public class TrendsDetailActivity extends BaseMvpActivity<ITrendsDetailView, ITr
YDLShareDialog dialog = YDLShareDialog.Companion.style3(this, mTrendBody.title, DynamicConstants.Companion.getTRENF_INFO_SHARE_H5() + trendId, mTrendBody.content, "http://static.ydlcdn.com/v1/images/logo320.png"); YDLShareDialog dialog = YDLShareDialog.Companion.style3(this, mTrendBody.title, DynamicConstants.Companion.getTRENF_INFO_SHARE_H5() + trendId, mTrendBody.content, "http://static.ydlcdn.com/v1/images/logo320.png");
dialog.setCallBack(type -> { dialog.setCallBack(type -> {
if (3 == type) { if (3 == type) {
if (!DynamicIn.INSTANCE.isLogin()) { if (!DynamicIn.INSTANCE.loginByOneKeyLogin(TrendsDetailActivity.this,true)) {
//未登录则跳转登录页面
startActivity(DynamicIn.INSTANCE.loginWayIntent(TrendsDetailActivity.this));
return;
}
//举报
if (!DynamicIn.INSTANCE.isLogin()) {
startActivity(DynamicIn.INSTANCE.loginWayIntent(TrendsDetailActivity.this));
return; return;
} }
showReportReason(1, 0, null); showReportReason(1, 0, null);
......
...@@ -257,8 +257,7 @@ public class TrendsHomeFragment extends BaseFragment implements ITrendHomeView, ...@@ -257,8 +257,7 @@ public class TrendsHomeFragment extends BaseFragment implements ITrendHomeView,
BuryPointUtils.getInstance().createMap() BuryPointUtils.getInstance().createMap()
.put("toptab_name", "关注") .put("toptab_name", "关注")
.burryPoint("topTabClick"); .burryPoint("topTabClick");
if (!DynamicIn.INSTANCE.isLogin()) { if (!DynamicIn.INSTANCE.loginByOneKeyLogin(getActivity(),true)) {
startActivity(DynamicIn.INSTANCE.loginWayIntent(getActivity()));
return; return;
} }
BuryPointUtils.getInstance().trackViewScreen(getActivity(), "动态-关注", "com.cxzapp.yidianling.trends.trendList.TrendsListFragment"); BuryPointUtils.getInstance().trackViewScreen(getActivity(), "动态-关注", "com.cxzapp.yidianling.trends.trendList.TrendsListFragment");
...@@ -324,13 +323,8 @@ public class TrendsHomeFragment extends BaseFragment implements ITrendHomeView, ...@@ -324,13 +323,8 @@ public class TrendsHomeFragment extends BaseFragment implements ITrendHomeView,
} else if (view.getId() == R.id.item_focus_tv) { } else if (view.getId() == R.id.item_focus_tv) {
vpContent.setCurrentItem(2); vpContent.setCurrentItem(2);
} else if (view.getId() == R.id.publish_trend_btn) { } else if (view.getId() == R.id.publish_trend_btn) {
if (!DynamicIn.INSTANCE.isLogin()) { if (DynamicIn.INSTANCE.loginByOneKeyLogin(getActivity(),true)) {
startActivity(DynamicIn.INSTANCE.loginWayIntent(getActivity()));
} else {
Intent intent = new Intent(getActivity().getApplicationContext(), PublishTrendActivity.class); Intent intent = new Intent(getActivity().getApplicationContext(), PublishTrendActivity.class);
// Bundle bundle = new Bundle();
// bundle.putString(DynamicConstants.PUBLISH_TYPE, "default_publish");
// intent.putExtra("bundle", bundle);
//默认改为今日打卡 //默认改为今日打卡
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();
bundle.putString(DynamicConstants.PUBLISH_TYPE, "topic_publish"); bundle.putString(DynamicConstants.PUBLISH_TYPE, "topic_publish");
......
...@@ -248,9 +248,7 @@ public class TrendsContentListFragment extends BaseFragment implements ITrendsLi ...@@ -248,9 +248,7 @@ public class TrendsContentListFragment extends BaseFragment implements ITrendsLi
} }
private void doLikeAction(View view, int position, List<TrendsListBean.Trend> mDatas) { private void doLikeAction(View view, int position, List<TrendsListBean.Trend> mDatas) {
if (!DynamicIn.INSTANCE.isLogin()) { if (DynamicIn.INSTANCE.loginByOneKeyLogin(getActivity(),true)) {
startActivity(DynamicIn.INSTANCE.loginWayIntent(getActivity()));
} else {
if (!isDoLikeAction) { if (!isDoLikeAction) {
isDoLikeAction = true; isDoLikeAction = true;
mPresenter.doLikeAction(view, position, Integer.valueOf(mDatas.get(position).id), mDatas); mPresenter.doLikeAction(view, position, Integer.valueOf(mDatas.get(position).id), mDatas);
......
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