Commit 3afb39e5 by 霍志良

Merge remote-tracking branch 'origin/4.2.40(复联迁移)' into 4.2.40(复联迁移)

parents de20c0a4 d553f5d0
......@@ -20,8 +20,8 @@ import java.util.List;
public final class DemoGlobalConfig implements IConfigModule {
String APP_DOMAIN = "https://api.github.com/";
// public static String appEnv = YDLConstants.ENV_AUTO_TEST;
// public static String appEnv = YDLConstants.ENV_TEST;
public static String appEnv = YDLConstants.ENV_PROD;
public static String appEnv = YDLConstants.ENV_TEST;
// public static String appEnv = YDLConstants.ENV_PROD;
@Override
public void injectAppLifecycle(@NotNull Context context, @NotNull List<IAppLifecycles> lifecycles) {
......
......@@ -61,7 +61,7 @@ class ConfideHomeHttpImpl private constructor(): IConfideHomeHttp{
val confideParam = sb.toString()
return RxUtils.mapObservable(param)
.flatMap {
confideHomeApi.recommedChange(HttpConfig.JAVA_BASE_URL + "auth/listen/search?"+confideParam)
confideHomeApi.recommedChange(HttpConfig.JAVA_BASE_URL + "auth/listen/nsearch?"+confideParam)
}
}
......
......@@ -46,7 +46,7 @@ class ExpertSearchHttpImpl : IExpertSearchHttp {
}
override fun searchDoctor(params: String?): Observable<BaseAPIResponse<ExpertSearchBean>> {
return getSearchApi().searchDoctorService(HttpConfig.JAVA_BASE_URL+ "doctor/list?"+params)
return getSearchApi().searchDoctorService(HttpConfig.JAVA_BASE_URL+ "doctor/nlist?"+params)
}
......
......@@ -31,7 +31,7 @@ interface HomeBasePagerApi {
* 首页咨询请求
* goodType 为空或不传 则获取默认类型数据
*/
@GET("doctor/list")
@GET("doctor/nlist")
@Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA)
fun getConsultData(
@Query("categories") category: String,
......@@ -48,7 +48,7 @@ interface HomeBasePagerApi {
* 首页倾述请求
* goodType 为空或不传 则获取默认类型数据
*/
@GET("auth/listen/search")
@GET("auth/listen/nsearch")
@Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA)
fun getConfideData(
@Query("goodType") goodType: String,
......
......@@ -277,12 +277,12 @@ open class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterIm
* 设置悬浮顶部监听数据
*/
private fun setSuspendListener() {
scrollListner?.setContext(mContext)
scrollListner?.setHomeView(this)
scrollListner?.setConfideFilterView(ll_layout)
scrollListner?.setConsultFilterView(ll_consultLayout)
scrollListner?.setSectionAdapter(adapter!!)
scrollListner?.setPhoneCallImageView(home_service_call)
scrollListner.setContext(mContext)
scrollListner.setHomeView(this)
scrollListner.setConfideFilterView(ll_layout)
scrollListner.setConsultFilterView(ll_consultLayout)
scrollListner.setSectionAdapter(adapter!!)
scrollListner.setPhoneCallImageView(home_service_call)
}
/**
......
package com.yidianling.user.mine;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import androidx.core.content.ContextCompat;
......@@ -61,6 +62,7 @@ import io.reactivex.schedulers.Schedulers;
*/
public class MineFragment extends BaseFragment implements SwipeRefreshLayout.OnRefreshListener, View.OnClickListener {
private Activity mActivity;
String share_title = "壹点灵-专业心理咨询平台";
String share_context = "帮您解决各种恋爱情感、婚姻、生活烦恼";
String share_head = "http://static.ydlcdn.com/v1/images/logo320.png";
......@@ -104,6 +106,7 @@ public class MineFragment extends BaseFragment implements SwipeRefreshLayout.OnR
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mActivity = requireActivity();
}
@Override
......@@ -112,7 +115,7 @@ public class MineFragment extends BaseFragment implements SwipeRefreshLayout.OnR
EventBus.getDefault().register(this);
}
swipeRefreshLayout = getRootView().findViewById(R.id.swipe_refresh_layout);
swipeRefreshLayout.setColorSchemeColors(ContextCompat.getColor(getContext(), R.color.platform_main_theme));
swipeRefreshLayout.setColorSchemeColors(ContextCompat.getColor(requireContext(), R.color.platform_main_theme));
swipeRefreshLayout.setProgressViewOffset(false, 0, 200);
img_bg = getRootView().findViewById(R.id.img_bg);
......@@ -357,9 +360,9 @@ public class MineFragment extends BaseFragment implements SwipeRefreshLayout.OnR
public void onClick(View v) {
int id = v.getId();//切换环境逻辑按钮
if (id == R.id.text_userName || id == R.id.cv_duration) {
OneKeyLoginHelp.INSTANCE.startLoginByStatus(getActivity(),true);
OneKeyLoginHelp.INSTANCE.startLoginByStatus(mActivity,true);
} else if (id == R.id.iv_edit_info) {//修改资料
if (!OneKeyLoginHelp.INSTANCE.startLoginByStatus(getActivity(),true)) {
if (!OneKeyLoginHelp.INSTANCE.startLoginByStatus(mActivity,true)) {
return;
}
if (userInfoData != null) {
......@@ -370,7 +373,7 @@ public class MineFragment extends BaseFragment implements SwipeRefreshLayout.OnR
if (Utils.isFastClick()) {
return;
}
if (!OneKeyLoginHelp.INSTANCE.startLoginByStatus(getActivity(),true)) {
if (!OneKeyLoginHelp.INSTANCE.startLoginByStatus(mActivity,true)) {
return;
}
if (userInfoData != null) {
......@@ -378,72 +381,71 @@ public class MineFragment extends BaseFragment implements SwipeRefreshLayout.OnR
startActivity(intentuser);
}
} else if (id == R.id.ll_account) {//账户余额
if (!OneKeyLoginHelp.INSTANCE.startLoginByStatus(getActivity(),true)) {
if (!OneKeyLoginHelp.INSTANCE.startLoginByStatus(mActivity,true)) {
return;
}
startActivity(new Intent(getActivity(), AccountHistoryActivity.class));
} else if (id == R.id.ll_red_packet) {//我的红包
if (!OneKeyLoginHelp.INSTANCE.startLoginByStatus(getActivity(),true)) {
if (!OneKeyLoginHelp.INSTANCE.startLoginByStatus(mActivity,true)) {
return;
}
clearCouponStatus();
ModularServiceManager.INSTANCE.provide(IAppService.class).myRedPockIntent(getActivity());
ModularServiceManager.INSTANCE.provide(IAppService.class).myRedPockIntent(mActivity);
} else if (id == R.id.ll_fans) {//粉丝
if (!OneKeyLoginHelp.INSTANCE.startLoginByStatus(getActivity(),true)) {
if (!OneKeyLoginHelp.INSTANCE.startLoginByStatus(mActivity,true)) {
return;
}
H5Params h5Params = new H5Params(HttpConfig.Companion.getH5_URL() + "mine/fans-list", null);
NewH5Activity.start(getActivity(), h5Params);
} else if (id == R.id.ll_guanzhu) {//我关注的
if (!OneKeyLoginHelp.INSTANCE.startLoginByStatus(getActivity(),true)) {
if (!OneKeyLoginHelp.INSTANCE.startLoginByStatus(mActivity,true)) {
return;
}
H5Params h5Params1 = new H5Params(HttpConfig.Companion.getH5_URL() + "mine/follow-per", null);
NewH5Activity.start(getActivity(), h5Params1);
} else if (id == R.id.ll_my_trends) {
if (!OneKeyLoginHelp.INSTANCE.startLoginByStatus(getActivity(),true)) {
if (!OneKeyLoginHelp.INSTANCE.startLoginByStatus(mActivity,true)) {
return;
}
BuryPointUtils.getInstance().createMap()
.put("mine_name", "我的动态")
.burryPoint("mine");
try {
Intent intentm = ModularServiceManager.INSTANCE.provide(IDynamicService.class).getMyTrendsActivityIntent(getActivity());
Intent intentm = ModularServiceManager.INSTANCE.provide(IDynamicService.class).getMyTrendsActivityIntent(mActivity);
startActivity(intentm);
} catch (Exception e) {
}
} else if (id == R.id.jtv_account_setting) {//账号设置
//点击消息 未登录请先登录
if (!OneKeyLoginHelp.INSTANCE.startLoginByStatus(getActivity(),true)) {
if (!OneKeyLoginHelp.INSTANCE.startLoginByStatus(mActivity,true)) {
return;
}
startActivity(new Intent(getActivity(), AccountSettingActivity.class));
} else if (id == R.id.jtv_account_privacy) {// 未登录请先登录
if (!OneKeyLoginHelp.INSTANCE.startLoginByStatus(getActivity(),true)) {
if (!OneKeyLoginHelp.INSTANCE.startLoginByStatus(mActivity,true)) {
return;
}
UserHelper.INSTANCE.getUsetSetting().setMeSafePrivateIsClick(true);
jtv_account_privacy.setLeftRedDotVisibility(View.GONE);
startActivity(new Intent(getActivity(), PrivacyActivity.class));
} else if (id == R.id.ll_trade_order) {//预约
if (!OneKeyLoginHelp.INSTANCE.startLoginByStatus(getActivity(),true)) {
if (!OneKeyLoginHelp.INSTANCE.startLoginByStatus(mActivity,true)) {
return;
}
BuryPointUtils.getInstance().createMap()
.put("mine_name", "预约订单")
.burryPoint("mine");
H5Params h5Params3 = new H5Params(HttpConfig.Companion.getH5_URL() + "order", null);
h5Params3.setShowMenu(true);
H5Params h5Params3 = new H5Params(HttpConfig.Companion.getMH5_URL() + "wb/user/order/list?needOrderHelperAlert=1", null);
NewH5Activity.start(getActivity(), h5Params3);
} else if (id == R.id.ll_my_courses) {//我的课程
if (!OneKeyLoginHelp.INSTANCE.startLoginByStatus(getActivity(),true)) {
if (!OneKeyLoginHelp.INSTANCE.startLoginByStatus(mActivity,true)) {
return;
}
ModularServiceManager.INSTANCE.provide(ICourseService.class).startMyCourseActivity(getActivity());
ModularServiceManager.INSTANCE.provide(ICourseService.class).startMyCourseActivity(mActivity);
} else if (id == R.id.ll_call_order) {//倾诉
if (!OneKeyLoginHelp.INSTANCE.startLoginByStatus(getActivity(),true)) {
if (!OneKeyLoginHelp.INSTANCE.startLoginByStatus(mActivity,true)) {
return;
}
BuryPointUtils.getInstance().createMap()
......@@ -466,7 +468,7 @@ public class MineFragment extends BaseFragment implements SwipeRefreshLayout.OnR
NewH5Activity.start(getActivity(), h5Paramzhuan);
}
} else if (id == R.id.ll_my_test_log) {//测试记录
if (!OneKeyLoginHelp.INSTANCE.startLoginByStatus(getActivity(),true)) {
if (!OneKeyLoginHelp.INSTANCE.startLoginByStatus(mActivity,true)) {
return;
}
BuryPointUtils.getInstance().createMap()
......@@ -482,7 +484,7 @@ public class MineFragment extends BaseFragment implements SwipeRefreshLayout.OnR
H5Params params1 = new H5Params("https://m.yidianling.com/about", "网站介绍");
NewH5Activity.start(getActivity(), params1);
} else if (id == R.id.ll_reward) {
if (!OneKeyLoginHelp.INSTANCE.startLoginByStatus(getActivity(),true)) {
if (!OneKeyLoginHelp.INSTANCE.startLoginByStatus(mActivity,true)) {
return;
}
H5Params h5Param = new H5Params(HttpConfig.Companion.getH5_URL() + "course/invite-record", null);
......@@ -522,7 +524,7 @@ public class MineFragment extends BaseFragment implements SwipeRefreshLayout.OnR
}
private void share() {
YDLShareDialog dialog = YDLShareDialog.Companion.style4(getActivity(), share_title, share_url, share_context, share_head);
YDLShareDialog dialog = YDLShareDialog.Companion.style4(mActivity, share_title, share_url, share_context, share_head);
dialog.show(getActivity().getFragmentManager(), "lose");
}
......
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