Commit 4691d183 by 刘鹏

Merge branch 'feat/lp/lp_v4.3.99' into 'd/v4.3.99'

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

See merge request app_android_lib/YDL-Component!216
parents 2f842f05 93164fc2
......@@ -281,7 +281,7 @@ ext {
//flutter功能组件升级===>发布ydl-flutter组件===>引用flutter相关的业务模块
"ydl-flutter-base" : "com.ydl:ydl-flutter-base:${ydlCompileVersion["ydl-flutter-base"]}", //组件化项目中的flutter base模块
"ydl-flutter" : "com.ydl:ydl-flutter:0.0.46@aar", //flutter aar
"ydl-flutter" : "com.ydl:ydl-flutter:0.0.51@aar", //flutter aar
// "ydl-flutter-sp" : "com.ydl:ydl-flutter-sp:0.0.2@aar", //flutter 缓存 aar
//基础组件 <<--- 先发这个,发完改这里的版本号
......
......@@ -708,9 +708,13 @@ class YDLavManager {
session: String?,
line: String
) {
AudioApiRequestUtil.callEventSave(session, line, status, "用户端:${res}")
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe()
//保证session有值
session?.let { sessionLet ->
AudioApiRequestUtil.callEventSave(sessionLet, line, status, "用户端:${res}")
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe()
}
}
}
\ No newline at end of file
......@@ -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
......
......@@ -43,7 +43,6 @@ import com.yidianling.user.api.event.RefreshRecentContactListEvent
import com.yidianling.user.api.service.IAppService
import com.yidianling.user.constants.UserBIConstants.UserMyPageEvent
import com.yidianling.user.mine.bean.CouponNumBean
import com.yidianling.user.mine.data.AppDataManager
import com.yidianling.user.mine.data.AppDataManager.getHttp
import com.yidianling.user.mine.data.AppDataManager.getLocal
import com.yidianling.user.mine.http.MineHttpImpl
......@@ -249,32 +248,31 @@ class MineFragment : BaseFragment(), SwipeRefreshLayout.OnRefreshListener, View.
getLocal().setConfide(false)
getLocal().setConsult(false)
val userInfo = getUserInfo() ?: return
if (userInfo.uid != null) {
getConfideOrder(userInfo.uid!!)
}
val userInfo = getUserInfo()
//获取用户信息
MineHttpImpl.getInstance().getNewCoupon(BaseCommand())
.compose(netCheck())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe({ response: BaseResponse<CouponNumBean> ->
if (response.data != null) {
if (response.data?.count ?: 0 > 0) {
view_new_coupon.visibility = View.VISIBLE
getLocal().setCoupon(true)
userInfo?.uid?.let { uid ->
getConfideOrder(uid)
//获取用户信息
MineHttpImpl.getInstance().getNewCoupon(BaseCommand())
.compose(netCheck())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe({ response: BaseResponse<CouponNumBean> ->
if (response.data != null) {
if (response.data?.count ?: 0 > 0) {
view_new_coupon.visibility = View.VISIBLE
getLocal().setCoupon(true)
} else {
view_new_coupon.visibility = View.GONE
getLocal().setCoupon(false)
}
} else {
view_new_coupon.visibility = View.GONE
getLocal().setCoupon(false)
}
}else{
}) { throwable: Throwable? ->
getLocal().setCoupon(false)
}
}) { throwable: Throwable? ->
getLocal().setCoupon(false)
}
}
}
/**
......
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