Commit 39350be8 by 刘鹏

feat: ffrom部分兼容代码,为后续ffrom改版准备

parent 60a45ede
...@@ -6,7 +6,7 @@ ext { ...@@ -6,7 +6,7 @@ ext {
// -------------- 业务模块 -------------- // -------------- 业务模块 --------------
//第三步 若干 //第三步 若干
"m-confide" : "0.0.50.42", "m-confide" : "0.0.50.42",
"m-consultant" : "0.0.60.70", "m-consultant" : "0.0.60.71",
"m-fm" : "0.0.30.09", "m-fm" : "0.0.30.09",
"m-user" : "0.0.62.55", "m-user" : "0.0.62.55",
"m-home" : "0.0.23.95", "m-home" : "0.0.23.95",
...@@ -23,7 +23,7 @@ ext { ...@@ -23,7 +23,7 @@ ext {
//mdt 组件 //mdt 组件
"ydl-tuicore" : "0.0.25", "ydl-tuicore" : "0.0.25",
//第一步 //第一步
"ydl-platform" : "0.0.41.44", "ydl-platform" : "0.0.41.47",
//第二步 若干 //第二步 若干
"ydl-webview" : "0.0.38.94", "ydl-webview" : "0.0.38.94",
...@@ -92,7 +92,7 @@ ext { ...@@ -92,7 +92,7 @@ ext {
// -------------- 业务模块 -------------- // -------------- 业务模块 --------------
//第三步 若干 //第三步 若干
"m-confide" : "0.0.50.42", "m-confide" : "0.0.50.42",
"m-consultant" : "0.0.60.70", "m-consultant" : "0.0.60.71",
"m-fm" : "0.0.30.09", "m-fm" : "0.0.30.09",
"m-user" : "0.0.62.55", "m-user" : "0.0.62.55",
"m-home" : "0.0.23.95", "m-home" : "0.0.23.95",
...@@ -110,7 +110,7 @@ ext { ...@@ -110,7 +110,7 @@ ext {
//mdt 组件 //mdt 组件
"ydl-tuicore" : "0.0.25", "ydl-tuicore" : "0.0.25",
//第一步 //第一步
"ydl-platform" : "0.0.41.44", "ydl-platform" : "0.0.41.47",
//第二步 若干 //第二步 若干
"ydl-webview" : "0.0.38.94", "ydl-webview" : "0.0.38.94",
......
...@@ -27,6 +27,7 @@ import com.ydl.ydl_image.config.SimpleImageOpConfiger ...@@ -27,6 +27,7 @@ import com.ydl.ydl_image.config.SimpleImageOpConfiger
import com.ydl.ydl_image.listener.YDLImageRecyclerOnScrollListener import com.ydl.ydl_image.listener.YDLImageRecyclerOnScrollListener
import com.ydl.ydl_image.manager.YDLImageCacheManager import com.ydl.ydl_image.manager.YDLImageCacheManager
import com.ydl.ydlcommon.base.BaseMvpFragment import com.ydl.ydlcommon.base.BaseMvpFragment
import com.ydl.ydlcommon.base.config.ChannelConfig
import com.ydl.ydlcommon.base.config.HttpConfig import com.ydl.ydlcommon.base.config.HttpConfig
import com.ydl.ydlcommon.data.PlatformDataManager import com.ydl.ydlcommon.data.PlatformDataManager
import com.ydl.ydlcommon.ui.LogoLoadingView import com.ydl.ydlcommon.ui.LogoLoadingView
...@@ -90,8 +91,9 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres ...@@ -90,8 +91,9 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
val ffrom = PlatformDataManager.getRam().getChannelName() val ffrom = PlatformDataManager.getRam().getChannelName()
if (!TextUtils.isEmpty(ffrom) && if (!TextUtils.isEmpty(ffrom) &&
(ffrom.startsWith("ATK_android_yyjlcs")) (ffrom.endsWith(ChannelConfig.Xinliceshiyiyu.name))
) { ) {
//抑郁焦虑测试
rl_hot_fix_for_huawei.visibility = View.GONE rl_hot_fix_for_huawei.visibility = View.GONE
} else { } else {
rl_hot_fix_for_huawei.visibility = View.VISIBLE rl_hot_fix_for_huawei.visibility = View.VISIBLE
......
package com.ydl.ydlcommon.base.config
/**
* 渠道枚举
* */
enum class ChannelConfig {
/**
* @property Xinliceshiyiyu 抑郁焦虑测试
* @property Ydl 壹点灵
* @property android 旧版壹点灵
* @property ATK_3 秘密倾诉
* @property ATK_4 心理测试
* @property ATK_5 心理FM
* @property ATK_6 525心理
* @property ATK_7 旧版心理咨询
*
* */
Xinliceshiyiyu,Ydl,android,ATK_3,ATK_4,ATK_5,ATK_6,ATK_7
}
\ No newline at end of file
...@@ -2,6 +2,7 @@ package com.ydl.ydlcommon.data ...@@ -2,6 +2,7 @@ package com.ydl.ydlcommon.data
import com.meituan.android.walle.WalleChannelReader import com.meituan.android.walle.WalleChannelReader
import com.ydl.ydlcommon.base.BaseApp import com.ydl.ydlcommon.base.BaseApp
import com.ydl.ydlcommon.base.config.ChannelConfig
import com.ydl.ydlcommon.bean.GlobalInfo import com.ydl.ydlcommon.bean.GlobalInfo
import com.ydl.ydlcommon.router.YdlCommonOut import com.ydl.ydlcommon.router.YdlCommonOut
...@@ -10,7 +11,7 @@ import com.ydl.ydlcommon.router.YdlCommonOut ...@@ -10,7 +11,7 @@ import com.ydl.ydlcommon.router.YdlCommonOut
* e-mail : zhangwch@yidianling.com * e-mail : zhangwch@yidianling.com
* time : 2018/05/03 * time : 2018/05/03
*/ */
class PlatformRamImpl private constructor(): IPlatformRam { class PlatformRamImpl private constructor() : IPlatformRam {
private var globalInfo: GlobalInfo? = null private var globalInfo: GlobalInfo? = null
...@@ -31,15 +32,19 @@ class PlatformRamImpl private constructor(): IPlatformRam { ...@@ -31,15 +32,19 @@ class PlatformRamImpl private constructor(): IPlatformRam {
private val ydlChannel: String by lazy { private val ydlChannel: String by lazy {
val appFrom = BaseApp.instance.getGlobalConfig().appFrom; val appFrom = BaseApp.instance.getGlobalConfig().appFrom;
var channel = WalleChannelReader.getChannel(YdlCommonOut.getApp()) var channel = WalleChannelReader.getChannel(YdlCommonOut.getApp())
if (appFrom.endsWith(ChannelConfig.Xinliceshiyiyu.name)) {
//新版channel拼接规则
return@lazy appFrom
} else {
if (channel.isNullOrEmpty()) {
if (channel.isNullOrEmpty()){
channel = "${appFrom}_zhuzhan" channel = "${appFrom}_zhuzhan"
return@lazy channel!! return@lazy channel!!
} }
channel = appFrom + "_" + channel
channel = appFrom+"_"+channel
channel ?: "android" channel ?: "android"
} }
}
override fun getChannelName(): String { override fun getChannelName(): String {
return ydlChannel return ydlChannel
......
...@@ -5,6 +5,7 @@ import android.content.Context; ...@@ -5,6 +5,7 @@ import android.content.Context;
import android.text.TextUtils; import android.text.TextUtils;
import com.meituan.android.walle.WalleChannelReader; import com.meituan.android.walle.WalleChannelReader;
import com.ydl.ydlcommon.base.BaseApp; import com.ydl.ydlcommon.base.BaseApp;
import com.ydl.ydlcommon.base.config.ChannelConfig;
import com.yidianling.common.tools.LogUtil; import com.yidianling.common.tools.LogUtil;
import com.ydl.ydlcommon.BuildConfig; import com.ydl.ydlcommon.BuildConfig;
import com.ydl.ydlcommon.data.PlatformDataManager; import com.ydl.ydlcommon.data.PlatformDataManager;
...@@ -101,15 +102,15 @@ public class BuryPointUtils { ...@@ -101,15 +102,15 @@ public class BuryPointUtils {
private static String getShareTitle() { private static String getShareTitle() {
String ffrom = PlatformDataManager.INSTANCE.getRam().getChannelName(); String ffrom = PlatformDataManager.INSTANCE.getRam().getChannelName();
if (ffrom.startsWith("ATK_3")) { if (ffrom.startsWith(ChannelConfig.ATK_3.name())) {
return "秘密倾诉"; return "秘密倾诉";
} else if (ffrom.startsWith("ATK_4")) { } else if (ffrom.startsWith(ChannelConfig.ATK_4.name())) {
return "心理测试"; return "心理测试";
} else if (ffrom.startsWith("ATK_5")) { } else if (ffrom.startsWith(ChannelConfig.ATK_5.name())) {
return "心理FM"; return "心理FM";
} else if (ffrom.startsWith("ATK_6")) { } else if (ffrom.startsWith(ChannelConfig.ATK_6.name())) {
return "525心理"; return "525心理";
} else if (ffrom.startsWith("ATK_7")) { } else if (ffrom.startsWith(ChannelConfig.ATK_7.name())) {
return "心理咨询"; return "心理咨询";
} else { } else {
return "壹点灵"; return "壹点灵";
......
...@@ -9,6 +9,7 @@ import android.view.View ...@@ -9,6 +9,7 @@ import android.view.View
import android.widget.PopupWindow import android.widget.PopupWindow
import android.widget.RelativeLayout import android.widget.RelativeLayout
import com.ydl.ydlcommon.R import com.ydl.ydlcommon.R
import com.ydl.ydlcommon.base.config.ChannelConfig
import com.ydl.ydlcommon.data.PlatformDataManager import com.ydl.ydlcommon.data.PlatformDataManager
import com.ydl.ydlcommon.router.YdlCommonRouterManager import com.ydl.ydlcommon.router.YdlCommonRouterManager
import com.ydl.ydlcommon.view.dialog.CommonDialog import com.ydl.ydlcommon.view.dialog.CommonDialog
...@@ -63,7 +64,7 @@ class MoreClickView @JvmOverloads constructor(private val mContext: Context, att ...@@ -63,7 +64,7 @@ class MoreClickView @JvmOverloads constructor(private val mContext: Context, att
} }
private fun setMoreMsg() { private fun setMoreMsg() {
if (PlatformDataManager.getRam().getChannelName().startsWith("ATK_3")) { if (PlatformDataManager.getRam().getChannelName().startsWith(ChannelConfig.ATK_3.name)) {
YdlCommonRouterManager.getYdlCommonRoute().startMain(context, 2, null) YdlCommonRouterManager.getYdlCommonRoute().startMain(context, 2, null)
} else { } else {
YdlCommonRouterManager.getYdlCommonRoute().startMain(context, 3, null) YdlCommonRouterManager.getYdlCommonRoute().startMain(context, 3, null)
......
...@@ -9,6 +9,7 @@ import android.widget.PopupWindow ...@@ -9,6 +9,7 @@ import android.widget.PopupWindow
import android.widget.RelativeLayout import android.widget.RelativeLayout
import com.ydl.webview.IJavascriptHandler import com.ydl.webview.IJavascriptHandler
import com.ydl.webview.R import com.ydl.webview.R
import com.ydl.ydlcommon.base.config.ChannelConfig
import com.ydl.ydlcommon.data.PlatformDataManager import com.ydl.ydlcommon.data.PlatformDataManager
import com.ydl.ydlcommon.modular.ModularServiceManager import com.ydl.ydlcommon.modular.ModularServiceManager
import com.ydl.ydlcommon.router.YdlCommonRouterManager import com.ydl.ydlcommon.router.YdlCommonRouterManager
...@@ -98,7 +99,7 @@ class MoreClickView(context: Context, jtoJHandle: IJavascriptHandler) : Relative ...@@ -98,7 +99,7 @@ class MoreClickView(context: Context, jtoJHandle: IJavascriptHandler) : Relative
} }
private fun setMoreMsg() { private fun setMoreMsg() {
if (PlatformDataManager.getRam().getChannelName().startsWith("ATK_3")) { if (PlatformDataManager.getRam().getChannelName().startsWith(ChannelConfig.ATK_3.name)) {
YdlCommonRouterManager.getYdlCommonRoute().startMain(context, 2, null) YdlCommonRouterManager.getYdlCommonRoute().startMain(context, 2, null)
} else { } else {
YdlCommonRouterManager.getYdlCommonRoute().startMain(context, 3, null) YdlCommonRouterManager.getYdlCommonRoute().startMain(context, 3, null)
......
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