Commit 39350be8 by 刘鹏

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

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