Commit 158af5c9 by upwork.021

Merge remote-tracking branch 'origin/new_dev_4.3.91' into new_dev_4.3.91

# Conflicts:
#	config.gradle
parents e21acd29 5d4a9784
...@@ -21,9 +21,9 @@ import java.util.List; ...@@ -21,9 +21,9 @@ import java.util.List;
public final class DemoGlobalConfig implements IConfigModule { public final class DemoGlobalConfig implements IConfigModule {
String APP_DOMAIN = "https://api.github.com/"; String APP_DOMAIN = "https://api.github.com/";
// public static String appEnv = YDLConstants.ENV_AUTO_TEST; // public static String appEnv = YDLConstants.ENV_AUTO_TEST;
public static String appEnv = YDLConstants.ENV_TEST; // public static String appEnv = YDLConstants.ENV_TEST;
// public static String appEnv = YDLConstants.ENV_NEW_TEST;//配置未上传到maven库 // public static String appEnv = YDLConstants.ENV_NEW_TEST;//配置未上传到maven库
// public static String appEnv = YDLConstants.ENV_PROD; public static String appEnv = YDLConstants.ENV_PROD;
@Override @Override
public void injectAppLifecycle(@NotNull Context context, @NotNull List<IAppLifecycles> lifecycles) { public void injectAppLifecycle(@NotNull Context context, @NotNull List<IAppLifecycles> lifecycles) {
lifecycles.add(new DemoAppLifecycles()); lifecycles.add(new DemoAppLifecycles());
......
apply from: "config.gradle" apply from: "config.gradle"
buildscript { buildscript {
ext.kotlin_version = '1.3.50'
ext { ext {
kotlin_version = '1.3.21' kotlin_version = '1.3.50'
support_version = '26.1.0' support_version = '26.1.0'
minSdkVersion = 21 minSdkVersion = 21
targetSdkVersion = 28 targetSdkVersion = 28
...@@ -16,50 +15,27 @@ buildscript { ...@@ -16,50 +15,27 @@ buildscript {
constrait_support_version = '1.0.2' constrait_support_version = '1.0.2'
} }
repositories { repositories {
google()
//壹点灵android maven私服 开发版
maven {
url 'http://nexus.yidianling.com/repository/AndroidRepository/'
credentials {
username "admin"
password "fjoi#1+#@"
}
}
maven { maven {
url 'http://nexus.yidianling.com/repository/AndroidReleases/' url 'http://nexus.yidianling.com/repository/android/'
credentials { credentials {
username "admin" username "admin"
password "fjoi#1+#@" password "fjoi#1+#@"
} }
} }
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' } maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
mavenCentral()
// maven {
// url 'https://dl.bintray.com/zouyuhan/maven'
// }
google() google()
jcenter() mavenLocal()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" } // maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
//Umeng sdk maven 地址
maven { url 'https://repo1.maven.org/maven2/'}
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:3.2.0' classpath 'com.android.tools.build:gradle:3.2.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.jakewharton:butterknife-gradle-plugin:8.4.0'
classpath 'com.meituan.android.walle:plugin:1.1.5'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.meituan.robust:gradle-plugin:0.4.87'
classpath 'com.meituan.robust:auto-patch-plugin:0.4.87'
//bugly 符号表 //bugly 符号表
classpath 'com.tencent.bugly:symtabfileuploader:2.2.1' classpath 'com.tencent.bugly:symtabfileuploader:2.2.1'
//微信资源混淆
classpath 'com.tencent.mm:AndResGuard-gradle-plugin:1.2.16'
classpath 'com.ydl.plugins:modular:1.0.3' classpath 'com.ydl.plugins:modular:1.0.3'
classpath 'com.ydl:notracepoint-gradle-plugin:0.0.3' classpath 'com.ydl:notracepoint-gradle-plugin:0.0.3'
classpath 'com.ydl.plugins:restools:0.0.1' classpath 'com.ydl.plugins:restools:1.0.1'
classpath 'com.jakewharton:butterknife-gradle-plugin:9.0.0-rc1' classpath 'com.jakewharton:butterknife-gradle-plugin:9.0.0-rc1'
} }
} }
...@@ -68,34 +44,16 @@ allprojects { ...@@ -68,34 +44,16 @@ allprojects {
repositories { repositories {
//壹点灵android maven私服 开发版 //壹点灵android maven私服 开发版
maven { maven {
url 'http://nexus.yidianling.com/repository/AndroidRepository/' url 'http://nexus.yidianling.com/repository/android/'
credentials {
username "admin"
password "fjoi#1+#@"
}
}
maven {
url 'http://nexus.yidianling.com/repository/AndroidReleases/'
credentials { credentials {
username "admin" username "admin"
password "fjoi#1+#@" password "fjoi#1+#@"
} }
} }
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' } maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
// maven { url'http://developer.huawei.com/repo/' } mavenCentral()
maven { url "https://jitpack.io" }
maven {
// url 'https://maven.google.com'
url'https://dl.google.com/dl/android/maven2/'
}
// maven {
// url 'https://dl.bintray.com/zouyuhan/maven'
// }
google() google()
jcenter() mavenLocal()
maven { url 'https://maven.aliyun.com/repository/releases' }
//Umeng sdk maven 地址
maven { url 'https://repo1.maven.org/maven2/'}
} }
} }
......
...@@ -7,11 +7,13 @@ ext { ...@@ -7,11 +7,13 @@ ext {
//第三步 若干 //第三步 若干
"m-confide" : "0.0.49.71", "m-confide" : "0.0.49.71",
"m-consultant" : "0.0.60.20", "m-consultant" : "0.0.60.20",
"m-confide" : "0.0.49.70",
"m-consultant" : "0.0.60.21",
"m-fm" : "0.0.30.08", "m-fm" : "0.0.30.08",
"m-user" : "0.0.62.04", "m-user" : "0.0.62.04",
"m-home" : "0.0.23.18", "m-home" : "0.0.23.37",
"m-im" : "0.0.21.30", "m-im" : "0.0.21.30",
"m-dynamic" : "0.0.7.35", "m-dynamic" : "0.0.7.36",
"m-article" : "0.0.0.10", "m-article" : "0.0.0.10",
"m-muse" : "0.0.28.28", "m-muse" : "0.0.28.28",
...@@ -35,13 +37,13 @@ ext { ...@@ -35,13 +37,13 @@ ext {
//mdt 组件 //mdt 组件
"ydl-tuicore" : "0.0.22", "ydl-tuicore" : "0.0.22",
//第一步 //第一步
"ydl-platform" : "0.0.40.96", "ydl-platform" : "0.0.40.97",
//第二步 若干 //第二步 若干
"ydl-webview" : "0.0.38.61", "ydl-webview" : "0.0.38.61",
"ydl-media" : "0.0.21.44", "ydl-media" : "0.0.21.44",
"ydl-pay" : "0.0.18.19", "ydl-pay" : "0.0.18.19",
"m-audioim" : "0.0.49.29.85", "m-audioim" : "0.0.49.29.88",
"ydl-flutter-base": "0.0.14.38", "ydl-flutter-base": "0.0.14.38",
//以下 几乎不会动 //以下 几乎不会动
...@@ -93,11 +95,13 @@ ext { ...@@ -93,11 +95,13 @@ ext {
"m-confide" : "0.0.49.71", "m-confide" : "0.0.49.71",
"m-consultant" : "0.0.60.20", "m-consultant" : "0.0.60.20",
"m-confide" : "0.0.49.70",
"m-consultant" : "0.0.60.21",
"m-fm" : "0.0.30.08", "m-fm" : "0.0.30.08",
"m-user" : "0.0.62.04", "m-user" : "0.0.62.04",
"m-home" : "0.0.23.18", "m-home" : "0.0.23.37",
"m-im" : "0.0.21.30", "m-im" : "0.0.21.30",
"m-dynamic" : "0.0.7.35", "m-dynamic" : "0.0.7.36",
"m-article" : "0.0.0.8", "m-article" : "0.0.0.8",
"m-muse" : "0.0.28.28", "m-muse" : "0.0.28.28",
...@@ -119,13 +123,13 @@ ext { ...@@ -119,13 +123,13 @@ ext {
//mdt组件 //mdt组件
"ydl-tuicore" : "0.0.22", "ydl-tuicore" : "0.0.22",
//第一步 //第一步
"ydl-platform" : "0.0.40.96", "ydl-platform" : "0.0.40.97",
//第二步 若干 //第二步 若干
"ydl-webview" : "0.0.38.61", "ydl-webview" : "0.0.38.61",
"ydl-media" : "0.0.21.44", "ydl-media" : "0.0.21.44",
"ydl-pay" : "0.0.18.19", "ydl-pay" : "0.0.18.19",
"m-audioim" : "0.0.49.29.85", "m-audioim" : "0.0.49.29.88",
"ydl-flutter-base": "0.0.14.38", "ydl-flutter-base": "0.0.14.38",
//以下 几乎不会动 //以下 几乎不会动
......
...@@ -75,9 +75,8 @@ dependencies { ...@@ -75,9 +75,8 @@ dependencies {
kapt "com.alibaba:arouter-compiler:$arouter_compiler" kapt "com.alibaba:arouter-compiler:$arouter_compiler"
api "com.alibaba:arouter-api:$arouter_api" api "com.alibaba:arouter-api:$arouter_api"
api ('com.ydl:ydl-av:1.3.4@aar'){ implementation "com.ydl:ydl-av:1.3.9"
transitive = true implementation 'com.volcengine:apm_insight:1.4.6.cn'
}
if (rootProject.ext.dev_mode){ if (rootProject.ext.dev_mode){
//开发时使用 //开发时使用
......
...@@ -34,6 +34,7 @@ import com.ydl.audioim.player.AudioPlayer ...@@ -34,6 +34,7 @@ import com.ydl.audioim.player.AudioPlayer
import com.ydl.audioim.presenter.AudioHomePresenterImpl import com.ydl.audioim.presenter.AudioHomePresenterImpl
import com.ydl.audioim.utils.AudioLogUtils import com.ydl.audioim.utils.AudioLogUtils
import com.ydl.audioim.utils.DateUtils import com.ydl.audioim.utils.DateUtils
import com.ydl.audioim.utils.onConfideEvent
import com.ydl.audioim.widget.AxbConfirmDialog import com.ydl.audioim.widget.AxbConfirmDialog
import com.ydl.audioim.widget.ZDialog import com.ydl.audioim.widget.ZDialog
import com.ydl.webview.H5Params import com.ydl.webview.H5Params
...@@ -55,7 +56,6 @@ import com.ydl.ydlcommon.utils.log.AliYunLogConfig ...@@ -55,7 +56,6 @@ import com.ydl.ydlcommon.utils.log.AliYunLogConfig
import com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper import com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper
import com.ydl.ydlcommon.utils.log.LogHelper import com.ydl.ydlcommon.utils.log.LogHelper
import com.ydl.ydlcommon.utils.remind.ToastHelper import com.ydl.ydlcommon.utils.remind.ToastHelper
import com.yidianling.common.tools.ToastUtil
import com.yidianling.user.api.service.IUserService import com.yidianling.user.api.service.IUserService
import de.greenrobot.event.EventBus import de.greenrobot.event.EventBus
import io.agora.rtc.Constants import io.agora.rtc.Constants
...@@ -262,6 +262,7 @@ class AudioHomeActivity : ...@@ -262,6 +262,7 @@ class AudioHomeActivity :
override fun onJoinChannelSuccess(channel: String?, uid: Int, elapsed: Int) { override fun onJoinChannelSuccess(channel: String?, uid: Int, elapsed: Int) {
super.onJoinChannelSuccess(channel, uid, elapsed) super.onJoinChannelSuccess(channel, uid, elapsed)
onMeJoined()
callEventSave("20", "$uid 用户声网加入频道成功:channel=$channel") callEventSave("20", "$uid 用户声网加入频道成功:channel=$channel")
LogUtil.e("[agora]$uid 用户声网加入频道成功:channel=$channel") LogUtil.e("[agora]$uid 用户声网加入频道成功:channel=$channel")
...@@ -349,6 +350,7 @@ class AudioHomeActivity : ...@@ -349,6 +350,7 @@ class AudioHomeActivity :
super.onUserJoined(uid, elapsed) super.onUserJoined(uid, elapsed)
callEventSave("20", "${uid}加入频道回调") callEventSave("20", "${uid}加入频道回调")
LogUtil.e("[agora]远端用户/主播加入频道回调") LogUtil.e("[agora]远端用户/主播加入频道回调")
onPeerJoined()
AliYunRichLogsHelper.getInstance() AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.AGORA, "远端用户/主播加入频道回调") .sendRichLog(AliYunLogConfig.AGORA, "远端用户/主播加入频道回调")
} }
...@@ -795,6 +797,7 @@ class AudioHomeActivity : ...@@ -795,6 +797,7 @@ class AudioHomeActivity :
fun rtcCall() { fun rtcCall() {
YDLavManager.instances.rtcCall(listenerUid, channelId, sendDoctocrMsg) YDLavManager.instances.rtcCall(listenerUid, channelId, sendDoctocrMsg)
onStartCall()
} }
/** /**
...@@ -1411,4 +1414,24 @@ class AudioHomeActivity : ...@@ -1411,4 +1414,24 @@ class AudioHomeActivity :
) { ) {
YDLavManager.instances.callEventSave(status,res , session, line) YDLavManager.instances.callEventSave(status,res , session, line)
} }
private fun onStartCall() {
val dimension = hashMapOf("conversation" to "start_call", "call" to "call_start")
onConfideEvent(dimension, channelId)
}
private fun onMeJoined() {
val dimension = hashMapOf("conversation" to "me_joined")
onConfideEvent(dimension, channelId)
}
fun onPeerAccepted() {
val dimension = hashMapOf("conversation" to "peer_accepted", "call" to "call_accepted")
onConfideEvent(dimension, channelId)
}
private fun onPeerJoined() {
val dimension = hashMapOf("conversation" to "peer_joined")
onConfideEvent(dimension, channelId)
}
} }
...@@ -6,6 +6,7 @@ import android.os.Handler ...@@ -6,6 +6,7 @@ import android.os.Handler
import android.text.TextUtils import android.text.TextUtils
import android.util.Log import android.util.Log
import com.alibaba.android.arouter.launcher.ARouter import com.alibaba.android.arouter.launcher.ARouter
import com.bytedance.apm.insight.ApmInsightAgent
import com.google.gson.Gson import com.google.gson.Gson
import com.ydl.audioim.bean.AgoraInvitationBean import com.ydl.audioim.bean.AgoraInvitationBean
import com.ydl.audioim.http.AudioApiRequestUtil import com.ydl.audioim.http.AudioApiRequestUtil
...@@ -13,6 +14,7 @@ import com.ydl.audioim.http.command.ConnectExceptionCommand ...@@ -13,6 +14,7 @@ import com.ydl.audioim.http.command.ConnectExceptionCommand
import com.ydl.audioim.router.AudioImIn import com.ydl.audioim.router.AudioImIn
import com.ydl.audioim.utils.AudioLogUtils import com.ydl.audioim.utils.AudioLogUtils
import com.ydl.audioim.utils.AudioLogUtils.Companion.writeAgoraLog import com.ydl.audioim.utils.AudioLogUtils.Companion.writeAgoraLog
import com.ydl.audioim.utils.onConfideEvent
import com.ydl.consultantim.ConsultantAudioHomeActivity import com.ydl.consultantim.ConsultantAudioHomeActivity
import com.ydl.ydl_av.messge_service.YDLRTMClient import com.ydl.ydl_av.messge_service.YDLRTMClient
import com.ydl.ydl_av.messge_service.bean.RTMMesssage import com.ydl.ydl_av.messge_service.bean.RTMMesssage
...@@ -41,6 +43,7 @@ import io.agora.rtm.RtmStatusCode.ConnectionChangeReason.CONNECTION_CHANGE_REASO ...@@ -41,6 +43,7 @@ import io.agora.rtm.RtmStatusCode.ConnectionChangeReason.CONNECTION_CHANGE_REASO
import io.reactivex.Observable import io.reactivex.Observable
import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.schedulers.Schedulers import io.reactivex.schedulers.Schedulers
import org.json.JSONObject
import java.util.* import java.util.*
import java.util.concurrent.TimeUnit import java.util.concurrent.TimeUnit
...@@ -99,6 +102,8 @@ class YDLavManager { ...@@ -99,6 +102,8 @@ class YDLavManager {
"${response?.calleeId}已收到呼叫邀请,频道号${response?.ChannelId}" "${response?.calleeId}已收到呼叫邀请,频道号${response?.ChannelId}"
) )
val dimension = hashMapOf("call" to "call_received_by_peer")
onConfideEvent(dimension, response?.ChannelId)
val act = ActivityManager.getInstance().getTopTaskActivity() val act = ActivityManager.getInstance().getTopTaskActivity()
if (act is AudioHomeActivity) { if (act is AudioHomeActivity) {
act.runOnUiThread { act.runOnUiThread {
...@@ -120,6 +125,7 @@ class YDLavManager { ...@@ -120,6 +125,7 @@ class YDLavManager {
if (act is AudioHomeActivity) { if (act is AudioHomeActivity) {
act.runOnUiThread { act.runOnUiThread {
act.joinChannel() act.joinChannel()
act.onPeerAccepted()
} }
} }
} }
...@@ -131,6 +137,8 @@ class YDLavManager { ...@@ -131,6 +137,8 @@ class YDLavManager {
AliYunLogConfig.AGORA, AliYunLogConfig.AGORA,
"${response?.calleeId}已拒绝呼叫邀请" "${response?.calleeId}已拒绝呼叫邀请"
) )
val dimension = hashMapOf("call" to "call_refused")
onConfideEvent(dimension, response?.ChannelId)
val act = ActivityManager.getInstance().getTopTaskActivity() val act = ActivityManager.getInstance().getTopTaskActivity()
if (act is AudioHomeActivity) { if (act is AudioHomeActivity) {
act.runOnUiThread { act.runOnUiThread {
...@@ -152,6 +160,8 @@ class YDLavManager { ...@@ -152,6 +160,8 @@ class YDLavManager {
AliYunLogConfig.AGORA, AliYunLogConfig.AGORA,
"主叫已取消呼叫邀请" "主叫已取消呼叫邀请"
) )
val dimension = hashMapOf("call" to "call_canceled")
onConfideEvent(dimension, response?.ChannelId)
val act = ActivityManager.getInstance().getTopTaskActivity() val act = ActivityManager.getInstance().getTopTaskActivity()
if (act is AudioHomeActivity) { if (act is AudioHomeActivity) {
act.runOnUiThread { act.runOnUiThread {
...@@ -168,6 +178,11 @@ class YDLavManager { ...@@ -168,6 +178,11 @@ class YDLavManager {
AliYunLogConfig.AGORA, AliYunLogConfig.AGORA,
"呼叫${response?.calleeId}用户失败:${response?.response}" "呼叫${response?.calleeId}用户失败:${response?.response}"
) )
val dimension = hashMapOf(
"call" to "call_fail",
"call_fail" to "code${errorCode}"
)
onConfideEvent(dimension, response?.ChannelId)
val act = ActivityManager.getInstance().getTopTaskActivity() val act = ActivityManager.getInstance().getTopTaskActivity()
//专家离线或者30 秒后仍未收到专家响应,重新再邀请一次 //专家离线或者30 秒后仍未收到专家响应,重新再邀请一次
when (errorCode) { when (errorCode) {
......
package com.ydl.audioim.utils
import com.apm.insight.log.VLog
import com.bytedance.apm.insight.ApmInsightAgent
import com.ydl.ydlcommon.modular.ModularServiceManager
import org.json.JSONObject
internal fun onConfideEvent(dimension: HashMap<String, String>, channel: String?) {
try {
val uid = ModularServiceManager.getPlatformUserService()?.getUser()?.userId
val ext = JSONObject(mapOf("uid" to uid, "channelId" to (channel ?: "unknown")))
ApmInsightAgent.monitorEvent("confide", dimension, hashMapOf(), ext)
} catch (throwable: Throwable) {
VLog.e("onConfideEvent", throwable.message)
}
}
\ No newline at end of file
...@@ -114,7 +114,7 @@ class ConsultAssistantDialogUtils private constructor() { ...@@ -114,7 +114,7 @@ class ConsultAssistantDialogUtils private constructor() {
object : ConsultAssistantDialog.OnConsultAssistantClickListener { object : ConsultAssistantDialog.OnConsultAssistantClickListener {
override fun onClickAction() { override fun onClickAction() {
if (Utils.isFastClick()) { if (Utils.isFastClick()) {
return onClickAction() return@onClickAction
} }
if (ConsultantIn.getUserImpl().isLogin()){ if (ConsultantIn.getUserImpl().isLogin()){
//获取用户uid //获取用户uid
...@@ -161,7 +161,7 @@ class ConsultAssistantDialogUtils private constructor() { ...@@ -161,7 +161,7 @@ class ConsultAssistantDialogUtils private constructor() {
object : ConsultAssistantDialog.OnConsultAssistantClickListener { object : ConsultAssistantDialog.OnConsultAssistantClickListener {
override fun onClickAction() { override fun onClickAction() {
if (Utils.isFastClick()) { if (Utils.isFastClick()) {
return onClickAction() return@onClickAction
} }
if (ConsultantIn.getUserImpl().isLogin()){ if (ConsultantIn.getUserImpl().isLogin()){
//获取用户uid //获取用户uid
...@@ -206,7 +206,7 @@ class ConsultAssistantDialogUtils private constructor() { ...@@ -206,7 +206,7 @@ class ConsultAssistantDialogUtils private constructor() {
object : ConsultAssistantDialog.OnConsultAssistantClickListener { object : ConsultAssistantDialog.OnConsultAssistantClickListener {
override fun onClickAction() { override fun onClickAction() {
if (Utils.isFastClick()) { if (Utils.isFastClick()) {
return onClickAction() return@onClickAction
} }
getConsultAssistantUid("", activity, 4) getConsultAssistantUid("", activity, 4)
} }
...@@ -262,7 +262,7 @@ class ConsultAssistantDialogUtils private constructor() { ...@@ -262,7 +262,7 @@ class ConsultAssistantDialogUtils private constructor() {
object : ConsultAssistantDialog.OnConsultAssistantClickListener { object : ConsultAssistantDialog.OnConsultAssistantClickListener {
override fun onClickAction() { override fun onClickAction() {
if (Utils.isFastClick()) { if (Utils.isFastClick()) {
return onClickAction() return@onClickAction
} }
ActionCountUtils.count("app_consult_list_page|app_consult_list_daoyi_entry_click") ActionCountUtils.count("app_consult_list_page|app_consult_list_daoyi_entry_click")
YdlBuryPointUtil.sendClick("assistant_list_click") YdlBuryPointUtil.sendClick("assistant_list_click")
...@@ -294,7 +294,7 @@ class ConsultAssistantDialogUtils private constructor() { ...@@ -294,7 +294,7 @@ class ConsultAssistantDialogUtils private constructor() {
object : ConsultAssistantDialog.OnConsultAssistantClickListener { object : ConsultAssistantDialog.OnConsultAssistantClickListener {
override fun onClickAction() { override fun onClickAction() {
if (Utils.isFastClick()) { if (Utils.isFastClick()) {
return onClickAction() return@onClickAction
} }
ActionCountUtils.count("app_consult_list_page|app_consult_list_daoyi_entry_click") ActionCountUtils.count("app_consult_list_page|app_consult_list_daoyi_entry_click")
YdlBuryPointUtil.sendClick("assistant_list_click") YdlBuryPointUtil.sendClick("assistant_list_click")
...@@ -383,7 +383,6 @@ class ConsultAssistantDialogUtils private constructor() { ...@@ -383,7 +383,6 @@ class ConsultAssistantDialogUtils private constructor() {
@SuppressLint("CheckResult") @SuppressLint("CheckResult")
private fun getConsultAssistantUid(location: Int, activity: Activity, ffrom: String?) { private fun getConsultAssistantUid(location: Int, activity: Activity, ffrom: String?) {
obtainApi(SearchApi::class.java).getChatRouteConfig(location) obtainApi(SearchApi::class.java).getChatRouteConfig(location)
.subscribeOn(Schedulers.io()) .subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread()) .observeOn(AndroidSchedulers.mainThread())
......
package com.yidianling.dynamic.event
data class dynamicFocusEvent (
var focusState:String
)
\ No newline at end of file
...@@ -42,6 +42,7 @@ import com.yidianling.dynamic.common.net.DynamicApiUtils; ...@@ -42,6 +42,7 @@ import com.yidianling.dynamic.common.net.DynamicApiUtils;
import com.yidianling.dynamic.dialog.CancelFocusDialog; import com.yidianling.dynamic.dialog.CancelFocusDialog;
import com.yidianling.dynamic.event.BlackEvent; import com.yidianling.dynamic.event.BlackEvent;
import com.yidianling.dynamic.event.LoginStateEvent; import com.yidianling.dynamic.event.LoginStateEvent;
import com.yidianling.dynamic.event.dynamicFocusEvent;
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.yidianling.dynamic.router.DynamicIn; import com.yidianling.dynamic.router.DynamicIn;
...@@ -433,7 +434,9 @@ public class MembersActivity extends BaseActivity implements View.OnClickListene ...@@ -433,7 +434,9 @@ public class MembersActivity extends BaseActivity implements View.OnClickListene
/** /**
* *
*/ */
@SuppressLint("CheckResult")
private void Focus() { private void Focus() {
showProgressDialog(""); showProgressDialog("");
Command.FocusCmd cmd = new Command.FocusCmd(mem_id, "1"); Command.FocusCmd cmd = new Command.FocusCmd(mem_id, "1");
DynamicApiUtils.focus(cmd) DynamicApiUtils.focus(cmd)
...@@ -450,6 +453,7 @@ public class MembersActivity extends BaseActivity implements View.OnClickListene ...@@ -450,6 +453,7 @@ public class MembersActivity extends BaseActivity implements View.OnClickListene
fans_count = (fans_counti + 1) + ""; fans_count = (fans_counti + 1) + "";
members_top_user_fensi_num_tv.setText("粉丝 " + fans_count); members_top_user_fensi_num_tv.setText("粉丝 " + fans_count);
focus_state = "1"; focus_state = "1";
EventBus.getDefault().post(new dynamicFocusEvent(focus_state));
Drawable drawable = getResources().getDrawable(R.drawable.dynamic_ic_expand); Drawable drawable = getResources().getDrawable(R.drawable.dynamic_ic_expand);
drawable.setBounds(0, 0, drawable.getMinimumWidth(), drawable.getMinimumHeight()); drawable.setBounds(0, 0, drawable.getMinimumWidth(), drawable.getMinimumHeight());
members_top_user_focus_ortion_tv.setCompoundDrawablePadding(20); members_top_user_focus_ortion_tv.setCompoundDrawablePadding(20);
...@@ -461,6 +465,7 @@ public class MembersActivity extends BaseActivity implements View.OnClickListene ...@@ -461,6 +465,7 @@ public class MembersActivity extends BaseActivity implements View.OnClickListene
fans_count = (fans_counti - 1) + ""; fans_count = (fans_counti - 1) + "";
members_top_user_fensi_num_tv.setText("粉丝 " + fans_count); members_top_user_fensi_num_tv.setText("粉丝 " + fans_count);
focus_state = "2"; focus_state = "2";
EventBus.getDefault().post(new dynamicFocusEvent(focus_state));
members_top_user_focus_ortion_tv.setCompoundDrawables(null, null, null, null); members_top_user_focus_ortion_tv.setCompoundDrawables(null, null, null, null);
members_top_user_focus_ortion_tv.setText("+ 关注"); members_top_user_focus_ortion_tv.setText("+ 关注");
members_top_user_focus_ortion_tv.setTextColor(getResources().getColor(R.color.dynamic_white)); members_top_user_focus_ortion_tv.setTextColor(getResources().getColor(R.color.dynamic_white));
......
...@@ -290,6 +290,11 @@ public class TopicDetailActivity extends BaseMvpActivity<TopicDetailView, TopicD ...@@ -290,6 +290,11 @@ public class TopicDetailActivity extends BaseMvpActivity<TopicDetailView, TopicD
totalMembers = 0; totalMembers = 0;
topicId = getIntent().getStringExtra("topic_id"); topicId = getIntent().getStringExtra("topic_id");
isSplash = getIntent().getBooleanExtra("isSplash", false); isSplash = getIntent().getBooleanExtra("isSplash", false);
Bundle bundle = getIntent().getBundleExtra("bundle");
if (bundle != null) {
topicId = bundle.getString("topic_id", "44");
isSplash = bundle.getBoolean("isSplash", false);
}
adapter = new TopicDetailMemberAdapter(this); adapter = new TopicDetailMemberAdapter(this);
mFragments = new Fragment[]{TrendListInFragment.newInstance("1", topicId, "default", "0"), mFragments = new Fragment[]{TrendListInFragment.newInstance("1", topicId, "default", "0"),
TrendListInFragment.newInstance("2", topicId, "default", "0")}; TrendListInFragment.newInstance("2", topicId, "default", "0")};
......
...@@ -24,6 +24,7 @@ import android.text.Html; ...@@ -24,6 +24,7 @@ import android.text.Html;
import android.text.TextUtils; import android.text.TextUtils;
import android.text.TextWatcher; import android.text.TextWatcher;
import android.text.style.ImageSpan; import android.text.style.ImageSpan;
import android.util.EventLog;
import android.view.KeyEvent; import android.view.KeyEvent;
import android.view.MotionEvent; import android.view.MotionEvent;
import android.view.View; import android.view.View;
...@@ -72,6 +73,8 @@ import com.yidianling.dynamic.R2; ...@@ -72,6 +73,8 @@ import com.yidianling.dynamic.R2;
import com.yidianling.dynamic.common.browsePictures.BrowsePicturesActivity2; import com.yidianling.dynamic.common.browsePictures.BrowsePicturesActivity2;
import com.yidianling.dynamic.common.emoji.EmoticonPickerView; import com.yidianling.dynamic.common.emoji.EmoticonPickerView;
import com.yidianling.dynamic.common.emoji.IEmoticonSelectedListener; import com.yidianling.dynamic.common.emoji.IEmoticonSelectedListener;
import com.yidianling.dynamic.event.LoginStateEvent;
import com.yidianling.dynamic.event.dynamicFocusEvent;
import com.yidianling.dynamic.members.MembersActivity; import com.yidianling.dynamic.members.MembersActivity;
import com.yidianling.dynamic.model.CommentBean; import com.yidianling.dynamic.model.CommentBean;
import com.yidianling.dynamic.model.Reply; import com.yidianling.dynamic.model.Reply;
...@@ -95,6 +98,7 @@ import java.util.concurrent.TimeUnit; ...@@ -95,6 +98,7 @@ import java.util.concurrent.TimeUnit;
import butterknife.BindView; import butterknife.BindView;
import butterknife.ButterKnife; import butterknife.ButterKnife;
import butterknife.OnClick; import butterknife.OnClick;
import de.greenrobot.event.EventBus;
import io.reactivex.Observable; import io.reactivex.Observable;
import io.reactivex.android.schedulers.AndroidSchedulers; import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.Disposable; import io.reactivex.disposables.Disposable;
...@@ -374,6 +378,7 @@ public class TrendsDetailActivity extends BaseMvpActivity<ITrendsDetailView, ITr ...@@ -374,6 +378,7 @@ public class TrendsDetailActivity extends BaseMvpActivity<ITrendsDetailView, ITr
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
EventBus.getDefault().register(this);
setContentView(R.layout.dynamic_activity_trend_details); setContentView(R.layout.dynamic_activity_trend_details);
ButterKnife.bind(this); ButterKnife.bind(this);
initDatas(); initDatas();
...@@ -1451,8 +1456,18 @@ public class TrendsDetailActivity extends BaseMvpActivity<ITrendsDetailView, ITr ...@@ -1451,8 +1456,18 @@ public class TrendsDetailActivity extends BaseMvpActivity<ITrendsDetailView, ITr
if (subscribe != null) { if (subscribe != null) {
subscribe.dispose(); subscribe.dispose();
} }
EventBus.getDefault().unregister(this);
}
public void onEvent(dynamicFocusEvent event) {
// 1已关注 2关注
if (event.getFocusState().equals("1")){
tvGuanzhu.setVisibility(GONE);
tvGuanzhu.setText("已关注");
}else{
tvGuanzhu.setVisibility(VISIBLE);
tvGuanzhu.setText("关注");
}
} }
@NonNull @NonNull
@Override @Override
public ITrendsDetailPresenterImpl createPresenter() { public ITrendsDetailPresenterImpl createPresenter() {
......
...@@ -39,6 +39,8 @@ class HomeBIConstants { ...@@ -39,6 +39,8 @@ class HomeBIConstants {
const val YDL_HOME_DWELL_TIME: String = YDL_USER_MAIN_PAGE + "ydl_user_main_page_stay_visit" // 首页停留时长 const val YDL_HOME_DWELL_TIME: String = YDL_USER_MAIN_PAGE + "ydl_user_main_page_stay_visit" // 首页停留时长
const val YDL_HOME_ZHUMIANMINGXIANG: String = YDL_USER_MAIN_PAGE + "ydl_user_sleep_aid_more_click" // 首页助眠冥想 const val YDL_HOME_ZHUMIANMINGXIANG: String = YDL_USER_MAIN_PAGE + "ydl_user_sleep_aid_more_click" // 首页助眠冥想
const val YDL_HOME_ZHUMIANICON: String = YDL_USER_MAIN_PAGE + "ydl_user_sleep_aid_type_click" // 首页_助眠_icon const val YDL_HOME_ZHUMIANICON: String = YDL_USER_MAIN_PAGE + "ydl_user_sleep_aid_type_click" // 首页_助眠_icon
const val YDL_HOME_SEARCH_TAG: String = YDL_USER_MAIN_PAGE + "ydl_user_search_tag" // 首页_定制咨询点击tag
const val YDL_HOME_POPUPWINDOWS_PAGE_POPUP: String = YDL_USER_MAIN_PAGE + "popupwindows_page_popup" // 首页弹窗页面弹出事件(99元3小时弹出事件)
} }
......
...@@ -4,10 +4,10 @@ import android.content.Context ...@@ -4,10 +4,10 @@ import android.content.Context
import android.content.Intent import android.content.Intent
import android.net.Uri import android.net.Uri
import android.os.Bundle import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import androidx.recyclerview.widget.RecyclerView
import android.text.TextUtils import android.text.TextUtils
import android.view.View import android.view.View
import androidx.appcompat.app.AppCompatActivity
import androidx.recyclerview.widget.RecyclerView
import com.alibaba.android.arouter.launcher.ARouter import com.alibaba.android.arouter.launcher.ARouter
import com.ydl.media.audio.AudioPlayer import com.ydl.media.audio.AudioPlayer
import com.ydl.media.audio.model.Music import com.ydl.media.audio.model.Music
...@@ -23,6 +23,7 @@ import com.ydl.ydlcommon.base.config.HttpConfig ...@@ -23,6 +23,7 @@ import com.ydl.ydlcommon.base.config.HttpConfig
import com.ydl.ydlcommon.bean.ShareData import com.ydl.ydlcommon.bean.ShareData
import com.ydl.ydlcommon.data.PlatformRamImpl import com.ydl.ydlcommon.data.PlatformRamImpl
import com.ydl.ydlcommon.modular.ModularServiceManager import com.ydl.ydlcommon.modular.ModularServiceManager
import com.ydl.ydlcommon.modular.ModularServiceManager.provide
import com.ydl.ydlcommon.router.IYDLRouterConstant import com.ydl.ydlcommon.router.IYDLRouterConstant
import com.ydl.ydlcommon.utils.LogUtil import com.ydl.ydlcommon.utils.LogUtil
import com.ydl.ydlcommon.utils.Utils import com.ydl.ydlcommon.utils.Utils
...@@ -110,6 +111,16 @@ open class HomeBaseImpl : IHomeBaseEvent { ...@@ -110,6 +111,16 @@ open class HomeBaseImpl : IHomeBaseEvent {
mHomeView!!.getConsultData(type.id.toString(), selectPosition) mHomeView!!.getConsultData(type.id.toString(), selectPosition)
} }
override fun jumpToTopicDetail(topic_id: String) {
val bundle = Bundle()
bundle.putString("topic_id", topic_id)
bundle.putBoolean("isSplash", false)
//动态详情
ARouter.getInstance().build("/topic/detail")
.withBundle("bundle", bundle)
.navigation()
}
private var headerView: View? = null private var headerView: View? = null
var mContext: Context? = null var mContext: Context? = null
......
...@@ -185,4 +185,10 @@ interface IHomeBaseEvent { ...@@ -185,4 +185,10 @@ interface IHomeBaseEvent {
* @param selectPosition 选中的position * @param selectPosition 选中的position
*/ */
fun getConsultData(type: HomeHeaderBean.ConsultCategoryDateBean, selectPosition: Int) fun getConsultData(type: HomeHeaderBean.ConsultCategoryDateBean, selectPosition: Int)
/*
* 跳转话题详情
*
* */
fun jumpToTopicDetail(topic_id:String)
} }
\ No newline at end of file
...@@ -6,6 +6,8 @@ import android.text.TextUtils ...@@ -6,6 +6,8 @@ import android.text.TextUtils
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.ImageView
import com.ydl.ydl_image.module.GlideApp
import com.ydl.ydlcommon.data.PlatformDataManager import com.ydl.ydlcommon.data.PlatformDataManager
import com.yidianling.home.R import com.yidianling.home.R
import com.yidianling.home.constract.YdlHomeViewHolderConstract import com.yidianling.home.constract.YdlHomeViewHolderConstract
...@@ -139,7 +141,7 @@ class YdlHomeAdapter( ...@@ -139,7 +141,7 @@ class YdlHomeAdapter(
//底部提示语模块 //底部提示语模块
else -> { else -> {
val view = mInflater.inflate(R.layout.home_footer_view, parent, false) val view = mInflater.inflate(R.layout.home_footer_view, parent, false)
return FooterViewViewHolder(view) return FooterViewViewHolder(view,viewType)
} }
} }
} }
...@@ -257,5 +259,14 @@ class YdlHomeAdapter( ...@@ -257,5 +259,14 @@ class YdlHomeAdapter(
/** /**
* 底部提示语模块 ViewHolder * 底部提示语模块 ViewHolder
*/ */
inner class FooterViewViewHolder(val footerView: View) : RecyclerView.ViewHolder(footerView) inner class FooterViewViewHolder(val footerView: View,val viewType:Int) : RecyclerView.ViewHolder(footerView){
var imageLogoView: ImageView?=null
init {
imageLogoView=footerView.findViewById(R.id.iv_logo_view);
imageLogoView?.let {
GlideApp.with(mContext).load("https://static.yidianling.com/banner/bottombanner@2x.png").into(it);
}
}
}
} }
\ No newline at end of file
...@@ -135,33 +135,7 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>() ...@@ -135,33 +135,7 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
} }
} }
// val inputLayoutParams = ll_search.layoutParams as CoordinatorLayout.LayoutParams
// val inputOriginMargin = inputLayoutParams.leftMargin
// var inputOffset = DisplayUtils.dp2px(context, 20).toFloat()
//
// appbar_layout.addOnOffsetChangedListener { appBarLayout, i ->
// home_swipe_refresh_layout.isEnabled = i >= 0
//
// val scale = java.lang.Float.valueOf(Math.abs(i).toFloat())!! / java.lang.Float.valueOf(
// appBarLayout.totalScrollRange.toFloat()
// )!!
// view_search_toolbar_bg.alpha = scale
// val leftMargin = inputOriginMargin - inputOffset * scale
// val rightMargin = inputOriginMargin - inputOffset * scale
// inputLayoutParams.setMargins(leftMargin.toInt(), 0, rightMargin.toInt(), 0)
// ll_search.layoutParams = inputLayoutParams
// val zheZhaoAlpha = ((1 - (0.2 * scale)).toFloat())
// //以下判断是因为toolbar和遮罩层拦截住了点击事件,导致banner不好点击
// if (zheZhaoAlpha == 1f) {
// title_layout.visibility = View.GONE
// toolbar.visibility = View.GONE
// } else {
// title_layout.visibility = View.VISIBLE
// toolbar.visibility = View.VISIBLE
// }
// view_search_input_bg.alpha = zheZhaoAlpha
// }
// initStatus()
} }
...@@ -236,6 +210,9 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>() ...@@ -236,6 +210,9 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
} else { } else {
YDLRouterManager.router(act.btnLinkurl) YDLRouterManager.router(act.btnLinkurl)
} }
//定制咨询点击事件埋点
ActionCountUtils.count(HomeBIConstants.YDL_HOME_SEARCH_TAG,"1")
} }
} else { } else {
img_ad.visibility = View.GONE img_ad.visibility = View.GONE
...@@ -271,6 +248,8 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>() ...@@ -271,6 +248,8 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
location[1] - heig, location[1] - heig,
location[0] location[0]
).show() ).show()
//99元3小时弹出事件
ActionCountUtils.count(HomeBIConstants.YDL_HOME_POPUPWINDOWS_PAGE_POPUP,"1")
} }
} }
} }
......
package com.yidianling.home.ui.view package com.yidianling.home.ui.view
import android.content.Context import android.content.Context
import android.graphics.Color
import androidx.recyclerview.widget.RecyclerView
import android.text.TextUtils
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.FrameLayout
import android.widget.LinearLayout import android.widget.LinearLayout
import android.widget.RelativeLayout import androidx.recyclerview.widget.RecyclerView
import com.ydl.ydlcommon.data.PlatformDataManager import com.bumptech.glide.Glide
import com.yidianling.common.tools.RxImageTool import com.bumptech.glide.load.engine.DiskCacheStrategy
import com.yidianling.home.R import com.yidianling.home.R
import com.yidianling.home.event.IHomeBaseEvent import com.yidianling.home.event.IHomeBaseEvent
import com.yidianling.home.model.bean.HomeHeaderBean import com.yidianling.home.model.bean.HomeHeaderBean
...@@ -38,6 +34,10 @@ class HomeButtonBannerView(private val mContext: Context, private var homeEvent: ...@@ -38,6 +34,10 @@ class HomeButtonBannerView(private val mContext: Context, private var homeEvent:
layoutParams = params layoutParams = params
View.inflate(mContext, R.layout.home_button_banner_view, this) View.inflate(mContext, R.layout.home_button_banner_view, this)
Glide.with(context)
.load(R.drawable.qingsu_new_free_dynamic)
.diskCacheStrategy(DiskCacheStrategy.RESOURCE)
.into(qingsuGif)
homeModuleButtonBannerFirst.setOnClickListener { homeModuleButtonBannerFirst.setOnClickListener {
homeEvent?.reservationExpertsClick() homeEvent?.reservationExpertsClick()
} }
...@@ -45,7 +45,7 @@ class HomeButtonBannerView(private val mContext: Context, private var homeEvent: ...@@ -45,7 +45,7 @@ class HomeButtonBannerView(private val mContext: Context, private var homeEvent:
homeEvent?.askMoreClick() homeEvent?.askMoreClick()
} }
homeModuleButtonBannerThird.setOnClickListener { homeModuleButtonBannerThird.setOnClickListener {
homeEvent?.articleMoreClick() homeEvent?.nowConfideClick()
} }
homeModuleButtonBannerFourth.setOnClickListener { homeModuleButtonBannerFourth.setOnClickListener {
homeEvent?.psychologyTestClick() homeEvent?.psychologyTestClick()
......
package com.yidianling.home.ui.view
import android.content.Context
import androidx.constraintlayout.widget.ConstraintLayout
import android.util.AttributeSet
import android.view.View
import com.yidianling.common.tools.RxImageTool
import com.yidianling.home.R
import kotlinx.android.synthetic.xlzx.home_common_title_big_full_view.view.*
/**
* @author liupneg
* @描述: 首页通用标题,富文本样式
* @Company 壹点灵
*/
class HomeCommonTitleBigFullView(private val mContext: Context, private val attributeSet: AttributeSet) :
ConstraintLayout(mContext, attributeSet) {
init {
initView()
}
private fun initView() {
View.inflate(mContext, R.layout.home_common_title_big_full_view, this)
}
fun setTitle(title: String) {
homeModuleCommonTitleViewFullTitle.text = title
}
fun setMoreText(text: String) {
homeModuleCommonTitleViewMorell.visibility = View.VISIBLE
homeModuleCommonTitleViewMoreText.text = text
}
fun setTopMargin(topMargin: Int) {
val params = layoutParams as MarginLayoutParams
params.topMargin = RxImageTool.dp2px(topMargin.toFloat())
layoutParams = params
}
}
\ No newline at end of file
package com.yidianling.home.ui.view package com.yidianling.home.ui.view
import android.content.Context import android.content.Context
import android.graphics.Color
import android.text.TextUtils import android.text.TextUtils
import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.FrameLayout import android.widget.FrameLayout
import androidx.core.content.ContextCompat
import com.ydl.ydl_image.manager.YDLImageCacheManager import com.ydl.ydl_image.manager.YDLImageCacheManager
import com.ydl.ydlcommon.utils.URLUtils import com.ydl.ydlcommon.utils.URLUtils
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.yidianling.common.tools.RxImageTool import com.yidianling.common.tools.RxImageTool
import com.yidianling.home.R import com.yidianling.home.R
import com.yidianling.home.constants.HomeBIConstants
import com.yidianling.home.event.IHomeBaseEvent import com.yidianling.home.event.IHomeBaseEvent
import com.yidianling.home.model.bean.HomeConsultBean import com.yidianling.home.model.bean.HomeConsultBean
import kotlinx.android.synthetic.xlzx.home_consult_item_view.view.* import kotlinx.android.synthetic.xlzx.home_consult_item_view.view.*
import java.math.BigDecimal import kotlinx.android.synthetic.xlzx.home_item_tag.view.*
/** /**
* @author jiucheng * @author jiucheng
...@@ -53,12 +50,12 @@ class HomeConsultItemView(private var mContext: Context, private var homeEvent: ...@@ -53,12 +50,12 @@ class HomeConsultItemView(private var mContext: Context, private var homeEvent:
setHead(bean) setHead(bean)
//设置名称 //设置名称
tv_consult_name.text = bean.name tv_consult_name.text = bean.name
//咨询师标签
setTag(bean)
//设置接通率文案 //设置接通率文案
setConnection(bean) setConnection(bean)
//设置向TA咨询人数 //设置向TA咨询人数
setConfideNum(bean) setConfideNum(bean)
//设置向TA咨询按钮状态
setConfideButton(bean)
setOnClickListener { setOnClickListener {
val url = URLUtils.appendParmas(bean.linkUrl, "cateId", cateId) val url = URLUtils.appendParmas(bean.linkUrl, "cateId", cateId)
...@@ -66,6 +63,22 @@ class HomeConsultItemView(private var mContext: Context, private var homeEvent: ...@@ -66,6 +63,22 @@ class HomeConsultItemView(private var mContext: Context, private var homeEvent:
} }
} }
/**咨询师标签*/
private fun setTag(bean: HomeConsultBean.ListBean) {
ll_tags.removeAllViews()
if (!TextUtils.isEmpty(bean.tags)) {
val tagList = bean.tags?.split("|")
tagList.forEachIndexed { index, tag ->
if (index < 2 && !TextUtils.isEmpty(tag)) {
val view = LayoutInflater.from(context)
.inflate(R.layout.home_item_tag, ll_tags, false)
view.tvTag.text = tag
ll_tags.addView(view)
}
}
}
}
/** /**
* 设置头像 * 设置头像
*/ */
...@@ -79,9 +92,11 @@ class HomeConsultItemView(private var mContext: Context, private var homeEvent: ...@@ -79,9 +92,11 @@ class HomeConsultItemView(private var mContext: Context, private var homeEvent:
private fun setConfideNum(bodyBean: HomeConsultBean.ListBean) { private fun setConfideNum(bodyBean: HomeConsultBean.ListBean) {
if (TextUtils.isEmpty(bodyBean.zixunOrderNum.toString())) { if (TextUtils.isEmpty(bodyBean.zixunOrderNum.toString())) {
tv_consult_num.visibility = View.GONE tv_consult_num.visibility = View.GONE
tv_tv_consult_num_content.visibility = View.GONE
} else { } else {
tv_consult_num.visibility = View.VISIBLE tv_consult_num.visibility = View.VISIBLE
tv_consult_num.text = "咨询次数${bodyBean.zixunOrderNum}" tv_tv_consult_num_content.visibility = View.VISIBLE
tv_consult_num.text = bodyBean.zixunOrderNum.toString()
} }
} }
...@@ -91,40 +106,18 @@ class HomeConsultItemView(private var mContext: Context, private var homeEvent: ...@@ -91,40 +106,18 @@ class HomeConsultItemView(private var mContext: Context, private var homeEvent:
private fun setConnection(bodyBean: HomeConsultBean.ListBean) { private fun setConnection(bodyBean: HomeConsultBean.ListBean) {
if (TextUtils.isEmpty(bodyBean.feedbackRate.toString())) { if (TextUtils.isEmpty(bodyBean.feedbackRate.toString())) {
tv_feedback_rate.visibility = View.INVISIBLE tv_feedback_rate.visibility = View.INVISIBLE
tv_feedback_rate_content.visibility = View.INVISIBLE
} else { } else {
tv_feedback_rate.visibility = View.VISIBLE tv_feedback_rate.visibility = View.VISIBLE
tv_feedback_rate_content.visibility = View.VISIBLE
try { try {
val d = BigDecimal(bodyBean.feedbackRate.toString()).setScale(1, BigDecimal.ROUND_DOWN) val dd = bodyBean.feedbackRate/5.00f
val str = d.toString() val str = String.format("%.0f",dd*100f)+"%"
tv_feedback_rate.text = str tv_feedback_rate.text = str
} catch (e: Exception) { }catch (e:Exception){
e.printStackTrace() e.printStackTrace()
} }
} }
} }
/**
* 设置向TA倾诉按钮状态
*/
private fun setConfideButton(bodyBean: HomeConsultBean.ListBean) {
//私聊文案
if (TextUtils.isEmpty(bodyBean.chatBtnText)) {
tv_consult_chat.text = "私聊"
tv_consult_chat.setTextColor(Color.parseColor("#FD9B0A"))
} else {
tv_consult_chat.text = bodyBean.chatBtnText
tv_consult_chat.setTextColor(
ContextCompat.getColor(
context,
R.color.platform_color_999999
)
)
}
tv_consult_chat.setOnClickListener {
homeEvent!!.consultChatClick(bodyBean.uid.toString())
ActionCountUtils.count(HomeBIConstants.YDL_PRIVATE_CHAT_CLICK)
}
}
} }
...@@ -4,14 +4,12 @@ import android.content.Context ...@@ -4,14 +4,12 @@ import android.content.Context
import android.graphics.Color import android.graphics.Color
import android.graphics.Typeface import android.graphics.Typeface
import android.os.Build import android.os.Build
import com.google.android.material.tabs.TabLayout
import androidx.core.content.ContextCompat
import androidx.recyclerview.widget.RecyclerView
import android.text.Layout
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.LinearLayout import android.widget.LinearLayout
import android.widget.TextView import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView
import com.google.android.material.tabs.TabLayout
import com.yidianling.common.tools.LogUtil import com.yidianling.common.tools.LogUtil
import com.yidianling.common.tools.RxDeviceTool import com.yidianling.common.tools.RxDeviceTool
import com.yidianling.common.tools.RxImageTool import com.yidianling.common.tools.RxImageTool
...@@ -19,9 +17,7 @@ import com.yidianling.home.R ...@@ -19,9 +17,7 @@ import com.yidianling.home.R
import com.yidianling.home.event.IHomeBaseEvent import com.yidianling.home.event.IHomeBaseEvent
import com.yidianling.home.model.bean.HomeConsultBean import com.yidianling.home.model.bean.HomeConsultBean
import com.yidianling.home.model.bean.HomeHeaderBean import com.yidianling.home.model.bean.HomeHeaderBean
import kotlinx.android.synthetic.xlzx.home_confide_view.view.* import kotlinx.android.synthetic.xlzx.home_consult_view.view.*
import java.lang.Exception
import kotlin.math.ceil
/** /**
* @author <a href="https://www.jianshu.com/u/c1e5310dd724">xujian</a> * @author <a href="https://www.jianshu.com/u/c1e5310dd724">xujian</a>
...@@ -65,11 +61,11 @@ class HomeConsultView(private val mContext: Context, private var homeEvent: IHom ...@@ -65,11 +61,11 @@ class HomeConsultView(private val mContext: Context, private var homeEvent: IHom
) )
layoutParams = params layoutParams = params
orientation = VERTICAL orientation = VERTICAL
View.inflate(mContext, R.layout.home_confide_view, this) View.inflate(mContext, R.layout.home_consult_view, this)
homeModuleConfideViewHomeCommonTitleView.setTitle("心理咨询") homeModuleConfideViewHomeCommonFullTitleView.setTitle("心理咨询")
homeModuleConfideViewHomeCommonTitleView.setMoreText("更多咨询") homeModuleConfideViewHomeCommonFullTitleView.setMoreText("更多")
homeModuleConfideViewHomeCommonTitleView.setTopMargin(-4) homeModuleConfideViewHomeCommonFullTitleView.setTopMargin(-4)
homeModuleConfideViewHomeCommonTitleView.setOnClickListener { homeModuleConfideViewHomeCommonFullTitleView.setOnClickListener {
homeEvent?.consultMoreClick() homeEvent?.consultMoreClick()
} }
} }
...@@ -219,15 +215,14 @@ class HomeConsultView(private val mContext: Context, private var homeEvent: IHom ...@@ -219,15 +215,14 @@ class HomeConsultView(private val mContext: Context, private var homeEvent: IHom
fun updateText(txtView: TextView, isSelected: Boolean): TextView { fun updateText(txtView: TextView, isSelected: Boolean): TextView {
if (!isSelected) { if (!isSelected) {
txtView.textSize = 12f txtView.textSize = 12f
txtView.setTextColor(Color.parseColor("#999999")) txtView.setTextColor(Color.parseColor("#929292"))
txtView.typeface = Typeface.DEFAULT
txtView.setPadding(dp10, dp5, dp10, dp7) txtView.setPadding(dp10, dp5, dp10, dp7)
txtView.setBackgroundResource(R.drawable.home_consult_tab_item_unselected_bg)
} else { } else {
txtView.textSize = 12f txtView.textSize = 14f
txtView.setTextColor(Color.parseColor("#FD9B0A")) txtView.setTextColor(Color.parseColor("#5E5E5E"))
txtView.typeface = Typeface.DEFAULT_BOLD
txtView.setPadding(dp10, dp5, dp10, dp7) txtView.setPadding(dp10, dp5, dp10, dp7)
txtView.setBackgroundResource(R.drawable.home_consult_tab_item_selected_bg)
} }
return txtView return txtView
} }
......
...@@ -69,6 +69,7 @@ class HomeModuleCategoryView : FrameLayout { ...@@ -69,6 +69,7 @@ class HomeModuleCategoryView : FrameLayout {
var dp6: Int = 0 var dp6: Int = 0
var dp8: Int = 0 var dp8: Int = 0
var dp12: Int = 0 var dp12: Int = 0
//左右间距
var dp15: Int = 0 var dp15: Int = 0
/** /**
* 倍数 * 倍数
...@@ -116,13 +117,13 @@ class HomeModuleCategoryView : FrameLayout { ...@@ -116,13 +117,13 @@ class HomeModuleCategoryView : FrameLayout {
dp6 = RxImageTool.dip2px(4f) dp6 = RxImageTool.dip2px(4f)
dp12 = RxImageTool.dip2px(12f) dp12 = RxImageTool.dip2px(12f)
categoryEightWidth = ScreenUtil.screenWidth - RxImageTool.dp2px(30f) categoryEightWidth = ScreenUtil.screenWidth - RxImageTool.dp2px(8f)
textViewWidth = categoryEightWidth / 4 textViewWidth = categoryEightWidth / 4
imageEightViewWidth = RxImageTool.dip2px(38f) imageEightViewWidth = RxImageTool.dip2px(38f)
textViewHeight = RxImageTool.dip2px(28f) textViewHeight = RxImageTool.dip2px(28f)
margin = (categoryEightWidth - 4 * imageEightViewWidth) / 8 margin = (categoryEightWidth - 4 * imageEightViewWidth) / 8
dp8 = RxImageTool.dip2px(8f) dp8 = RxImageTool.dip2px(8f)
dp15 = RxImageTool.dip2px(15f) dp15 = RxImageTool.dip2px(4f)
} }
fun initData(askCategoryDataBean: List<HomeHeaderBean.AskCategoryDataBean>?) { fun initData(askCategoryDataBean: List<HomeHeaderBean.AskCategoryDataBean>?) {
......
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="1dp"></corners>
<solid android:color="@color/platform_white" />
<stroke android:width="0.5dp" android:color="@color/platform_color_E0E0E0"/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#FF4E4E" />
<corners
android:bottomLeftRadius="0dp"
android:bottomRightRadius="7dp"
android:topLeftRadius="7dp"
android:topRightRadius="7dp" />
<stroke
android:width="1dp"
android:color="@color/white" />
<padding
android:left="3dp"
android:right="4dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/ll_home_module_button" android:id="@+id/ll_home_module_button"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:layout_marginTop="17dp"
android:layout_marginTop="17dp"> android:orientation="vertical">
<com.yidianling.home.ui.widget.HomeModuleCategoryView
android:id="@+id/home_category_view"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="15dp" android:layout_marginLeft="4dp"
android:layout_marginRight="15dp" android:layout_marginTop="15dp"
android:gravity="center_horizontal" android:layout_marginRight="4dp"
android:gravity="center_horizontal|bottom"
android:orientation="horizontal" android:orientation="horizontal"
android:paddingBottom="12dp"> android:paddingBottom="12dp">
...@@ -20,22 +27,23 @@ ...@@ -20,22 +27,23 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:orientation="vertical" android:gravity="center"
android:gravity="center"> android:orientation="vertical">
<ImageView <ImageView
android:layout_width="54dp" android:layout_width="52dp"
android:layout_height="38dp" android:layout_height="52dp"
android:src="@drawable/home_banner_first_icon" android:scaleType="fitXY"
android:scaleType="fitXY"/> android:src="@drawable/home_banner_first_icon" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="咨询沟通" android:layout_marginTop="6dp"
android:layout_marginTop="3dp" android:text="心理咨询"
android:textColor="@color/platform_color_242424" android:textColor="@color/platform_color_242424"
android:textSize="13dp"/> android:textSize="13dp"
android:textStyle="bold" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
...@@ -43,75 +51,92 @@ ...@@ -43,75 +51,92 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:orientation="vertical" android:gravity="center"
android:gravity="center"> android:orientation="vertical">
<ImageView <ImageView
android:layout_width="54dp" android:layout_width="54dp"
android:layout_height="38dp" android:layout_height="52dp"
android:src="@drawable/home_banner_fourth_icon" android:scaleType="fitXY"
android:scaleType="fitXY"/> android:src="@drawable/home_banner_fourth_icon" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:text="心理测试" android:text="心理测试"
android:layout_marginTop="3dp"
android:textColor="@color/platform_color_242424" android:textColor="@color/platform_color_242424"
android:textSize="13dp"/> android:textSize="13dp"
android:textStyle="bold" />
</LinearLayout> </LinearLayout>
<LinearLayout <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/homeModuleButtonBannerThird" android:id="@+id/homeModuleButtonBannerThird"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:orientation="vertical" android:gravity="center"
android:gravity="center"> android:orientation="vertical">
<ImageView <ImageView
android:layout_width="54dp" android:id="@+id/third_icon"
android:layout_height="38dp" android:layout_width="71dp"
android:layout_height="64dp"
android:paddingLeft="7dp"
android:paddingTop="12dp"
android:paddingRight="12dp"
android:scaleType="fitXY"
android:src="@drawable/home_banner_third_icon" android:src="@drawable/home_banner_third_icon"
android:scaleType="fitXY"/> app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/qingsuGif"
android:layout_width="45dp"
android:layout_height="24dp"
app:layout_constraintRight_toRightOf="@id/third_icon"
app:layout_constraintTop_toTopOf="@id/third_icon" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="主题阅读" android:layout_below="@id/third_icon"
android:layout_marginTop="3dp" android:layout_marginTop="6dp"
android:text="倾诉热线"
android:textColor="@color/platform_color_242424" android:textColor="@color/platform_color_242424"
android:textSize="13dp"/> android:textSize="13dp"
</LinearLayout> android:textStyle="bold"
app:layout_constraintLeft_toLeftOf="@id/third_icon"
app:layout_constraintRight_toRightOf="@id/third_icon"
app:layout_constraintTop_toBottomOf="@id/third_icon" />
</androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout <LinearLayout
android:id="@+id/homeModuleButtonBannerSecond" android:id="@+id/homeModuleButtonBannerSecond"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:orientation="vertical" android:gravity="center"
android:gravity="center"> android:orientation="vertical">
<ImageView <ImageView
android:layout_width="54dp" android:layout_width="52dp"
android:layout_height="38dp" android:layout_height="52dp"
android:src="@drawable/home_banner_second_icon" android:scaleType="fitXY"
android:scaleType="fitXY"/> android:src="@drawable/home_banner_second_icon" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="人生答疑" android:layout_marginTop="6dp"
android:layout_marginTop="3dp" android:text="心理问答"
android:textColor="@color/platform_color_242424" android:textColor="@color/platform_color_242424"
android:textSize="13dp"/> android:textSize="13dp"
android:textStyle="bold" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
<com.yidianling.home.ui.widget.HomeModuleCategoryView
android:id="@+id/home_category_view"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout> </LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="@dimen/platform_dp_30"
android:paddingBottom="@dimen/platform_dp_6">
<TextView
android:id="@+id/homeModuleCommonTitleViewFullTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/platform_dp_16"
android:paddingRight="@dimen/platform_dp_1"
android:textColor="@color/platform_color_242424"
android:textSize="20sp"
android:textStyle="bold"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="通用标题" />
<TextView
android:id="@+id/people_num"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:text="300w+"
android:textColor="#5A8AFF"
android:textSize="17sp"
android:textStyle="bold"
app:layout_constraintBaseline_toBaselineOf="@id/homeModuleCommonTitleViewFullTitle"
app:layout_constraintLeft_toRightOf="@id/homeModuleCommonTitleViewFullTitle" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="1"
android:text=" 人在这里发生了改变"
android:textColor="@color/platform_color_999999"
android:textSize="13sp"
app:layout_constraintBaseline_toBaselineOf="@id/homeModuleCommonTitleViewFullTitle"
app:layout_constraintHorizontal_weight="1"
app:layout_constraintLeft_toRightOf="@id/people_num"
app:layout_constraintRight_toLeftOf="@id/homeModuleCommonTitleViewMorell" />
<LinearLayout
android:id="@+id/homeModuleCommonTitleViewMorell"
android:layout_width="wrap_content"
android:layout_height="@dimen/platform_dp_18"
android:layout_marginRight="@dimen/platform_dp_16"
android:background="@drawable/home_show_more_line"
android:gravity="center"
android:orientation="horizontal"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:visibility="visible"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent">
<TextView
android:id="@+id/homeModuleCommonTitleViewMoreText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/platform_dp_2"
android:gravity="center"
android:text="更多"
android:textColor="@color/platform_color_666666"
android:textSize="10sp" />
<ImageView
android:layout_marginLeft="2dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/home_more_icon_gray" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical" android:background="@drawable/home_view_shadow_bg"
android:gravity="center" android:gravity="center"
android:background="@drawable/home_view_shadow_bg"> android:orientation="vertical">
<RelativeLayout
android:layout_width="wrap_content" <androidx.cardview.widget.CardView
android:layout_width="64dp"
android:layout_height="64dp" android:layout_height="64dp"
android:layout_marginTop="19dp"> android:layout_centerInParent="true"
<androidx.cardview.widget.CardView android:layout_centerHorizontal="true"
android:layout_width="64dp" android:layout_marginTop="20dp"
android:layout_height="64dp" app:cardCornerRadius="32dp"
android:layout_centerInParent="true" app:cardElevation="0dp">
app:cardCornerRadius="32dp"
app:cardElevation="0dp" <ImageView
android:layout_centerHorizontal="true"> android:id="@+id/img_consult_head"
<ImageView android:layout_width="match_parent"
android:id="@+id/img_consult_head" android:layout_height="match_parent"
android:layout_width="match_parent" android:background="@color/platform_color_E0E0E0"
android:layout_height="match_parent" android:scaleType="centerCrop" />
android:scaleType="centerCrop" </androidx.cardview.widget.CardView>
android:background="@color/platform_color_E0E0E0"/>
</androidx.cardview.widget.CardView> <TextView
</RelativeLayout> android:id="@+id/tv_consult_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:textColor="@color/platform_color_242424"
android:textSize="@dimen/platform_dp_16"
android:textStyle="bold"
tools:ignore="SpUsage"
tools:text="姚雨晴" />
<LinearLayout <LinearLayout
android:id="@+id/tv_name_layout" android:layout_marginTop="4dp"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="13dp"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal"> android:orientation="horizontal">
<TextView <TextView
android:id="@+id/tv_consult_name" android:id="@+id/tv_tv_consult_num_content"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="@color/platform_color_242424" android:text="咨询次数 "
android:textSize="@dimen/platform_dp_16" android:textColor="#888888"
android:textStyle="bold" android:textSize="@dimen/platform_dp_10" />
tools:ignore="SpUsage"
tools:text="姚雨晴"/>
<ImageView
android:id="@+id/img_sex"
android:layout_width="13dp"
android:layout_height="13dp"
android:layout_marginStart="6dp"
android:layout_marginLeft="3dp"
android:background="@drawable/home_counselor"/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView <TextView
android:id="@+id/tv_feedback_rate" android:id="@+id/tv_consult_num"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="#FF5B46" android:textColor="#888888"
android:textSize="15dp" android:textSize="@dimen/platform_dp_10"
android:textStyle="bold" tools:text="8000" />
tools:text="9.8"/>
<TextView <TextView
android:id="@+id/tv_feedback_rate_content"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="#FF5B46" android:layout_marginLeft="12dp"
android:textSize="14dp" android:text="好评率 "
android:text="分"/> android:textColor="#888888"
android:textSize="@dimen/platform_dp_10" />
<TextView <TextView
android:id="@+id/tv_consult_num" android:id="@+id/tv_feedback_rate"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="@color/platform_color_666666" android:textColor="#888888"
android:textSize="@dimen/platform_dp_13" android:textSize="@dimen/platform_dp_10"
tools:text="8000次咨询" tools:text="83%" />
android:layout_marginLeft="4dp"/>
</LinearLayout> </LinearLayout>
<TextView
android:id="@+id/tv_consult_chat" <LinearLayout
android:layout_width="74dp" android:id="@+id/ll_tags"
android:layout_height="28dp" android:layout_width="wrap_content"
android:layout_alignParentBottom="true" android:layout_height="wrap_content"
android:layout_centerHorizontal="true" android:layout_marginTop="6dp"
android:background="@drawable/home_consult_chat_rest_bg" android:layout_marginBottom="12dp"
android:gravity="center" android:layout_marginEnd="@dimen/platform_dp_10"
android:paddingLeft="9dp" android:layout_marginStart="@dimen/platform_dp_16"
android:paddingRight="9dp" android:gravity="center_vertical"
tools:text="休息中" android:orientation="horizontal"/>
android:layout_marginTop="10dp"
android:layout_marginBottom="15dp"
android:textColor="@color/platform_color_999999"
android:textSize="12dp"/>
</LinearLayout> </LinearLayout>
......
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:clipChildren="false">
<com.yidianling.home.ui.view.HomeCommonTitleBigFullView
android:id="@+id/homeModuleConfideViewHomeCommonFullTitleView"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
android:clipChildren="false"
>
<com.google.android.material.tabs.TabLayout
android:id="@+id/tab_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:tabGravity="fill"
app:tabIndicatorHeight="0dp"
android:layout_marginLeft="2dp"
android:layout_marginRight="8dp"
app:tabMode="scrollable"
app:tabPaddingStart="4dp"
app:tabPaddingEnd="4dp"
app:tabSelectedTextColor="@color/platform_color_242424"
app:tabTextAppearance="@style/TabLayoutTextSize"
app:tabTextColor="#333"/>
</LinearLayout>
<FrameLayout
android:id="@+id/ll_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</merge>
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="horizontal"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center" android:gravity="center"
android:paddingTop="@dimen/platform_dp_30" android:orientation="horizontal">
android:paddingBottom="@dimen/platform_dp_16">
<View <ImageView
android:layout_width="48dp" android:id="@+id/iv_logo_view"
android:layout_height="0.5dp" android:layout_width="match_parent"
android:background="@color/platform_color_EBEBEB"
android:layout_marginRight="@dimen/platform_dp_8"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="@color/platform_color_999999" android:background="@color/baby_blue"
android:textSize="@dimen/platform_dp_10" />
android:text="我是有底线的"/>
<View
android:layout_width="48dp"
android:layout_height="0.5dp"
android:layout_marginLeft="@dimen/platform_dp_8"
android:background="@color/platform_color_EBEBEB"/>
</LinearLayout> </LinearLayout>
\ No newline at end of file
...@@ -7,60 +7,6 @@ ...@@ -7,60 +7,6 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:clipChildren="false" android:clipChildren="false"
android:clipToPadding="false"> android:clipToPadding="false">
<!-- <android.support.design.widget.CoordinatorLayout-->
<!-- android:id="@+id/container"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="match_parent"-->
<!-- android:background="@color/home_colorBg"-->
<!-- android:clipChildren="false"-->
<!-- android:clipToPadding="false"-->
<!-- app:layout_behavior="@string/appbar_scrolling_view_behavior"-->
<!-- >-->
<!-- <android.support.design.widget.AppBarLayout-->
<!-- android:id="@+id/appbar_layout"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:background="@color/home_colorBg"-->
<!-- android:clipChildren="false"-->
<!-- android:clipToPadding="false"-->
<!-- android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"-->
<!-- app:elevation="0dp">-->
<!-- <android.support.design.widget.CollapsingToolbarLayout-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="match_parent"-->
<!-- android:clipChildren="false"-->
<!-- android:clipToPadding="false"-->
<!-- app:layout_scrollFlags="scroll|exitUntilCollapsed">-->
<!-- <include layout="@layout/home_layout_home_module_head_bg"/>-->
<!-- <include-->
<!-- layout="@layout/home_layout_home_module_head_middle"/>-->
<!-- <android.support.v7.widget.Toolbar-->
<!-- android:id="@+id/toolbar"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="@dimen/home_home_title_bar_height"-->
<!-- android:alpha="0"-->
<!-- android:background="@android:color/white"-->
<!-- android:tag="toolbar"-->
<!-- android:visibility="gone"-->
<!-- app:layout_collapseMode="pin"-->
<!-- app:popupTheme="@style/Widget.AppCompat.Toolbar"/>-->
<!-- <include layout="@layout/home_layout_home_module_toolbar"/>-->
<!-- </android.support.design.widget.CollapsingToolbarLayout>-->
<!-- </android.support.design.widget.AppBarLayout>-->
<!-- </android.support.design.widget.CoordinatorLayout>-->
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
...@@ -69,7 +15,4 @@ ...@@ -69,7 +15,4 @@
<include layout="@layout/home_layout_home_module_content"/> <include layout="@layout/home_layout_home_module_content"/>
</LinearLayout> </LinearLayout>
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout> </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/tvTag"
android:layout_width="wrap_content"
android:layout_height="14dp"
android:layout_marginRight="6dp"
android:background="@drawable/home_bg_radius_line_gray_1"
android:gravity="center"
android:paddingLeft="4dp"
android:paddingRight="4dp"
android:textColor="@color/platform_color_999999"
android:textSize="10sp"
tools:text="恋爱情感" />
...@@ -326,6 +326,8 @@ open class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterIm ...@@ -326,6 +326,8 @@ open class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterIm
} else { } else {
YDLRouterManager.router(act.btnLinkurl) YDLRouterManager.router(act.btnLinkurl)
} }
//定制咨询点击事件埋点
ActionCountUtils.count(HomeBIConstants.YDL_HOME_SEARCH_TAG,"1")
} }
} else { } else {
img_ad.visibility = View.GONE img_ad.visibility = View.GONE
...@@ -352,6 +354,8 @@ open class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterIm ...@@ -352,6 +354,8 @@ open class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterIm
//文案不为空才显示引导--李思开 //文案不为空才显示引导--李思开
if (!TextUtils.isEmpty(act.title)) { if (!TextUtils.isEmpty(act.title)) {
ActivityGuideDialog(mActivity, act.imageUrl, act.title).show() ActivityGuideDialog(mActivity, act.imageUrl, act.title).show()
//99元3小时弹出事件
ActionCountUtils.count(HomeBIConstants.YDL_HOME_POPUPWINDOWS_PAGE_POPUP,"1")
} }
} }
} }
......
...@@ -67,7 +67,10 @@ class HomeAssuageGriefItemView(private val mContext: Context, private var homeEv ...@@ -67,7 +67,10 @@ class HomeAssuageGriefItemView(private val mContext: Context, private var homeEv
homeModuleAssuageGriefViewTag.text = bean?.askTag homeModuleAssuageGriefViewTag.text = bean?.askTag
homeModuleAssuageGriefViewCommentsCount.text = bean?.commentsCount.toString() homeModuleAssuageGriefViewCommentsCount.text = bean?.commentsCount.toString()
homeModuleAssuageGriefViewZanCount.text = bean?.zanCount.toString() homeModuleAssuageGriefViewZanCount.text = bean?.zanCount.toString()
ll_topic_detail.setOnClickListener {
//跳转话题详情
homeEvent?.jumpToTopicDetail(bean.topicId.toString())
}
/** /**
* 点赞 * 点赞
......
...@@ -33,8 +33,10 @@ class HomeButtonBannerView(private val mContext: Context, private var homeEvent: ...@@ -33,8 +33,10 @@ class HomeButtonBannerView(private val mContext: Context, private var homeEvent:
fun setVisibilityFree(boolean: Boolean){ fun setVisibilityFree(boolean: Boolean){
if (boolean){ if (boolean){
qingsuGif.visibility=View.VISIBLE qingsuGif.visibility=View.VISIBLE
homeModuleButtonBannerSecondTitle.text = "免费倾诉"
}else{ }else{
qingsuGif.visibility=View.GONE qingsuGif.visibility=View.GONE
homeModuleButtonBannerSecondTitle.text = "倾诉热线"
} }
} }
private fun initView() { private fun initView() {
......
...@@ -187,6 +187,7 @@ ...@@ -187,6 +187,7 @@
android:background="@drawable/home_assuage_grief_item_view_tab_back" android:background="@drawable/home_assuage_grief_item_view_tab_back"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal" android:orientation="horizontal"
android:id="@+id/ll_topic_detail"
android:paddingLeft="@dimen/platform_dp_7" android:paddingLeft="@dimen/platform_dp_7"
android:paddingTop="@dimen/platform_dp_4" android:paddingTop="@dimen/platform_dp_4"
android:paddingRight="@dimen/platform_dp_7" android:paddingRight="@dimen/platform_dp_7"
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="@color/platform_color_FFFFFF" android:textColor="@color/platform_color_FFFFFF"
android:textSize="@dimen/platform_dp_12" android:textSize="@dimen/platform_dp_12"
android:text="抑郁测量"/> android:text="应有尽有"/>
</RelativeLayout> </RelativeLayout>
<RelativeLayout <RelativeLayout
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
android:textStyle="bold" android:textStyle="bold"
android:textColor="@color/platform_color_FFFFFF" android:textColor="@color/platform_color_FFFFFF"
android:textSize="@dimen/platform_dp_16" android:textSize="@dimen/platform_dp_16"
android:text="即时倾诉"/> android:text="倾诉热线"/>
<TextView <TextView
android:layout_below="@+id/homeModuleButtonBannerSecondTitle" android:layout_below="@+id/homeModuleButtonBannerSecondTitle"
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="@color/platform_color_FFFFFF" android:textColor="@color/platform_color_FFFFFF"
android:textSize="@dimen/platform_dp_12" android:textSize="@dimen/platform_dp_12"
android:text="24小时在线"/> android:text="温暖守护您"/>
</RelativeLayout> </RelativeLayout>
<ImageView <ImageView
android:layout_width="wrap_content" android:layout_width="wrap_content"
......
...@@ -5,6 +5,13 @@ def mavenRepositoryUrl = "http://nexus.yidianling.com/repository/AndroidReleases ...@@ -5,6 +5,13 @@ def mavenRepositoryUrl = "http://nexus.yidianling.com/repository/AndroidReleases
def getVersionName() { def getVersionName() {
return hasProperty('VERSION_NAME') ? VERSION_NAME : rootProject.ext.ydlPublishVersion[project.getName()] return hasProperty('VERSION_NAME') ? VERSION_NAME : rootProject.ext.ydlPublishVersion[project.getName()]
} }
task sourceJar(type:Jar){
classifier = 'source'
from android.sourceSets.main.java.srcDirs
}
artifacts {
archives sourceJar
}
afterEvaluate { project -> afterEvaluate { project ->
uploadArchives { uploadArchives {
...@@ -16,6 +23,7 @@ afterEvaluate { project -> ...@@ -16,6 +23,7 @@ afterEvaluate { project ->
repository(url: mavenRepositoryUrl) { repository(url: mavenRepositoryUrl) {
authentication(userName: "admin", password: "fjoi#1+#@") authentication(userName: "admin", password: "fjoi#1+#@")
} }
// repository(url:mavenLocal().url)
} }
} }
} }
......
...@@ -75,6 +75,7 @@ dependencies { ...@@ -75,6 +75,7 @@ dependencies {
//====================YDL Repository==================== //====================YDL Repository====================
// api rootProject.ext.dependencies["ydl-pushagent"] // api rootProject.ext.dependencies["ydl-pushagent"]
// api rootProject.ext.dependencies["ydl-hnet"] // api rootProject.ext.dependencies["ydl-hnet"]
implementation 'com.volcengine:apm_insight:1.4.6.cn'
api(rootProject.ext.dependencies["ydl-notracepoint"]) { api(rootProject.ext.dependencies["ydl-notracepoint"]) {
transitive = true transitive = true
exclude group: 'com.google.code.gson', module: 'gson' exclude group: 'com.google.code.gson', module: 'gson'
......
package com.ydl.ydlcommon.utils.log package com.ydl.ydlcommon.utils.log
import com.aliyun.sls.android.producer.* import com.aliyun.sls.android.producer.*
import com.apm.insight.log.VLog
import com.ydl.ydlcommon.base.BaseApp.Companion.getApp import com.ydl.ydlcommon.base.BaseApp.Companion.getApp
import com.ydl.ydlcommon.data.PlatformDataManager.getRam import com.ydl.ydlcommon.data.PlatformDataManager.getRam
import com.ydl.ydlcommon.modular.ModularServiceManager.getPlatformUserService import com.ydl.ydlcommon.modular.ModularServiceManager.getPlatformUserService
...@@ -45,6 +46,7 @@ class AliYunRichLogsHelper { ...@@ -45,6 +46,7 @@ class AliYunRichLogsHelper {
* @param value 具体的状态值 * @param value 具体的状态值
* */ * */
fun sendRichLog(key: String, value: String) { fun sendRichLog(key: String, value: String) {
VLog.i(key, value)
val log = Log() val log = Log()
val userInfo = getPlatformUserService()!!.getUser() val userInfo = getPlatformUserService()!!.getUser()
......
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