Commit c4fe279d by YKai

Merge remote-tracking branch 'origin/d/v4.4.01' into feat/yk/yk_mood

# Conflicts:
#	config.gradle
parents 9693cf2e 7caf25d2
/build
\ No newline at end of file
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply from: "../../maven_push_api.gradle"
version = '1.0.3'
android {
compileSdkVersion rootProject.ext.android["compileSdkVersion"]
buildToolsVersion rootProject.ext.android["buildToolsVersion"]
defaultConfig {
minSdkVersion rootProject.ext.android["minSdkVersion"]
targetSdkVersion rootProject.ext.android["targetSdkVersion"]
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
}
dependencies {
implementation "com.alibaba:arouter-api:$arouter_api"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
\ No newline at end of file
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.ydl.confide.api">
</manifest>
\ No newline at end of file
...@@ -34,4 +34,6 @@ interface IConfideService : IProvider { ...@@ -34,4 +34,6 @@ interface IConfideService : IProvider {
doctorId: String, doctorId: String,
uid: String uid: String
) )
fun isOnlineRtm():Boolean
} }
\ No newline at end of file
...@@ -195,7 +195,7 @@ dependencies { ...@@ -195,7 +195,7 @@ dependencies {
implementation project(':m-user') implementation project(':m-user')
implementation modularPublication('com.ydl:m-user-api') implementation modularPublication('com.ydl:m-user-api')
implementation project(':m-confide') implementation project(':m-confide')
implementation modularPublication('com.ydl:m-confide-api') implementation project(':api:confide')
api project(':m-consultant') api project(':m-consultant')
implementation modularPublication('com.ydl:m-consultant-api') implementation modularPublication('com.ydl:m-consultant-api')
api project(':m-tests') api project(':m-tests')
......
...@@ -9,11 +9,15 @@ import android.content.ServiceConnection ...@@ -9,11 +9,15 @@ import android.content.ServiceConnection
import android.net.Uri import android.net.Uri
import android.os.IBinder import android.os.IBinder
import android.provider.Settings import android.provider.Settings
import android.text.TextUtils
import android.util.Log import android.util.Log
import com.alibaba.android.arouter.facade.annotation.Route import com.alibaba.android.arouter.facade.annotation.Route
import com.alibaba.android.arouter.launcher.ARouter import com.alibaba.android.arouter.launcher.ARouter
import com.mobile.auth.gatewayauth.PhoneNumberAuthHelper import com.mobile.auth.gatewayauth.PhoneNumberAuthHelper
import com.tbruyelle.rxpermissions2.RxPermissions import com.tbruyelle.rxpermissions2.RxPermissions
import com.tencent.qcloud.tuicore.calling.trtccalling.model.TRTCCalling
import com.tencent.qcloud.tuicore.calling.videocall.Constant
import com.tencent.qcloud.tuicore.calling.videocall.YDLInvitionActivity
import com.umeng.analytics.MobclickAgent import com.umeng.analytics.MobclickAgent
import com.ydl.audioim.YDLavManager import com.ydl.audioim.YDLavManager
import com.ydl.component.music.FragmentContainerActivity import com.ydl.component.music.FragmentContainerActivity
...@@ -34,7 +38,6 @@ import com.yidianling.muse.event.MeditationFloatEvent ...@@ -34,7 +38,6 @@ import com.yidianling.muse.event.MeditationFloatEvent
import com.yidianling.muse.helper.MediaPlayerManager import com.yidianling.muse.helper.MediaPlayerManager
import com.yidianling.muse.service.MeditationWindowService import com.yidianling.muse.service.MeditationWindowService
import com.yidianling.tests.home.NewTestHomeActivity import com.yidianling.tests.home.NewTestHomeActivity
import com.yidianling.user.StatusUtils
import com.yidianling.user.api.service.IUserService import com.yidianling.user.api.service.IUserService
import com.yidianling.user.ui.collect.CollectSexAndBirthActivity import com.yidianling.user.ui.collect.CollectSexAndBirthActivity
import com.yidianling.user.ui.login.OneKeyLoginHelp import com.yidianling.user.ui.login.OneKeyLoginHelp
...@@ -52,15 +55,15 @@ import kotlinx.android.synthetic.main.activity_main.* ...@@ -52,15 +55,15 @@ import kotlinx.android.synthetic.main.activity_main.*
@Route(path = "/main/main") @Route(path = "/main/main")
class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(), class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(),
DemoContract.View { DemoContract.View {
private var secretDescriptionDialog: SecretDescriptionDialog? = null // private var secretDescriptionDialog: SecretDescriptionDialog? = null
private var serviceConnection: ServiceConnection? = null private var serviceConnection: ServiceConnection? = null
private var meditationServiceConnection:ServiceConnection? = null private var meditationServiceConnection: ServiceConnection? = null
private var secretDialog: SecretDialog? = null private var secretDialog: SecretDialog? = null
protected var playService: PlayService? = null protected var playService: PlayService? = null
protected var meditationService:MeditationWindowService?=null protected var meditationService: MeditationWindowService? = null
override fun getContentViewId(): Int { override fun getContentViewId(): Int {
return R.id.lce_content_view return R.id.lce_content_view
...@@ -92,10 +95,14 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>( ...@@ -92,10 +95,14 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
YdlCommonRouterManager.initYdlCommonRoute(PlatformTempCommonRouteImpl()) YdlCommonRouterManager.initYdlCommonRoute(PlatformTempCommonRouteImpl())
// 初始化一键登录sdk // 初始化一键登录sdk
OneKeyLoginHelp.sdkInit(this, OneKeyLoginHelp.YDL_USER_APP, PhoneNumberAuthHelper.SERVICE_TYPE_LOGIN) OneKeyLoginHelp.sdkInit(
this,
OneKeyLoginHelp.YDL_USER_APP,
PhoneNumberAuthHelper.SERVICE_TYPE_LOGIN
)
bindService() bindService()
bindMeditationService() bindMeditationService()
reLoadData() reLoadData()
requestPermission() requestPermission()
bt_mdt.setOnClickListener { bt_mdt.setOnClickListener {
...@@ -116,7 +123,7 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>( ...@@ -116,7 +123,7 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
// .withBoolean("bind_phone", false) // .withBoolean("bind_phone", false)
// .withBoolean("isFromGuide", true) // .withBoolean("isFromGuide", true)
// .navigation() // .navigation()
OneKeyLoginHelp.startLogin(this,false) OneKeyLoginHelp.startLogin(this, false)
} }
bt_to_consultant.setOnClickListener { bt_to_consultant.setOnClickListener {
// ARouter.getInstance() // ARouter.getInstance()
...@@ -161,7 +168,9 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>( ...@@ -161,7 +168,9 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
startActivity(Intent(this, CollectSexAndBirthActivity::class.java)) startActivity(Intent(this, CollectSexAndBirthActivity::class.java))
} }
bt_to_confide.setOnClickListener { bt_to_confide.setOnClickListener {
YDLavManager.instances.login(ModularServiceManager.provide(IUserService::class.java).getUserInfo()?.uid) YDLavManager.instances.login(
ModularServiceManager.provide(IUserService::class.java).getUserInfo()?.uid
)
startActivity(Intent(this, ConfideHomeActivity::class.java)) startActivity(Intent(this, ConfideHomeActivity::class.java))
} }
...@@ -227,7 +236,6 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>( ...@@ -227,7 +236,6 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
bt_to_privacy.setOnClickListener { bt_to_privacy.setOnClickListener {
startActivity(Intent(this@MainActivity, TestAppActivity::class.java)) startActivity(Intent(this@MainActivity, TestAppActivity::class.java))
} }
} }
...@@ -241,20 +249,24 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>( ...@@ -241,20 +249,24 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
val rxPermissions = RxPermissions(this) val rxPermissions = RxPermissions(this)
rxPermissions.requestEach(Manifest.permission.WRITE_EXTERNAL_STORAGE) rxPermissions.requestEach(Manifest.permission.WRITE_EXTERNAL_STORAGE)
.subscribe { permission -> .subscribe { permission ->
if (permission.granted) { when {
ToastUtil.toastShort("Permission Success") permission.granted -> {
} else if (permission.shouldShowRequestPermissionRationale) { ToastUtil.toastShort("Permission Success")
requestPermission() }
} else { permission.shouldShowRequestPermissionRationale -> {
ToastUtil.toastLong( requestPermission()
this, }
getString(R.string.platform_need_storage_permission_hint) else -> {
) ToastUtil.toastLong(
val intent = Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS) this,
val uri = Uri.fromParts("package", packageName, null) getString(R.string.platform_need_storage_permission_hint)
intent.data = uri )
startActivity(intent) val intent = Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS)
finish() val uri = Uri.fromParts("package", packageName, null)
intent.data = uri
startActivity(intent)
finish()
}
} }
} }
...@@ -267,11 +279,11 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>( ...@@ -267,11 +279,11 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
bindService(intent, serviceConnection, Context.BIND_AUTO_CREATE) bindService(intent, serviceConnection, Context.BIND_AUTO_CREATE)
} }
private fun bindMeditationService(){ private fun bindMeditationService() {
val intent = Intent() val intent = Intent()
intent.setClass(this,MeditationWindowService::class.java) intent.setClass(this, MeditationWindowService::class.java)
meditationServiceConnection = MeditationServiceConnection() meditationServiceConnection = MeditationServiceConnection()
bindService(intent,meditationServiceConnection,Context.BIND_AUTO_CREATE) bindService(intent, meditationServiceConnection, Context.BIND_AUTO_CREATE)
} }
override fun onResume() { override fun onResume() {
...@@ -281,6 +293,16 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>( ...@@ -281,6 +293,16 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
// ModularServiceManager.provide(IConsultantService::class.java) // ModularServiceManager.provide(IConsultantService::class.java)
// . // .
// (this) // (this)
val trtcCalling = TRTCCalling.sharedInstance(this)
if (!TextUtils.isEmpty(trtcCalling.mRoomId) && !TextUtils.isEmpty(trtcCalling.mUserId)) {
val intent = Intent(mContext, YDLInvitionActivity::class.java)
intent.putExtra(Constant.ROOM_ID, trtcCalling.mRoomId)
intent.putExtra(Constant.USER_ID, trtcCalling.mUserId)
intent.putExtra(Constant.INVITE_ID, trtcCalling.mInviteId)
intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK
mContext.startActivity(intent)
}
} }
override fun onPause() { override fun onPause() {
...@@ -289,8 +311,8 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>( ...@@ -289,8 +311,8 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
// ModularServiceManager.provide(IConsultantService::class.java).hideConsultAssistantDialog() // ModularServiceManager.provide(IConsultantService::class.java).hideConsultAssistantDialog()
} }
fun onEvent(event:MeditationFloatEvent){ fun onEvent(event: MeditationFloatEvent) {
} }
@SuppressLint("MissingSuperCall") @SuppressLint("MissingSuperCall")
...@@ -298,12 +320,12 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>( ...@@ -298,12 +320,12 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
if (serviceConnection != null) { if (serviceConnection != null) {
unbindService(serviceConnection) unbindService(serviceConnection)
} }
if(meditationServiceConnection!=null){ if (meditationServiceConnection != null) {
EventBus.getDefault().post(MeditationFloatEvent(false)) EventBus.getDefault().post(MeditationFloatEvent(false))
MediaPlayerManager.getInstance(this)?.stop() MediaPlayerManager.getInstance(this)?.stop()
unbindService(meditationServiceConnection) unbindService(meditationServiceConnection)
} }
if(EventBus.getDefault().isRegistered(this)){ if (EventBus.getDefault().isRegistered(this)) {
EventBus.getDefault().unregister(this) EventBus.getDefault().unregister(this)
} }
super.onDestroy() super.onDestroy()
...@@ -319,7 +341,7 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>( ...@@ -319,7 +341,7 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
} }
} }
private inner class MeditationServiceConnection:ServiceConnection { private inner class MeditationServiceConnection : ServiceConnection {
override fun onServiceConnected(name: ComponentName?, service: IBinder?) { override fun onServiceConnected(name: ComponentName?, service: IBinder?) {
meditationService = (service as MeditationWindowService.MeditationBinder).service meditationService = (service as MeditationWindowService.MeditationBinder).service
} }
......
...@@ -36,12 +36,12 @@ class JsMethod { ...@@ -36,12 +36,12 @@ class JsMethod {
return true return true
} }
"show_loading" -> { "show_loading" -> {
val topActivity = BaseActivityMgr.INST.getTopActivity() // val topActivity = BaseActivityMgr.INST.getTopActivity()
Loading.show(topActivity) // Loading.show(topActivity)
return true return true
} }
"close_loading" -> { "close_loading" -> {
Loading.close() // Loading.close()
return true return true
} }
"open_app_eval_list"->{ "open_app_eval_list"->{
......
...@@ -481,8 +481,17 @@ public class WVClickAbstractListener implements WebViewClientClickListener { ...@@ -481,8 +481,17 @@ public class WVClickAbstractListener implements WebViewClientClickListener {
} }
@Override @Override
public void getNextExpertStatus(String doctorID, String title, String uid) { public void getNextExpertStatus(String doctorID, String title, String uid, String linkUrl) {
EventBus.getDefault().post(new ChangeAnotherExpertEvent(doctorID,title,uid)); EventBus.getDefault().post(new ChangeAnotherExpertEvent(doctorID, title, uid, linkUrl));
}
@Override
public void switchPushStatus(H5JsBean.H5JsCmd.Params params) {
if (params.getSwitchStatus() == 1) {
// MsgPushLifecycle.Companion.setH5Open(true);
} else {
// MsgPushLifecycle.Companion.setH5Open(false);
}
} }
@Override @Override
......
...@@ -50,6 +50,7 @@ class WebJavascriptHandler : IJavascriptHandler{ ...@@ -50,6 +50,7 @@ class WebJavascriptHandler : IJavascriptHandler{
if (YDLRouterManager.router(params)) { if (YDLRouterManager.router(params)) {
return return
} }
if (js.handle(params)) return if (js.handle(params)) return
val jsData = Gson().fromJson(params, H5JsBean::class.java) val jsData = Gson().fromJson(params, H5JsBean::class.java)
//是否登录 //是否登录
...@@ -447,7 +448,7 @@ class WebJavascriptHandler : IJavascriptHandler{ ...@@ -447,7 +448,7 @@ class WebJavascriptHandler : IJavascriptHandler{
//再换一位 //再换一位
"get_next_doctor"->{ "get_next_doctor"->{
wvEnventPro?.getNextExpertStatus(jsData.cmd?.params?.doctorId.toString(),jsData.cmd?.params?.title,jsData.cmd?.params?.uid.toString()) wvEnventPro?.getNextExpertStatus(jsData.cmd?.params?.doctorId.toString(),jsData.cmd?.params?.title,jsData.cmd?.params?.uid.toString(),jsData.cmd?.params?.linkUrl)
} }
"show_popup_window" -> { "show_popup_window" -> {
val doctorId = jsData.cmd?.params?.doctorId?.toString() val doctorId = jsData.cmd?.params?.doctorId?.toString()
...@@ -459,6 +460,9 @@ class WebJavascriptHandler : IJavascriptHandler{ ...@@ -459,6 +460,9 @@ class WebJavascriptHandler : IJavascriptHandler{
findRouteService(IConfideService::class.java).showExpertDetailDialog(topActivity, url, doctorId, uid ?: "") findRouteService(IConfideService::class.java).showExpertDetailDialog(topActivity, url, doctorId, uid ?: "")
} }
} }
"switch_push_status" -> {
wvEnventPro?.switchPushStatus(jsData.cmd?.params)
}
} }
} }
......
...@@ -199,6 +199,8 @@ public interface WebViewClientClickListener { ...@@ -199,6 +199,8 @@ public interface WebViewClientClickListener {
default void setWebViewBG(String rgb,String alpha){} default void setWebViewBG(String rgb,String alpha){}
void getNextExpertStatus(String doctorID,String title,String uid); void getNextExpertStatus(String doctorID, String title, String uid, String linkUrl);
//h5页面是否需要打开推送
void switchPushStatus(H5JsBean.H5JsCmd.Params params);
} }
ext { ext {
kotlin_version = "1.3.21" kotlin_version = "1.3.21"
dev_mode = false dev_mode = false //组件发布的时候需要设置为false
ydlPublishVersion = [ ydlPublishVersion = [
// -------------- 业务模块 -------------- // -------------- 业务模块 --------------
//第三步 若干 //第三步 若干
"m-confide" : "0.0.50.32", "m-confide" : "0.0.50.50",
"m-consultant" : "0.0.60.69", "m-consultant" : "0.0.60.74",
"m-fm" : "0.0.30.09", "m-fm" : "0.0.30.09",
"m-user" : "0.0.62.54", "m-user" : "0.0.62.72",
"m-home" : "0.0.23.90", "m-home" : "0.0.24.00",
"m-im" : "0.0.21.58", "m-im" : "0.0.21.67",
"m-dynamic" : "0.0.7.74", "m-dynamic" : "0.0.7.80",
"m-article" : "0.0.0.10", "m-article" : "0.0.0.10",
"m-muse" : "0.0.28.81", "m-muse" : "0.0.28.87",
"m-tests" : "0.0.24.18", "m-tests" : "0.0.24.24",
"m-course" : "0.0.43.39", "m-course" : "0.0.43.39",
//-------------- 功能组件 -------------- //-------------- 功能组件 --------------
//mdt 组件 //mdt 组件
"ydl-tuicore" : "0.0.23", "ydl-tuicore" : "0.0.25",
//第一步 //第一步
"ydl-platform" : "0.0.41.40", "ydl-platform" : "0.0.41.51",
//第二步 若干 //第二步 若干
"ydl-webview" : "0.0.38.93", "ydl-webview" : "0.0.39.03",
"ydl-media" : "0.0.21.52", "ydl-media" : "0.0.21.52",
"ydl-pay" : "0.0.18.19", "ydl-pay" : "0.0.18.21",
"m-audioim" : "0.0.49.30.22", "m-audioim" : "0.0.49.30.23",
"ydl-flutter-base": "0.0.14.38", "ydl-flutter-base": "0.0.14.44",
//以下 几乎不会动 //以下 几乎不会动
"router" : "0.0.1", "router" : "0.0.1",
"ydl-net" : "0.0.3.94", "ydl-net" : "0.0.3.94",
"ydl-utils" : "0.0.3.8", "ydl-utils" : "0.0.3.12",
//-------------- 业务模块 API 层 -------------- //-------------- 业务模块 API 层 --------------
"m-audioim-api" : "0.0.6", "m-audioim-api" : "0.0.6",
"m-confide-api" : "0.0.2.16",
"m-consultant-api": "0.0.5.63", "m-consultant-api": "0.0.5.63",
"m-course-api" : "0.0.3.6", "m-course-api" : "0.0.3.6",
"m-fm-api" : "0.0.3", "m-fm-api" : "0.0.3",
...@@ -92,42 +88,40 @@ ext { ...@@ -92,42 +88,40 @@ ext {
ydlCompileVersion = [ ydlCompileVersion = [
// -------------- 业务模块 -------------- // -------------- 业务模块 --------------
//第三步 若干 //第三步 若干
"m-confide" : "0.0.50.32", "m-confide" : "0.0.50.50",
"m-consultant" : "0.0.60.69", "m-consultant" : "0.0.60.74",
"m-fm" : "0.0.30.09", "m-fm" : "0.0.30.09",
"m-user" : "0.0.62.54", "m-user" : "0.0.62.72",
"m-home" : "0.0.23.90", "m-home" : "0.0.24.00",
"m-im" : "0.0.21.58", "m-im" : "0.0.21.67",
"m-dynamic" : "0.0.7.74", "m-dynamic" : "0.0.7.80",
"m-article" : "0.0.0.10", "m-article" : "0.0.0.10",
"m-muse" : "0.0.28.87",
"m-muse" : "0.0.28.81", "m-tests" : "0.0.24.24",
"m-tests" : "0.0.24.18",
"m-course" : "0.0.43.39", "m-course" : "0.0.43.39",
//-------------- 功能组件 -------------- //-------------- 功能组件 --------------
//mdt 组件 //mdt 组件
"ydl-tuicore" : "0.0.23", "ydl-tuicore" : "0.0.25",
//第一步 //第一步
"ydl-platform" : "0.0.41.40", "ydl-platform" : "0.0.41.51",
//第二步 若干 //第二步 若干
"ydl-webview" : "0.0.38.93", "ydl-webview" : "0.0.39.03",
"ydl-media" : "0.0.21.52", "ydl-media" : "0.0.21.52",
"ydl-pay" : "0.0.18.19", "ydl-pay" : "0.0.18.21",
"m-audioim" : "0.0.49.30.22", "m-audioim" : "0.0.49.30.23",
"ydl-flutter-base": "0.0.14.38", "ydl-flutter-base": "0.0.14.44",
//以下 几乎不会动 //以下 几乎不会动
"router" : "0.0.1", "router" : "0.0.1",
"ydl-net" : "0.0.3.94", "ydl-net" : "0.0.3.94",
"ydl-utils" : "0.0.3.8", "ydl-utils" : "0.0.3.12",
//-------------- 业务模块 API 层 -------------- //-------------- 业务模块 API 层 --------------
"m-audioim-api" : "0.0.6", "m-audioim-api" : "0.0.6",
"m-confide-api" : "0.0.2.16", "m-confide-api" : "1.0.3",
"m-consultant-api": "0.0.5.63", "m-consultant-api": "0.0.5.63",
"m-course-api" : "0.0.3.6", "m-course-api" : "0.0.3.6",
"m-fm-api" : "0.0.3", "m-fm-api" : "0.0.3",
...@@ -233,7 +227,6 @@ ext { ...@@ -233,7 +227,6 @@ ext {
"cube" : "in.srain.cube:cube-sdk:1.0.44@aar", "cube" : "in.srain.cube:cube-sdk:1.0.44@aar",
"support-multidex" : 'androidx.multidex:multidex:2.0.0', "support-multidex" : 'androidx.multidex:multidex:2.0.0',
"ydl-ijkplayer-jjdxm" : "com.ydl:jjdxm-ijkplayer:0.0.33", "ydl-ijkplayer-jjdxm" : "com.ydl:jjdxm-ijkplayer:0.0.33",
"robust" : "com.meituan.robust:robust:0.4.87",
"walle" : "com.meituan.android.walle:library:1.1.5", "walle" : "com.meituan.android.walle:library:1.1.5",
"jpush" : "cn.jiguang.sdk:jpush:3.3.6", "jpush" : "cn.jiguang.sdk:jpush:3.3.6",
"jcore" : "cn.jiguang.sdk:jcore:2.1.4", "jcore" : "cn.jiguang.sdk:jcore:2.1.4",
...@@ -265,7 +258,7 @@ ext { ...@@ -265,7 +258,7 @@ ext {
"ydl-pushagent" : "com.ydl:pushagent:0.1.1", "ydl-pushagent" : "com.ydl:pushagent:0.1.1",
"ydl-notracepoint" : "com.ydl:notracepoint-lib:0.2.3.3@aar", "ydl-notracepoint" : "com.ydl:notracepoint-lib:0.2.3.3@aar",
"ydl-js" : "com.ydl:ydl-js:1.0.7-SNAPSHOT@aar", "ydl-js" : "com.ydl:ydl-js:1.0.7-SNAPSHOT@aar",
"ydl-router" : "com.ydl:ydl-router:1.4.1-SNAPSHOT@aar", "ydl-router" : "com.ydl:ydl-router:1.4.4",
"xrecyclerview" : "com.ydl:xrecyclerview:1.0.0-SNAPSHOT@aar", "xrecyclerview" : "com.ydl:xrecyclerview:1.0.0-SNAPSHOT@aar",
"mmkv" : "com.tencent:mmkv-static:1.2.6", "mmkv" : "com.tencent:mmkv-static:1.2.6",
"arouter-api" : "com.alibaba:arouter-api:1.4.1", "arouter-api" : "com.alibaba:arouter-api:1.4.1",
...@@ -284,7 +277,7 @@ ext { ...@@ -284,7 +277,7 @@ ext {
//flutter功能组件升级===>发布ydl-flutter组件===>引用flutter相关的业务模块 //flutter功能组件升级===>发布ydl-flutter组件===>引用flutter相关的业务模块
"ydl-flutter-base" : "com.ydl:ydl-flutter-base:${ydlCompileVersion["ydl-flutter-base"]}", //组件化项目中的flutter base模块 "ydl-flutter-base" : "com.ydl:ydl-flutter-base:${ydlCompileVersion["ydl-flutter-base"]}", //组件化项目中的flutter base模块
"ydl-flutter" : "com.ydl:ydl-flutter:0.0.44@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 // "ydl-flutter-sp" : "com.ydl:ydl-flutter-sp:0.0.2@aar", //flutter 缓存 aar
//基础组件 <<--- 先发这个,发完改这里的版本号 //基础组件 <<--- 先发这个,发完改这里的版本号
......
...@@ -75,7 +75,7 @@ dependencies { ...@@ -75,7 +75,7 @@ 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"
implementation "com.ydl:ydl-av:1.4.4" api "com.ydl:ydl-av:1.4.4"
implementation 'com.volcengine:apm_insight:1.4.6.cn' implementation 'com.volcengine:apm_insight:1.4.6.cn'
if (rootProject.ext.dev_mode){ if (rootProject.ext.dev_mode){
......
...@@ -33,6 +33,7 @@ import com.ydl.audioim.http.command.NoticePushCommand ...@@ -33,6 +33,7 @@ import com.ydl.audioim.http.command.NoticePushCommand
import com.ydl.audioim.http.command.PayLoad import com.ydl.audioim.http.command.PayLoad
import com.ydl.audioim.player.AudioPlayer import com.ydl.audioim.player.AudioPlayer
import com.ydl.audioim.presenter.AudioHomePresenterImpl import com.ydl.audioim.presenter.AudioHomePresenterImpl
import com.ydl.audioim.router.AudioImIn
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.utils.onConfideEvent
...@@ -636,6 +637,9 @@ class AudioHomeActivity : ...@@ -636,6 +637,9 @@ class AudioHomeActivity :
private fun setClickEvent() { private fun setClickEvent() {
//跳转客服小壹 //跳转客服小壹
jump_kefu.setOnClickListener { jump_kefu.setOnClickListener {
if (!AudioImIn.getUserService().loginByOneKeyLogin(this@AudioHomeActivity,true)) {
return@setOnClickListener
}
val imService = ARouter.getInstance().navigation(IImService::class.java) val imService = ARouter.getInstance().navigation(IImService::class.java)
imService?.startKefuChat(this, "", 0, 0) imService?.startKefuChat(this, "", 0, 0)
} }
......
...@@ -708,9 +708,13 @@ class YDLavManager { ...@@ -708,9 +708,13 @@ class YDLavManager {
session: String?, session: String?,
line: String line: String
) { ) {
AudioApiRequestUtil.callEventSave(session, line, status, "用户端:${res}") //保证session有值
.subscribeOn(Schedulers.io()) session?.let { sessionLet ->
.observeOn(AndroidSchedulers.mainThread()) AudioApiRequestUtil.callEventSave(sessionLet, line, status, "用户端:${res}")
.subscribe() .subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe()
}
} }
} }
\ No newline at end of file
...@@ -4,6 +4,7 @@ import com.ydl.ydlcommon.modular.ModularServiceManager ...@@ -4,6 +4,7 @@ import com.ydl.ydlcommon.modular.ModularServiceManager
import com.yidianling.im.api.bean.IMRegisterObserverCustomNotificationCallBack import com.yidianling.im.api.bean.IMRegisterObserverCustomNotificationCallBack
import com.yidianling.im.api.bean.IMSendCustomNotificationResultCallBack import com.yidianling.im.api.bean.IMSendCustomNotificationResultCallBack
import com.yidianling.im.api.service.IImService import com.yidianling.im.api.service.IImService
import com.yidianling.user.api.service.IUserService
/** /**
...@@ -17,7 +18,9 @@ object AudioImIn { ...@@ -17,7 +18,9 @@ object AudioImIn {
private fun getImService(): IImService { private fun getImService(): IImService {
return ModularServiceManager.provide(IImService::class.java) return ModularServiceManager.provide(IImService::class.java)
} }
fun getUserService(): IUserService {
return ModularServiceManager.provide(IUserService::class.java)
}
/** /**
* 发送自定义通知 * 发送自定义通知
*/ */
......
...@@ -2,13 +2,7 @@ apply plugin: 'com.android.library' ...@@ -2,13 +2,7 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android' apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions' apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt' apply plugin: 'kotlin-kapt'
apply plugin: 'resTools' // 资源重命名插件 apply from : '../maven_push.gradle'
// 配置资源重命名插件
resConfig {
new_prefix = 'confide_' // 资源前缀
old_prefix = '' // 老前缀,可为''空字符串
}
kapt { kapt {
arguments { arguments {
...@@ -17,16 +11,11 @@ kapt { ...@@ -17,16 +11,11 @@ kapt {
} }
android { android {
// compileSdkVersion rootProject.ext.android["compileSdkVersion"]
// buildToolsVersion rootProject.ext.android["buildToolsVersion"]
compileSdkVersion rootProject.ext.compileSdkVersion compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion buildToolsVersion rootProject.ext.buildToolsVersion
defaultConfig { defaultConfig {
// minSdkVersion rootProject.ext.android["minSdkVersion"]
// targetSdkVersion rootProject.ext.android["targetSdkVersion"]
minSdkVersion rootProject.ext.minSdkVersion minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion
...@@ -54,12 +43,6 @@ android { ...@@ -54,12 +43,6 @@ android {
enabled true enabled true
} }
publishNonDefault true
productFlavors {
ydl {}
xlzx {}
}
//设置JDK1.8 //设置JDK1.8
compileOptions { compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8 sourceCompatibility JavaVersion.VERSION_1_8
...@@ -85,7 +68,6 @@ dependencies { ...@@ -85,7 +68,6 @@ dependencies {
implementation "com.ydl:jjdxm-ijkplayer:0.0.33" implementation "com.ydl:jjdxm-ijkplayer:0.0.33"
api rootProject.ext.dependencies["ydl-user-router"] api rootProject.ext.dependencies["ydl-user-router"]
implementation modularPublication('com.ydl:m-consultant-api')
if (rootProject.ext.dev_mode){ if (rootProject.ext.dev_mode){
//开发时使用 //开发时使用
api project(':ydl-media') api project(':ydl-media')
...@@ -96,7 +78,8 @@ dependencies { ...@@ -96,7 +78,8 @@ dependencies {
api project(':ydl-utils') api project(':ydl-utils')
implementation modularPublication('com.ydl:m-im-api') implementation modularPublication('com.ydl:m-im-api')
implementation modularPublication('com.ydl:m-user-api') implementation modularPublication('com.ydl:m-user-api')
implementation modularPublication('com.ydl:m-confide-api') implementation modularPublication('com.ydl:m-consultant-api')
implementation project(':api:confide')
}else { }else {
//发布时使用 //发布时使用
api rootProject.ext.dependencies["ydl-media"] api rootProject.ext.dependencies["ydl-media"]
...@@ -109,5 +92,6 @@ dependencies { ...@@ -109,5 +92,6 @@ dependencies {
compileOnly rootProject.ext.dependencies["ydl-m-im-api"] compileOnly rootProject.ext.dependencies["ydl-m-im-api"]
compileOnly rootProject.ext.dependencies["ydl-m-user-api"] compileOnly rootProject.ext.dependencies["ydl-m-user-api"]
compileOnly rootProject.ext.dependencies["ydl-m-confide-api"] compileOnly rootProject.ext.dependencies["ydl-m-confide-api"]
compileOnly rootProject.ext.dependencies["ydl-m-consultant-api"]
} }
} }
modular {
packageName "com.ydl.confide"
// 模块发布需要的参数
publish {
modules {
xlzx {
//发布信息 module/api 通用
groupId = "com.ydl"
artifactId = "m-confide-module-xlzx"
// 上报的业务模块 aar 包的版本号
version = rootProject.ext.ydlPublishVersion[childProject.getName()]
}
ydl{
//发布信息 module/api 通用
groupId = "com.ydl"
artifactId = "m-confide-module-ydl"
// 上报的业务模块 aar 包的版本号
version = rootProject.ext.ydlPublishVersion[childProject.getName()]
}
}
api {
//发布信息 module/api 通用
groupId = "com.ydl"
artifactId = "m-confide-api"
version = rootProject.ext.ydlPublishVersion["${childProject.getName()}-api"]
// API 层打包时需要引入的依赖
apiDependencies {
implementation 'androidx.fragment:fragment-ktx:1.2.4'
implementation "com.google.code.gson:gson:2.8.2"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.alibaba:arouter-api:1.4.1'
}
}
}
}
\ No newline at end of file
...@@ -9,5 +9,7 @@ ...@@ -9,5 +9,7 @@
<activity <activity
android:name=".intro.ExpertIntroActivity" android:name=".intro.ExpertIntroActivity"
android:screenOrientation="portrait" /> android:screenOrientation="portrait" />
<activity android:name=".home.ConfideSearchActivity"
android:screenOrientation="portrait"/>
</application> </application>
</manifest> </manifest>
package com.ydl.confide.home
import android.content.Context
import android.content.Intent
import android.text.Editable
import android.text.TextUtils
import android.text.TextWatcher
import android.view.View
import android.view.WindowManager
import android.view.inputmethod.EditorInfo
import android.view.inputmethod.InputMethodManager
import android.widget.TextView
import com.ydl.confide.R
import com.ydl.confide.home.constants.FinalString
import com.ydl.ydlcommon.base.BaseActivity
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import kotlinx.android.synthetic.main.confide_search_activity.*
class ConfideSearchActivity : BaseActivity() {
override fun initDataAndEvent() {
val keyWord = intent.getStringExtra(FinalString.CONFIDE_SEARCH_KEY_WORD)
if (!TextUtils.isEmpty(keyWord)){
etSearch?.setText(keyWord)
iv_delete_icon.visibility = View.VISIBLE
}
etSearch.setOnEditorActionListener { _, actionId, _ ->
if (actionId == EditorInfo.IME_ACTION_SEARCH) {
val keyword = etSearch!!.text.trim().toString()
//埋点
ActionCountUtils.record("listen_counselor_list_page","listen_counselor_list_search_click",keyword)
val intent = Intent()
intent.putExtra(FinalString.CONFIDE_SEARCH_KEY_WORD, keyword)
setResult(RESULT_OK,intent)
finish()
}
true
}
findViewById<TextView>(R.id.tv_search_cancle).setOnClickListener {
setResult(RESULT_OK)
finish()
}
if (etSearch.requestFocus()) {
val imm = getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
val isShowing = imm.showSoftInput(etSearch, InputMethodManager.SHOW_IMPLICIT)
if (!isShowing) {
window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE)
}
}
etSearch.addTextChangedListener(object : TextWatcher {
override fun afterTextChanged(s: Editable?) {
if (TextUtils.isEmpty(s)) {
iv_delete_icon.visibility = View.INVISIBLE
} else {
iv_delete_icon.visibility = View.VISIBLE
}
}
override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {}
override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
}
})
iv_delete_icon.setOnClickListener {
etSearch.setText("")
}
}
override fun layoutResId(): Int {
return R.layout.confide_search_activity
}
}
\ No newline at end of file
...@@ -9,6 +9,8 @@ package com.ydl.confide.home.bean ...@@ -9,6 +9,8 @@ package com.ydl.confide.home.bean
*/ */
data class ConfideHomeAllFiltersBean( data class ConfideHomeAllFiltersBean(
var page : Int, var page : Int,
//通过倾诉师的名字搜索
var keywords : String,
//选择的综合排序Id //选择的综合排序Id
var selectSort : ConfideHomeFiterItemBean?, var selectSort : ConfideHomeFiterItemBean?,
//选择的性别id //选择的性别id
...@@ -19,4 +21,6 @@ data class ConfideHomeAllFiltersBean( ...@@ -19,4 +21,6 @@ data class ConfideHomeAllFiltersBean(
val selectGoodData : ArrayList<ConfideHomeFiterItemBean>?, val selectGoodData : ArrayList<ConfideHomeFiterItemBean>?,
//当前列表已存在专家uid列表 //当前列表已存在专家uid列表
var notInUid : ArrayList<Int> = ArrayList() var notInUid : ArrayList<Int> = ArrayList()
) )
\ No newline at end of file
...@@ -30,4 +30,6 @@ data class ConfideHomeDataBean( ...@@ -30,4 +30,6 @@ data class ConfideHomeDataBean(
/** /**
* 为你推荐Id 本地使用 用于区分音频播放区域 * 为你推荐Id 本地使用 用于区分音频播放区域
*/ */
var recommendId : Int) var recommendId : Int,
\ No newline at end of file
var keyword : String = "")
\ No newline at end of file
...@@ -2,6 +2,7 @@ package com.ydl.confide.home.bean ...@@ -2,6 +2,7 @@ package com.ydl.confide.home.bean
class DialStatus { class DialStatus {
var confideLine: Int? = null var confideLine: Int? = null
var linkUrl: String? = ""
var remainingTime: RemainingTime? = null var remainingTime: RemainingTime? = null
} }
......
...@@ -20,6 +20,8 @@ interface IConfideHomeConfig{ ...@@ -20,6 +20,8 @@ interface IConfideHomeConfig{
const val TYPE_RECOMMEND = 5 const val TYPE_RECOMMEND = 5
const val TYPE_SOUND = 6 const val TYPE_SOUND = 6
const val TYPE_VIDEO_SHOW = 7 const val TYPE_VIDEO_SHOW = 7
const val TYPE_SEARCH = 8
const val TYPE_EMPTY = 9
const val TYPE_FOOTER = 999 const val TYPE_FOOTER = 999
/** /**
* section id. 与上面相对应 * section id. 与上面相对应
...@@ -31,6 +33,8 @@ interface IConfideHomeConfig{ ...@@ -31,6 +33,8 @@ interface IConfideHomeConfig{
const val SECTION_RECOMMEND = 10005 const val SECTION_RECOMMEND = 10005
const val SECTION_SOUND = 10006 const val SECTION_SOUND = 10006
const val SECTION_CONSULTANT = 10007 const val SECTION_CONSULTANT = 10007
const val SECTION_SEARCH = 10008
const val SECTION_EMPTY = 10009
const val SECTION_FOOTER = 19999 const val SECTION_FOOTER = 19999
......
...@@ -19,4 +19,9 @@ public class FinalString { ...@@ -19,4 +19,9 @@ public class FinalString {
//连接倾听未绑定手机提示 //连接倾听未绑定手机提示
public static final String TEL_BINDPHONE = "电话连接需要绑定手机哦~"; public static final String TEL_BINDPHONE = "电话连接需要绑定手机哦~";
public static final String CONFIDE_SEARCH_KEY_WORD = "confide_key_word";
public static final int SEARCH_REQUEST_CODE = 1;
} }
...@@ -3,7 +3,8 @@ package com.ydl.confide.home.event ...@@ -3,7 +3,8 @@ package com.ydl.confide.home.event
data class ChangeAnotherExpertEvent( data class ChangeAnotherExpertEvent(
var doctorID: String, var doctorID: String,
var title: String, var title: String,
var uid: String var uid: String,
var linkUrl: String
) )
class ConfideDialogEvent(val show: Int) class ConfideDialogEvent(val show: Int)
\ No newline at end of file
...@@ -132,13 +132,13 @@ class ConfideHomeEventImpl(context: Context, var confideHomeView: IConfideHomeCo ...@@ -132,13 +132,13 @@ class ConfideHomeEventImpl(context: Context, var confideHomeView: IConfideHomeCo
* 最佳倾诉榜单--点我倾诉 * 最佳倾诉榜单--点我倾诉
* @param linkUrl 跳转地址 * @param linkUrl 跳转地址
*/ */
override fun consultantClick(doctorId: String?, confideId: String?, uid: String?) { override fun consultantClick(doctorId: String?, confideId: String?, uid: String?,listenFree : Boolean?, expertUrl:String?) {
confideId?.let { confideId?.let {
ConfideBottomSheetDialogFragment() ConfideBottomSheetDialogFragment()
.showBottomSheetDialog( .showBottomSheetDialog(
mContext as FragmentActivity, mContext as FragmentActivity,
HttpConfig.MH5_URL + ConfideRoute.h5ConfideIntro(it), HttpConfig.MH5_URL + ConfideRoute.h5ConfideIntro(it),
doctorId!!, uid = uid doctorId!!, uid = uid, listenFree = listenFree ?: false,expertUrl = expertUrl?:""
) )
} }
} }
......
...@@ -73,7 +73,7 @@ interface IConfideHomeEvent { ...@@ -73,7 +73,7 @@ interface IConfideHomeEvent {
* 咨询师推荐--点我倾诉 * 咨询师推荐--点我倾诉
* @param linkUrl 跳转地址 * @param linkUrl 跳转地址
*/ */
fun consultantClick(doctorId: String?, confideId: String?, uid: String?) fun consultantClick(doctorId: String?, confideId: String?, uid: String?, listenFree: Boolean?= false, expertUrl : String?="")
fun videoShowClick(index: Int, data: List<ConfideHomeBodyBean>?) fun videoShowClick(index: Int, data: List<ConfideHomeBodyBean>?)
......
...@@ -38,7 +38,7 @@ interface ConfideHomeApi { ...@@ -38,7 +38,7 @@ interface ConfideHomeApi {
// 1=在线 3-通话中 2-离线 // 1=在线 3-通话中 2-离线
@Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA) @Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA)
@GET("auth/listen/dialchangestatus") @GET("auth/listen/dialchangestatus")
fun getDialStatus(@Query("doctorId") doctorId: String): Observable<BaseAPIResponse<DialStatus>> fun getDialStatus(@Query("doctorId") doctorId: String, @Query("listenVersion")listenVersion : String = "2.1"): Observable<BaseAPIResponse<DialStatus>>
@GET @GET
fun recommendDoctor( fun recommendDoctor(
......
...@@ -51,6 +51,7 @@ class ConfideHomeHttpImpl private constructor() : IConfideHomeHttp { ...@@ -51,6 +51,7 @@ class ConfideHomeHttpImpl private constructor() : IConfideHomeHttp {
val sb = StringBuffer() val sb = StringBuffer()
sb.append("page").append("=").append(param.page).append("&") sb.append("page").append("=").append(param.page).append("&")
.append("keywords").append("=").append(param.getKeywords()).append("&")
.append("sortType").append("=").append(param.getSortType()).append("&") .append("sortType").append("=").append(param.getSortType()).append("&")
.append("sexType").append("=").append(param.getSexType()).append("&") .append("sexType").append("=").append(param.getSexType()).append("&")
.append("ageType").append("=").append(param.getAgeType()).append("&") .append("ageType").append("=").append(param.getAgeType()).append("&")
......
...@@ -30,6 +30,8 @@ class ConfideRecommendParam private constructor(builder: Builder){ ...@@ -30,6 +30,8 @@ class ConfideRecommendParam private constructor(builder: Builder){
*/ */
private var goodType : String = "" private var goodType : String = ""
private var keyWords : String = ""
//当前列表已存在专家uid列表 //当前列表已存在专家uid列表
var notInUid : ArrayList<Int> = ArrayList() var notInUid : ArrayList<Int> = ArrayList()
...@@ -49,6 +51,10 @@ class ConfideRecommendParam private constructor(builder: Builder){ ...@@ -49,6 +51,10 @@ class ConfideRecommendParam private constructor(builder: Builder){
return goodType return goodType
} }
fun getKeywords() : String{
return keyWords
}
init { init {
this.page = builder.page this.page = builder.page
this.sortType = builder.sortType this.sortType = builder.sortType
...@@ -56,6 +62,7 @@ class ConfideRecommendParam private constructor(builder: Builder){ ...@@ -56,6 +62,7 @@ class ConfideRecommendParam private constructor(builder: Builder){
this.ageType = builder.ageType this.ageType = builder.ageType
this.goodType = builder.goodType this.goodType = builder.goodType
this.notInUid = builder.notInUid this.notInUid = builder.notInUid
this.keyWords = builder.keyWords
} }
class Builder { class Builder {
...@@ -65,6 +72,7 @@ class ConfideRecommendParam private constructor(builder: Builder){ ...@@ -65,6 +72,7 @@ class ConfideRecommendParam private constructor(builder: Builder){
internal var ageType : String = "" internal var ageType : String = ""
internal var goodType : String = "" internal var goodType : String = ""
internal var notInUid : ArrayList<Int> = ArrayList() internal var notInUid : ArrayList<Int> = ArrayList()
internal var keyWords : String = ""
fun page(page: Int): Builder { fun page(page: Int): Builder {
this.page = page this.page = page
...@@ -91,9 +99,17 @@ class ConfideRecommendParam private constructor(builder: Builder){ ...@@ -91,9 +99,17 @@ class ConfideRecommendParam private constructor(builder: Builder){
return this return this
} }
fun keyWords(keyWords: String): Builder {
this.keyWords = keyWords
return this
}
fun build() : ConfideRecommendParam{ fun build() : ConfideRecommendParam{
return ConfideRecommendParam(this) return ConfideRecommendParam(this)
} }
} }
} }
......
...@@ -13,7 +13,7 @@ import com.yidianling.common.tools.RxImageTool ...@@ -13,7 +13,7 @@ import com.yidianling.common.tools.RxImageTool
* @Company 壹点灵 * @Company 壹点灵
* @date 2018/9/25 * @date 2018/9/25
*/ */
class ConfideHomeRecycleViewListener : RecyclerView.OnScrollListener() { class ConfideHomeRecycleViewListener() : RecyclerView.OnScrollListener() {
/** /**
* 筛选模块位置 * 筛选模块位置
*/ */
...@@ -23,6 +23,15 @@ class ConfideHomeRecycleViewListener : RecyclerView.OnScrollListener() { ...@@ -23,6 +23,15 @@ class ConfideHomeRecycleViewListener : RecyclerView.OnScrollListener() {
*/ */
private var move = false private var move = false
private lateinit var listener: HideScrollListener
private var visible = true
constructor(listener: HideScrollListener):this(){
this.listener = listener
}
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) { override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
super.onScrolled(recyclerView, dx, dy) super.onScrolled(recyclerView, dx, dy)
//在这里进行第二次滚动(最后的距离) //在这里进行第二次滚动(最后的距离)
...@@ -37,6 +46,15 @@ class ConfideHomeRecycleViewListener : RecyclerView.OnScrollListener() { ...@@ -37,6 +46,15 @@ class ConfideHomeRecycleViewListener : RecyclerView.OnScrollListener() {
recyclerView.scrollBy(0, top) recyclerView.scrollBy(0, top)
} }
} }
if (dy > 0 && visible) {
visible = false
listener.onHide()
} else if (dy < 0 && !visible) {
visible = true
listener.onShow()
}
} }
/** /**
...@@ -54,7 +72,7 @@ class ConfideHomeRecycleViewListener : RecyclerView.OnScrollListener() { ...@@ -54,7 +72,7 @@ class ConfideHomeRecycleViewListener : RecyclerView.OnScrollListener() {
mRecyclerView.scrollBy(0, 1) mRecyclerView.scrollBy(0, 1)
val childAt = mRecyclerView.getChildAt(mIndex) val childAt = mRecyclerView.getChildAt(mIndex)
if (childAt !is ConfideHomeFilterView) return if (childAt !is ConfideHomeFilterView) return
val top = childAt.top val top = childAt.top - childAt.height
if(top==0 || top==1){ if(top==0 || top==1){
//已滚动到顶部 //已滚动到顶部
...@@ -82,4 +100,6 @@ class ConfideHomeRecycleViewListener : RecyclerView.OnScrollListener() { ...@@ -82,4 +100,6 @@ class ConfideHomeRecycleViewListener : RecyclerView.OnScrollListener() {
// move = true // move = true
// } // }
} }
} }
\ No newline at end of file
package com.ydl.confide.home.listener package com.ydl.confide.home.listener
import android.text.Editable
import android.text.TextUtils
import android.text.TextWatcher
import android.util.Log
import android.view.View
import android.widget.EditText
import android.widget.ImageView
import android.widget.RelativeLayout
import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import android.view.View import com.ydl.confide.R
import com.yidianling.common.tools.LogUtil
import com.yidianling.common.tools.RxImageTool
import com.ydl.confide.home.adapter.ConfideHomeAdapter import com.ydl.confide.home.adapter.ConfideHomeAdapter
import com.ydl.confide.home.config.IConfideHomeConfig import com.ydl.confide.home.config.IConfideHomeConfig
import com.ydl.confide.home.widget.ConfideHomeFilterView import com.ydl.confide.home.widget.ConfideHomeFilterView
import com.ydl.ydlcommon.base.BaseActivityMgr
import com.ydl.ydlcommon.utils.KeyboardChangeListener
import com.yidianling.common.tools.LogUtil
import com.yidianling.common.tools.RxImageTool
/** /**
* @author yuanwai * @author yuanwai
...@@ -22,9 +32,14 @@ class ConfideHomeRecyleSuspendListener : RecyclerView.OnScrollListener() { ...@@ -22,9 +32,14 @@ class ConfideHomeRecyleSuspendListener : RecyclerView.OnScrollListener() {
private var mSuspensionHeight: Int = RxImageTool.dip2px(48f) private var mSuspensionHeight: Int = RxImageTool.dip2px(48f)
private var mSearchViewHeight: Int = RxImageTool.dip2px(48f)
private var filterView: ConfideHomeFilterView? = null private var filterView: ConfideHomeFilterView? = null
private var searchView: RelativeLayout? = null
private var divView: View? = null private var divView: View? = null
private var searchText = ""
private var adapter: ConfideHomeAdapter? = null private var adapter: ConfideHomeAdapter? = null
fun setFilterView(filterView: ConfideHomeFilterView, divView: View) { fun setFilterView(filterView: ConfideHomeFilterView, divView: View) {
...@@ -32,6 +47,17 @@ class ConfideHomeRecyleSuspendListener : RecyclerView.OnScrollListener() { ...@@ -32,6 +47,17 @@ class ConfideHomeRecyleSuspendListener : RecyclerView.OnScrollListener() {
this.divView = divView this.divView = divView
} }
fun setFilterView(
filterView: ConfideHomeFilterView,
searchView: RelativeLayout,
divView: View
) {
this.filterView = filterView
this.divView = divView
this.searchView = searchView
}
fun setSectionAdapter(adapter: ConfideHomeAdapter) { fun setSectionAdapter(adapter: ConfideHomeAdapter) {
this.adapter = adapter this.adapter = adapter
} }
...@@ -41,6 +67,11 @@ class ConfideHomeRecyleSuspendListener : RecyclerView.OnScrollListener() { ...@@ -41,6 +67,11 @@ class ConfideHomeRecyleSuspendListener : RecyclerView.OnScrollListener() {
if (null != filterView) { if (null != filterView) {
mSuspensionHeight = filterView!!.height mSuspensionHeight = filterView!!.height
} }
if (searchView != null) {
mSearchViewHeight = searchView!!.height
}
} }
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) { override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
...@@ -49,24 +80,42 @@ class ConfideHomeRecyleSuspendListener : RecyclerView.OnScrollListener() { ...@@ -49,24 +80,42 @@ class ConfideHomeRecyleSuspendListener : RecyclerView.OnScrollListener() {
return return
} }
val manager = recyclerView!!.layoutManager as LinearLayoutManager val manager = recyclerView!!.layoutManager as LinearLayoutManager
val findFirstCompletelyVisibleItemPosition =
manager.findFirstCompletelyVisibleItemPosition();
if (findFirstCompletelyVisibleItemPosition != 0 && findFirstCompletelyVisibleItemPosition != 1) {
searchView?.visibility = View.VISIBLE
} else {
searchView?.visibility = View.INVISIBLE
}
if (mCurrentPosition != manager.findFirstVisibleItemPosition()) { if (mCurrentPosition != manager.findFirstVisibleItemPosition()) {
mCurrentPosition = manager.findFirstVisibleItemPosition() mCurrentPosition = manager.findFirstVisibleItemPosition()
} }
LogUtil.e("http----------------type="+adapter!!.getItemViewType(mCurrentPosition))
if (adapter!!.getItemViewType(mCurrentPosition) == IConfideHomeConfig.TYPE_RECOMMEND) { LogUtil.e("http----------------type=" + adapter!!.getItemViewType(mCurrentPosition))
if (adapter!!.getItemViewType(mCurrentPosition + 1) == IConfideHomeConfig.TYPE_RECOMMEND) {
var view = manager.findViewByPosition(mCurrentPosition + 1) var view = manager.findViewByPosition(mCurrentPosition + 1)
if (view != null) { if (view != null) {
if (view.top <= mSuspensionHeight) { if (view is ConfideHomeFilterView) {
filterView!!.visibility = View.VISIBLE if (view.top <= mSuspensionHeight) {
divView?.visibility = View.VISIBLE filterView!!.visibility = View.VISIBLE
} else { divView?.visibility = View.VISIBLE
} else {
// filterView!!.visibility = View.INVISIBLE // filterView!!.visibility = View.INVISIBLE
filterView!!.visibility = View.INVISIBLE
divView?.visibility = View.INVISIBLE
}
} }
} }
}else if (adapter!!.getItemViewType(mCurrentPosition) == IConfideHomeConfig.TYPE_RECOMMEND || adapter!!.getItemViewType(mCurrentPosition) == IConfideHomeConfig.TYPE_SOUND){ } else if (adapter!!.getItemViewType(mCurrentPosition + 1) == IConfideHomeConfig.TYPE_RECOMMEND || adapter!!.getItemViewType(
mCurrentPosition + 1
) == IConfideHomeConfig.TYPE_SOUND
) {
filterView!!.visibility = View.VISIBLE filterView!!.visibility = View.VISIBLE
divView?.visibility = View.VISIBLE divView?.visibility = View.VISIBLE
}else { } else {
filterView!!.visibility = View.INVISIBLE filterView!!.visibility = View.INVISIBLE
divView?.visibility = View.INVISIBLE divView?.visibility = View.INVISIBLE
} }
......
package com.ydl.confide.home.listener
interface HideScrollListener {
fun onHide()
fun onShow()
}
\ No newline at end of file
...@@ -98,6 +98,10 @@ class ConfdieServiceImpl : IConfideService { ...@@ -98,6 +98,10 @@ class ConfdieServiceImpl : IConfideService {
YDLavManager.instances.init(app, avManagerKey) YDLavManager.instances.init(app, avManagerKey)
} }
override fun isOnlineRtm(): Boolean {
return YDLavManager.isOnlineRtm
}
override fun showAxbConfirmDialog(activity: Activity?, type: Int, phoneNumber: String?) { override fun showAxbConfirmDialog(activity: Activity?, type: Int, phoneNumber: String?) {
val dialog = AxbConfirmDialog(activity, type, object : AxbConfirmDialog.OnClickEnsureListener { val dialog = AxbConfirmDialog(activity, type, object : AxbConfirmDialog.OnClickEnsureListener {
override fun onClickEnsure() { override fun onClickEnsure() {
......
...@@ -14,6 +14,7 @@ import com.ydl.audioim.widget.AxbConfirmDialog ...@@ -14,6 +14,7 @@ import com.ydl.audioim.widget.AxbConfirmDialog
import com.ydl.confide.home.bean.ConnectParamJava import com.ydl.confide.home.bean.ConnectParamJava
import com.ydl.confide.home.constants.FinalString import com.ydl.confide.home.constants.FinalString
import com.ydl.confide.home.http.ConfideHomeDataManager import com.ydl.confide.home.http.ConfideHomeDataManager
import com.ydl.confide.router.PhoneCallIn
import com.ydl.webview.H5Params import com.ydl.webview.H5Params
import com.ydl.webview.NewH5Activity import com.ydl.webview.NewH5Activity
import com.ydl.webview.TellData import com.ydl.webview.TellData
...@@ -73,6 +74,27 @@ class ConfideWebServiceImpl { ...@@ -73,6 +74,27 @@ class ConfideWebServiceImpl {
tellData: TellData?, tellData: TellData?,
callType: String? callType: String?
) { ) {
if (!YDLavManager.isOnlineRtm) {
YDLavManager.instances.login(PhoneCallIn.getUserService().getUserInfo()?.uid) { isSuccess: Boolean, _ ->
if (isSuccess) {
toDial(id, type, callType, activity, tellData)
} else {
ToastUtil.toastShort("网络通话错误代码001")
}
}
}else{
toDial(id, type, callType, activity, tellData)
}
}
@SuppressLint("CheckResult")
private fun toDial(
id: Int,
type: Int,
callType: String?,
activity: Activity,
tellData: TellData?
) {
ConfideHomeDataManager.getHttp() ConfideHomeDataManager.getHttp()
.connectionJava(ConnectParamJava("" + id, "" + type, callType)) .connectionJava(ConnectParamJava("" + id, "" + type, callType))
.subscribeOn(Schedulers.io()) .subscribeOn(Schedulers.io())
......
...@@ -54,7 +54,7 @@ class ConfideHomeSexAgePopupWindow(context: Context, sexData: ArrayList<ConfideH ...@@ -54,7 +54,7 @@ class ConfideHomeSexAgePopupWindow(context: Context, sexData: ArrayList<ConfideH
tvSexTitle.text = "性别筛选" tvSexTitle.text = "性别筛选"
tvAgeTitle.text = "年龄筛选" tvAgeTitle.text = "年龄筛选"
if (null == mAllFiltersBean){ if (null == mAllFiltersBean){
mAllFiltersBean = ConfideHomeAllFiltersBean(allFiltersBean.page,allFiltersBean.selectSort,allFiltersBean.selectSex,allFiltersBean.selectAgeData,allFiltersBean.selectGoodData) mAllFiltersBean = ConfideHomeAllFiltersBean(allFiltersBean.page,"",allFiltersBean.selectSort,allFiltersBean.selectSex,allFiltersBean.selectAgeData,allFiltersBean.selectGoodData)
} }
initData(sexData,ageData,mAllFiltersBean!!) initData(sexData,ageData,mAllFiltersBean!!)
initSexData(view,mAllFiltersBean!!) initSexData(view,mAllFiltersBean!!)
......
...@@ -490,6 +490,10 @@ class ConfideHomeUtils { ...@@ -490,6 +490,10 @@ class ConfideHomeUtils {
if (-1 != allFiltersBean.page) { if (-1 != allFiltersBean.page) {
param.page(allFiltersBean.page) param.page(allFiltersBean.page)
} }
if (null != allFiltersBean.keywords){
param.keyWords(allFiltersBean.keywords)
}
//综合排序 //综合排序
if (null != allFiltersBean.selectSort && !TextUtils.isEmpty(allFiltersBean.selectSort!!.id) && "-1" != allFiltersBean.selectSort!!.id) { if (null != allFiltersBean.selectSort && !TextUtils.isEmpty(allFiltersBean.selectSort!!.id) && "-1" != allFiltersBean.selectSort!!.id) {
param.sortType(allFiltersBean.selectSort!!.id!!) param.sortType(allFiltersBean.selectSort!!.id!!)
......
...@@ -16,9 +16,15 @@ fun TextView.confideLineText(line: Int) { ...@@ -16,9 +16,15 @@ fun TextView.confideLineText(line: Int) {
3 -> { 3 -> {
text = "通话中" text = "通话中"
} }
4->{ 4 -> {
text = "继续倾诉" text = "继续倾诉"
} }
5 -> {
text = "已离线,可预约"
}
6 -> {
text = "已离线,可留言"
}
} }
} }
......
...@@ -243,7 +243,7 @@ class ConfideHomeRecommendExpertItemView(mContext: Context, private var confideH ...@@ -243,7 +243,7 @@ class ConfideHomeRecommendExpertItemView(mContext: Context, private var confideH
private fun click(bodyBean: ConfideHomeBodyBean) { private fun click(bodyBean: ConfideHomeBodyBean) {
when (bodyBean.confideLine) {//1在线 2离线 3通话中 when (bodyBean.confideLine) {//1在线 2离线 3通话中
1, 3, 4 -> { 1, 3, 4 -> {
confideHomeEvent.consultantClick(bodyBean.doctorId, bodyBean.confidedId, bodyBean.uid?.toString()) confideHomeEvent.consultantClick(bodyBean.doctorId, bodyBean.confidedId, bodyBean.uid?.toString(), bodyBean.listenFree)
} }
2 -> { 2 -> {
//跳转私聊 并发送自定义消息 //跳转私聊 并发送自定义消息
......
...@@ -94,7 +94,8 @@ class ConfideHomeRecommendView(var view: IConfideHomeContract.View, context: Con ...@@ -94,7 +94,8 @@ class ConfideHomeRecommendView(var view: IConfideHomeContract.View, context: Con
"1" "1"
) )
confideHomeEvent.consultantClick(bodyBean.doctorId, bodyBean.confidedId, bodyBean.uid?.toString()) confideHomeEvent.consultantClick(bodyBean.doctorId, bodyBean.confidedId, bodyBean.uid?.toString(), bodyBean.listenFree,bodyBean.linkUrl)
} }
img_head.setOnClickListener { img_head.setOnClickListener {
ActionCountUtils.record("listen_counselor_list_page", "head_portrait_click", "2") ActionCountUtils.record("listen_counselor_list_page", "head_portrait_click", "2")
...@@ -344,7 +345,7 @@ class ConfideHomeRecommendView(var view: IConfideHomeContract.View, context: Con ...@@ -344,7 +345,7 @@ class ConfideHomeRecommendView(var view: IConfideHomeContract.View, context: Con
if (bodyBean.confideLine == 3) { if (bodyBean.confideLine == 3) {
} }
confideHomeEvent.consultantClick(bodyBean.doctorId, bodyBean.confidedId, bodyBean.uid?.toString()) confideHomeEvent.consultantClick(bodyBean.doctorId, bodyBean.confidedId, bodyBean.uid?.toString(), bodyBean.listenFree)
} }
2 -> { 2 -> {
//跳转私聊 并发送自定义消息 //跳转私聊 并发送自定义消息
......
...@@ -2,6 +2,7 @@ package com.ydl.confide.intro ...@@ -2,6 +2,7 @@ package com.ydl.confide.intro
import android.app.Activity import android.app.Activity
import android.net.Uri import android.net.Uri
import android.text.TextUtils
import android.util.Log import android.util.Log
import android.view.View import android.view.View
import android.widget.SeekBar import android.widget.SeekBar
...@@ -11,9 +12,11 @@ import androidx.databinding.ObservableInt ...@@ -11,9 +12,11 @@ import androidx.databinding.ObservableInt
import androidx.databinding.ViewDataBinding import androidx.databinding.ViewDataBinding
import androidx.fragment.app.FragmentActivity import androidx.fragment.app.FragmentActivity
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import com.alibaba.android.arouter.launcher.ARouter
import com.dou361.ijkplayer.widget.IjkVideoView import com.dou361.ijkplayer.widget.IjkVideoView
import com.facebook.drawee.backends.pipeline.Fresco import com.facebook.drawee.backends.pipeline.Fresco
import com.facebook.drawee.interfaces.DraweeController import com.facebook.drawee.interfaces.DraweeController
import com.ydl.audioim.YDLavManager
import com.ydl.confide.R import com.ydl.confide.R
import com.ydl.confide.api.ConfideRoute import com.ydl.confide.api.ConfideRoute
import com.ydl.confide.databinding.ItemExpertIntroBinding import com.ydl.confide.databinding.ItemExpertIntroBinding
...@@ -35,6 +38,8 @@ import io.reactivex.disposables.Disposable ...@@ -35,6 +38,8 @@ import io.reactivex.disposables.Disposable
import io.reactivex.schedulers.Schedulers import io.reactivex.schedulers.Schedulers
import kotlinx.android.synthetic.main.confide_home_activity.* import kotlinx.android.synthetic.main.confide_home_activity.*
import tv.danmaku.ijk.media.player.IjkMediaPlayer import tv.danmaku.ijk.media.player.IjkMediaPlayer
import java.io.UnsupportedEncodingException
import java.net.URLDecoder
import java.net.URLEncoder import java.net.URLEncoder
import java.util.concurrent.TimeUnit import java.util.concurrent.TimeUnit
...@@ -77,6 +82,40 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) : ...@@ -77,6 +82,40 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) :
) )
val status = item.lineStatus.get() val status = item.lineStatus.get()
when (status) { when (status) {
5 -> {
if (!TextUtils.isEmpty(item.linkedUrl.get())) {
val linkUri = Uri.parse(item.linkedUrl.get())
if (linkUri != null) {
val host = linkUri.host
if (!TextUtils.isEmpty(host) && host == "h5") {
//如果是h5,跳转至NewH5Activity
try {
var params = URLDecoder.decode(
linkUri.getQueryParameter("params"),
"UTF-8"
)
ARouter.getInstance().build("/new_h5/h5")
.withSerializable("routerParam", params).navigation()
} catch (e: NullPointerException) {
com.yidianling.common.tools.LogUtil.e("params参数为空")
} catch (e: UnsupportedEncodingException) {
com.yidianling.common.tools.LogUtil.e("解码错误")
} catch (e: UnsupportedOperationException) {
com.yidianling.common.tools.LogUtil.e("这不是一个uri格式的地址")
}
}
}
}
}
6 -> {
if (!item.uid.isNullOrBlank()) {
(itemView.context as? Activity)?.let { it1 ->
ARouter.getInstance().navigation(IImService::class.java)
?.startChatBySessionId(it1, item.uid!!)
}
}
}
2, 3 -> {//离线,通话中 2, 3 -> {//离线,通话中
(itemView.context as? Activity)?.let { aty -> (itemView.context as? Activity)?.let { aty ->
findRouteService(IImService::class.java).startChat(aty, item.uid!!, 0, 0) findRouteService(IImService::class.java).startChat(aty, item.uid!!, 0, 0)
...@@ -84,8 +123,14 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) : ...@@ -84,8 +123,14 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) :
} }
else -> { else -> {
if (!item.confideId.isNullOrBlank()) { if (!item.confideId.isNullOrBlank()) {
ConfideWebServiceImpl().connectionJava(item.confideId!!.toInt(), 3, it.context as Activity, null) { if (!YDLavManager.isOnlineRtm) {
showDoctorDetail(item, true) YDLavManager.instances.login(
PhoneCallIn.getUserService().getUserInfo()?.uid
) { _: Boolean, _ ->
showPayOrDetail(item, it)
}
} else {
showPayOrDetail(item, it)
} }
} }
} }
...@@ -131,7 +176,7 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) : ...@@ -131,7 +176,7 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) :
item.confideId ?: "", item.confideId ?: "",
"4" "4"
) )
showDoctorDetail(item,false) showDoctorDetail(item, false)
} }
binding.ivAvatar.setOnClickListener { binding.ivAvatar.setOnClickListener {
ActionCountUtils.record( ActionCountUtils.record(
...@@ -147,7 +192,7 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) : ...@@ -147,7 +192,7 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) :
item.confideId ?: "", item.confideId ?: "",
"3" "3"
) )
showDoctorDetail(item,false) showDoctorDetail(item, false)
} }
binding.vDisableClick.setOnClickListener { } binding.vDisableClick.setOnClickListener { }
binding.btnShare.setOnClickListener { binding.btnShare.setOnClickListener {
...@@ -226,12 +271,19 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) : ...@@ -226,12 +271,19 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) :
} }
val controller: DraweeController = Fresco.newDraweeControllerBuilder() val controller: DraweeController = Fresco.newDraweeControllerBuilder()
.setUri(Uri.parse("res://drawable/" + R.drawable.first_order)) .setUri(Uri.parse("res://drawable/" + R.drawable.confide_first_order))
.setOldController(binding.confideFirstFree.controller) .setOldController(binding.confideFirstFree.controller)
.setAutoPlayAnimations(true) // 是否自动播放Gif动画 .setAutoPlayAnimations(true) // 是否自动播放Gif动画
.build() .build()
binding.confideFirstFree.controller = controller binding.confideFirstFree.controller = controller
val freeController: DraweeController = Fresco.newDraweeControllerBuilder()
.setUri(Uri.parse("res://drawable/" + R.drawable.confide_free))
.setOldController(binding.free.controller)
.setAutoPlayAnimations(true) // 是否自动播放Gif动画
.build()
binding.free.controller = freeController
binding.seekbar.progress = 0 binding.seekbar.progress = 0
binding.seekbar.setOnSeekBarChangeListener(object : SeekBar.OnSeekBarChangeListener { binding.seekbar.setOnSeekBarChangeListener(object : SeekBar.OnSeekBarChangeListener {
override fun onProgressChanged(seekBar: SeekBar?, progress: Int, fromUser: Boolean) { override fun onProgressChanged(seekBar: SeekBar?, progress: Int, fromUser: Boolean) {
...@@ -263,6 +315,17 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) : ...@@ -263,6 +315,17 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) :
if (item.isVideo) View.GONE else if (item.playUrl.isNullOrBlank()) View.GONE else View.VISIBLE if (item.isVideo) View.GONE else if (item.playUrl.isNullOrBlank()) View.GONE else View.VISIBLE
} }
private fun showPayOrDetail(item: VideoViewModel, it: View) {
ConfideWebServiceImpl().connectionJava(
item.confideId!!.toInt(),
3,
it.context as Activity,
null
) {
showDoctorDetail(item, true)
}
}
fun onAttach(videoView: IjkVideoView) { fun onAttach(videoView: IjkVideoView) {
this.video = videoView this.video = videoView
binding.videoView.addView(videoView) binding.videoView.addView(videoView)
...@@ -322,15 +385,18 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) : ...@@ -322,15 +385,18 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) :
disposable?.dispose() disposable?.dispose()
} }
private fun showDoctorDetail(item: VideoViewModel,toPay:Boolean) { private fun showDoctorDetail(item: VideoViewModel, toPay: Boolean) {
item.confideId?.let { item.confideId?.let {
val url = HttpConfig.MH5_URL + ConfideRoute.h5ConfideIntro(it)+ if(toPay) "&payPage=1" else "" val url =
HttpConfig.MH5_URL + ConfideRoute.h5ConfideIntro(it) + if (toPay) "&payPage=1" else ""
ConfideBottomSheetDialogFragment() ConfideBottomSheetDialogFragment()
.showBottomSheetDialog( .showBottomSheetDialog(
itemView.context as FragmentActivity, itemView.context as FragmentActivity,
url, url,
item.doctorId!!, item.doctorId!!,
uid = item.uid uid = item.uid,
listenFree = item.listenFree.get(),
expertUrl = item.linkedUrl.get() ?: ""
) )
} }
} }
...@@ -352,6 +418,8 @@ class VideoViewModel { ...@@ -352,6 +418,8 @@ class VideoViewModel {
var uid: String? = null var uid: String? = null
var doctorId: String? = null var doctorId: String? = null
var confideId: String? = null var confideId: String? = null
var listenFree = ObservableBoolean(false)
var linkedUrl = ObservableField<String>("")
} }
private fun genMinProgramPath(url: String): String { private fun genMinProgramPath(url: String): String {
...@@ -363,6 +431,7 @@ private fun genMinProgramPath(url: String): String { ...@@ -363,6 +431,7 @@ private fun genMinProgramPath(url: String): String {
internal fun VideoViewModel.mapOf(bean: ConfideHomeBodyBean): VideoViewModel { internal fun VideoViewModel.mapOf(bean: ConfideHomeBodyBean): VideoViewModel {
name.set(bean.confidedName) name.set(bean.confidedName)
avatar.set(bean.confidedIcon) avatar.set(bean.confidedIcon)
linkedUrl.set(bean.linkUrl)
val num = bean.confideNum?.replace("人", "") ?: "0" val num = bean.confideNum?.replace("人", "") ?: "0"
count.set("倾诉人次 $num") count.set("倾诉人次 $num")
intro.set(bean.confideContent) intro.set(bean.confideContent)
...@@ -385,6 +454,11 @@ internal fun VideoViewModel.mapOf(bean: ConfideHomeBodyBean): VideoViewModel { ...@@ -385,6 +454,11 @@ internal fun VideoViewModel.mapOf(bean: ConfideHomeBodyBean): VideoViewModel {
uid = bean.uid?.toString() uid = bean.uid?.toString()
doctorId = bean.doctorId doctorId = bean.doctorId
confideId = bean.confidedId confideId = bean.confidedId
if (bean.listenFree == null) {
listenFree.set(false)
} else {
listenFree.set(bean.listenFree!!)
}
return this return this
} }
......
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="40dp"/>
<solid android:color="#F7F7F7" />
<stroke android:width="1px" android:color="#E6E6E6"/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="29dp"
android:height="29dp"
android:viewportWidth="29"
android:viewportHeight="29">
<path
android:pathData="M14.5,14.5m-14.5,0a14.5,14.5 0,1 1,29 0a14.5,14.5 0,1 1,-29 0"
android:strokeWidth="1"
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:strokeColor="#00000000"/>
<path
android:pathData="M20.2426,8.6932C18.9653,7.6331 17.3222,7.1176 15.6208,7.2388C15.3959,7.258 15.2304,7.4463 15.2496,7.6712C15.2559,7.7747 15.3054,7.8742 15.3831,7.951C15.4616,8.0192 15.5692,8.0562 15.6727,8.05C17.1662,7.9498 18.6111,8.3931 19.7304,9.3251C20.8506,10.2486 21.5134,11.5269 21.6149,12.9262C21.6283,13.1248 21.7836,13.2783 21.9786,13.2988C22.0041,13.3015 22.021,13.3032 22.0474,13.2974C22.2722,13.2782 22.4378,13.0899 22.4185,12.865C22.3072,11.2332 21.5368,9.755 20.2426,8.6932Z"
android:strokeWidth="1"
android:fillColor="#5ECEA9"
android:fillType="nonZero"
android:strokeColor="#00000000"/>
<path
android:pathData="M15.6922,10.0665C16.5646,10.0038 17.4031,10.2634 18.0577,10.8037C18.7048,11.3346 19.0896,12.0779 19.15,12.89C19.1634,13.0886 19.3187,13.2421 19.5137,13.2626C19.5391,13.2652 19.5561,13.267 19.5824,13.2612C19.8073,13.242 19.9728,13.0537 19.9536,12.8288C19.8825,11.7927 19.3902,10.8494 18.569,10.1802C17.7563,9.5119 16.7112,9.1792 15.6403,9.2552C15.4154,9.2745 15.2499,9.4628 15.2691,9.6877C15.2799,9.9117 15.4673,10.0857 15.6922,10.0665Z"
android:strokeWidth="1"
android:fillColor="#5ECEA9"
android:fillType="nonZero"
android:strokeColor="#00000000"/>
<path
android:pathData="M15.1838,11.9674C15.2624,12.0357 15.3699,12.0727 15.4734,12.0664C15.9138,12.0356 16.3373,12.1658 16.6685,12.4406C16.992,12.7061 17.1844,13.0778 17.2103,13.4834C17.2238,13.6819 17.3791,13.8354 17.5656,13.855C17.591,13.8577 17.6165,13.8604 17.6343,13.8537C17.8592,13.8344 18.0247,13.6461 18.0055,13.4212C17.9603,12.7907 17.6604,12.2192 17.1628,11.8154C16.6737,11.4125 16.0436,11.2092 15.3952,11.261C15.1703,11.2803 15.0048,11.4686 15.024,11.6935C15.0557,11.7997 15.1053,11.8992 15.1838,11.9674Z"
android:strokeWidth="1"
android:fillColor="#5ECEA9"
android:fillType="nonZero"
android:strokeColor="#00000000"/>
<path
android:pathData="M19.0824,17.506C18.6476,17.1991 18.1958,16.9178 17.7951,16.7132C17.1472,16.3722 16.8573,16.3295 16.7039,16.3295C16.3714,16.3295 16.0816,16.5 15.8514,16.841C15.7065,17.0542 15.5956,17.3014 15.4933,17.5401C15.4422,17.6509 15.3569,17.864 15.2887,17.9749C15.1609,17.9322 14.854,17.8044 14.3084,17.4293C13.7713,17.0627 13.1831,16.5853 12.7398,16.1505C12.305,15.7072 11.8276,15.119 11.461,14.5734C11.0859,14.0193 10.958,13.7209 10.9154,13.593C11.0262,13.5248 11.2308,13.4395 11.3587,13.3799C11.5974,13.2776 11.8446,13.1667 12.0492,13.0218C12.3817,12.7916 12.5522,12.5018 12.5522,12.1693C12.5522,12.0073 12.5096,11.726 12.1686,11.0696C11.964,10.6774 11.6826,10.2171 11.3757,9.7823C11.1456,9.4584 10.8046,8.9895 10.438,8.6144C10.0117,8.1711 9.6878,7.975 9.3724,7.975C8.6477,7.975 7.8549,8.9383 7.5395,9.3475C7.2411,9.7653 6.525,10.8224 6.525,11.8283C6.525,12.7661 7.1388,13.9681 7.6588,14.8121C8.3494,15.9289 9.2956,17.1394 10.3357,18.205L10.6767,18.546C11.7423,19.5861 12.9444,20.5409 14.0611,21.2314C14.9051,21.7515 16.0986,22.3653 17.0364,22.3653C18.0423,22.3653 19.0994,21.6492 19.5086,21.3423C19.9178,21.0354 20.8812,20.234 20.8812,19.5094C20.8812,19.1939 20.6851,18.8615 20.2418,18.4352C19.8752,18.0857 19.4063,17.7362 19.0824,17.506Z"
android:strokeWidth="1"
android:fillColor="#5ECEA9"
android:fillType="nonZero"
android:strokeColor="#00000000"/>
<path
android:pathData="M10.3186,12.7405C10.0032,12.9536 9.8498,13.2094 9.8583,13.5163C9.8583,13.6527 9.8753,14.0704 10.6085,15.1531C11.0092,15.7413 11.5292,16.3892 12.0151,16.8837C12.5011,17.3525 13.1404,17.8811 13.7287,18.2818C14.8113,19.0234 15.2291,19.032 15.3825,19.032C15.6809,19.032 15.9366,18.87 16.1412,18.5631C16.2606,18.3841 16.3629,18.1539 16.4481,17.9408C16.5163,17.7788 16.5931,17.6083 16.6613,17.4889C16.6954,17.4293 16.7209,17.3952 16.738,17.3781C16.8147,17.3952 16.9852,17.4548 17.3092,17.6253C17.6416,17.8044 18.0423,18.0431 18.4174,18.3073C19.3552,18.9552 19.7473,19.3986 19.8411,19.5435C19.8155,19.5946 19.7559,19.7055 19.6109,19.876C19.4234,20.0976 19.1506,20.3363 18.8607,20.558C18.1958,21.0524 17.5138,21.3423 17.0449,21.3423C16.5078,21.3423 15.6212,20.9842 14.6153,20.3619C13.5667,19.714 12.4243,18.8103 11.4098,17.8214L11.0859,17.4889C10.097,16.4745 9.1933,15.3321 8.5454,14.275C7.9231,13.2605 7.5651,12.3739 7.5651,11.8368C7.5651,11.3594 7.8549,10.686 8.3494,10.0125C8.5625,9.7141 8.8097,9.4498 9.0228,9.2623C9.1933,9.1174 9.3042,9.0492 9.3553,9.0321C9.5002,9.1259 9.9435,9.518 10.5914,10.4558C10.8557,10.8394 11.0944,11.2401 11.2734,11.5726C11.4439,11.8965 11.5036,12.067 11.5207,12.1437C11.5036,12.1608 11.4695,12.1864 11.4098,12.2205C11.282,12.2972 11.1115,12.3739 10.941,12.4421C10.7193,12.5274 10.5062,12.6211 10.3186,12.7405Z"
android:strokeWidth="1"
android:fillColor="#5ECEA9"
android:fillType="nonZero"
android:strokeColor="#00000000"/>
</vector>
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
android:shape="rectangle"> android:shape="rectangle">
<corners <corners
android:radius="8dp"/> android:radius="26dp"/>
<solid android:color="#ffffff"/> <solid android:color="#61CEAC"/>
</shape> </shape>
\ No newline at end of file
...@@ -2,10 +2,12 @@ ...@@ -2,10 +2,12 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android" <shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle"> android:shape="rectangle">
<gradient <!-- <gradient-->
android:startColor="@color/confide_61CEAC" <!-- android:startColor="@color/confide_61CEAC"-->
android:endColor="@color/confide_48CC95"/> <!-- android:endColor="@color/confide_48CC95"/>-->
<corners android:radius="8dp" /> <solid android:color="@color/white"/>
<corners android:radius="15dp" />
</shape> </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">
<size android:width="1dp" />
<span style="font-family: Arial, Helvetica, sans-serif;"/>
<solid android:color="@color/platform_main_theme" />
</shape>
\ No newline at end of file
...@@ -6,5 +6,5 @@ ...@@ -6,5 +6,5 @@
android:startColor="#61CEAC" /> android:startColor="#61CEAC" />
<stroke <stroke
android:width="1dp" android:width="1dp"
android:color="#69FFFFFF" /> android:color="#48CC95" />
</shape> </shape>
\ No newline at end of file
...@@ -6,5 +6,5 @@ ...@@ -6,5 +6,5 @@
android:startColor="#D5D6D7" /> android:startColor="#D5D6D7" />
<stroke <stroke
android:width="1dp" android:width="1dp"
android:color="#69FFFFFF" /> android:color="#BBC1CD" />
</shape> </shape>
\ No newline at end of file
...@@ -6,5 +6,5 @@ ...@@ -6,5 +6,5 @@
android:startColor="#F6B37F" /> android:startColor="#F6B37F" />
<stroke <stroke
android:width="1dp" android:width="1dp"
android:color="#69FFFFFF" /> android:color="#FF994B" />
</shape> </shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="26dp" />
<gradient
android:endColor="#FE745B"
android:startColor="#FF8772" />
<stroke
android:width="1dp"
android:color="#FE745B" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="7dp"
android:height="8dp"
android:viewportWidth="7"
android:viewportHeight="8">
<path
android:pathData="M0,0h7v7h-7z"
android:strokeAlpha="0"
android:strokeWidth="1"
android:fillColor="#54B6F3"
android:fillType="nonZero"
android:strokeColor="#00000000"
android:fillAlpha="0"/>
<path
android:pathData="M2.7,7.41143l-0.55918,-0.50312l2.42266,-2.69199l-2.56348,-2.69814l0.54551,-0.51816l3.04199,3.20264z"
android:strokeWidth="1"
android:fillColor="#55B7F3"
android:fillType="nonZero"
android:strokeColor="#00000000"/>
</vector>
...@@ -83,12 +83,24 @@ ...@@ -83,12 +83,24 @@
app:layout_constraintCircleRadius="70dp" />--> app:layout_constraintCircleRadius="70dp" />-->
<com.facebook.drawee.view.SimpleDraweeView <com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/free"
android:layout_width="@dimen/platform_dp_48"
android:layout_height="@dimen/platform_dp_24"
app:layout_constraintCircle="@+id/layoutCall"
app:layout_constraintCircleAngle="70"
app:layout_constraintCircleRadius="70dp"
android:visibility="gone"
tools:ignore="MissingConstraints" />
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/first_order" android:id="@+id/first_order"
android:layout_width="@dimen/platform_dp_64" android:layout_width="@dimen/platform_dp_48"
android:layout_height="@dimen/platform_dp_34" android:layout_height="@dimen/platform_dp_24"
app:layout_constraintCircle="@+id/layoutCall" app:layout_constraintCircle="@+id/layoutCall"
app:layout_constraintCircleAngle="70" app:layout_constraintCircleAngle="70"
app:layout_constraintCircleRadius="70dp"/> app:layout_constraintCircleRadius="70dp"
android:visibility="gone"
tools:ignore="MissingConstraints" />
<LinearLayout <LinearLayout
......
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:background="@color/white"
android:layout_height="wrap_content">
<LinearLayout
android:id="@+id/empty_rl"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:gravity="center_horizontal"
android:layout_marginTop="100dp"
android:orientation="vertical"
>
<ImageView
android:id="@+id/empty_img"
android:layout_width="180dp"
android:layout_height="120dp"
android:src="@drawable/platform_ico_img_zixun_empty" />
<TextView
android:id="@+id/hint_msg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/platform_dp_35"
android:text="没有搜到相关信息,换个关键词看看吧"
android:textColor="@color/platform_color_999999"
android:textSize="14dp" />
</LinearLayout>
</RelativeLayout>
\ No newline at end of file
...@@ -16,12 +16,13 @@ ...@@ -16,12 +16,13 @@
<com.jcodecraeer.xrecyclerview.XRecyclerView <com.jcodecraeer.xrecyclerview.XRecyclerView
android:id="@+id/rv_list" android:id="@+id/rv_list"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" /> android:layout_height="match_parent"
/>
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/quick_consult_card" android:id="@+id/quick_consult_card"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="52dp"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:layout_marginLeft="15dp" android:layout_marginLeft="15dp"
android:layout_marginRight="15dp" android:layout_marginRight="15dp"
...@@ -33,14 +34,14 @@ ...@@ -33,14 +34,14 @@
android:elevation="2dp" android:elevation="2dp"
android:paddingBottom="1dp" android:paddingBottom="1dp"
android:paddingRight="@dimen/platform_dp_8" android:paddingRight="@dimen/platform_dp_8"
android:visibility="gone" android:visibility="visible">
tools:visibility="visible">
<ImageView <ImageView
android:id="@+id/confide_logo" android:id="@+id/confide_logo"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/confide_call_logo" android:layout_marginStart="8dp"
android:src="@drawable/confide_call_logo"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
...@@ -57,8 +58,9 @@ ...@@ -57,8 +58,9 @@
android:gravity="center_vertical" android:gravity="center_vertical"
android:maxLines="1" android:maxLines="1"
android:text="智能推荐,一键倾诉" android:text="智能推荐,一键倾诉"
android:textColor="@color/platform_color_333333" android:textColor="@color/white"
android:textSize="14dp" android:textSize="14dp"
android:textStyle="bold"
android:layout_marginStart="@dimen/platform_dp_8" android:layout_marginStart="@dimen/platform_dp_8"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@id/confide_logo" app:layout_constraintStart_toEndOf="@id/confide_logo"
...@@ -85,9 +87,10 @@ ...@@ -85,9 +87,10 @@
android:paddingRight="@dimen/platform_dp_7" android:paddingRight="@dimen/platform_dp_7"
android:text="我要倾诉" android:text="我要倾诉"
android:layout_marginTop="@dimen/platform_dp_12" android:layout_marginTop="@dimen/platform_dp_12"
android:textColor="@color/white" android:textColor="#55CDA0"
android:textSize="13sp" android:textSize="13sp"
android:drawableRight="@drawable/confide_right_arrow" /> android:textStyle="bold"
app:drawableRightCompat="@drawable/confide_right_arrow" />
<ImageView <ImageView
android:id="@+id/confideRed" android:id="@+id/confideRed"
...@@ -137,11 +140,75 @@ ...@@ -137,11 +140,75 @@
android:background="#80000000" android:background="#80000000"
android:visibility="gone" /> android:visibility="gone" />
<RelativeLayout
android:id="@+id/rl_search_head"
android:layout_width="match_parent"
android:layout_height="@dimen/platform_dp_48"
android:background="@color/white"
android:visibility="gone"
tools:visibility="gone">
<View
android:id="@+id/view_search_input_bg"
android:layout_width="match_parent"
android:layout_height="32dp"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/confide_dp_15"
android:layout_marginRight="@dimen/confide_dp_15"
android:background="@drawable/confide_bg_hot_search_input"
android:tag="tag_search_input_bg" />
<ImageView
android:id="@+id/iv_search_icon"
android:layout_width="14dp"
android:layout_height="14dp"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/platform_dp_25"
android:layout_marginRight="10dp"
android:scaleType="centerCrop"
android:src="@drawable/confide_icon_input_search"
android:tag="tag_search_input_img" />
<TextView
android:id="@+id/etSearch"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginRight="20dp"
android:layout_toLeftOf="@+id/iv_delete_icon"
android:layout_toRightOf="@id/iv_search_icon"
android:background="@null"
android:cursorVisible="true"
android:hint="请输入倾诉师姓名"
android:imeOptions="actionSearch"
android:maxLength="100"
android:singleLine="true"
android:tag="tag_search_input_edit"
android:textColor="#242424"
android:textColorHint="#b3b3b3"
android:textCursorDrawable="@drawable/confide_edit_cursor_drawable"
android:textSize="13sp" />
<ImageView
android:id="@+id/iv_delete_icon"
android:layout_width="14dp"
android:layout_height="14dp"
android:layout_alignRight="@+id/view_search_input_bg"
android:layout_centerVertical="true"
android:layout_marginRight="12dp"
android:scaleType="centerCrop"
android:src="@drawable/platform_delete"
android:visibility="invisible" />
</RelativeLayout>
<com.ydl.confide.home.widget.ConfideHomeFilterView <com.ydl.confide.home.widget.ConfideHomeFilterView
android:id="@+id/v_filterView" android:id="@+id/v_filterView"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="48dp" android:layout_height="48dp"
android:background="@color/white" android:background="@color/white"
android:layout_below="@+id/rl_search_head"
android:visibility="gone" android:visibility="gone"
tools:visibility="gone"/> tools:visibility="gone"/>
......
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/rl_search"
android:layout_width="match_parent"
android:layout_height="@dimen/platform_dp_48"
android:descendantFocusability="blocksDescendants"
>
<View
android:id="@+id/view_search_input_bg"
android:layout_width="match_parent"
android:layout_height="32dp"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/confide_dp_15"
android:layout_marginRight="@dimen/confide_dp_15"
android:background="@drawable/confide_bg_hot_search_input"
android:tag="tag_search_input_bg" />
<ImageView
android:id="@+id/iv_search_icon"
android:layout_width="14dp"
android:layout_height="14dp"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/platform_dp_25"
android:layout_marginRight="10dp"
android:scaleType="centerCrop"
android:src="@drawable/confide_icon_input_search"
android:tag="tag_search_input_img" />
<TextView
android:id="@+id/etSearch"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginRight="20dp"
android:layout_toLeftOf="@+id/iv_delete_icon"
android:layout_toRightOf="@id/iv_search_icon"
android:background="@null"
android:cursorVisible="true"
android:hint="请输入倾诉师姓名"
android:imeOptions="actionSearch"
android:maxLength="100"
android:singleLine="true"
android:tag="tag_search_input_edit"
android:textColor="#242424"
android:textColorHint="#b3b3b3"
android:textCursorDrawable="@drawable/confide_edit_cursor_drawable"
android:textSize="13sp" />
<ImageView
android:id="@+id/iv_delete_icon"
android:layout_width="14dp"
android:layout_height="14dp"
android:layout_alignRight="@+id/view_search_input_bg"
android:layout_centerVertical="true"
android:layout_marginRight="12dp"
android:scaleType="centerCrop"
android:src="@drawable/platform_delete"
android:visibility="invisible" />
</RelativeLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/rl_search"
android:layout_width="match_parent"
android:layout_height="@dimen/platform_dp_48"
android:paddingStart="15dp"
android:tag="tag_search_input"
>
<View
android:id="@+id/view_search_input_bg"
android:layout_width="match_parent"
android:layout_height="32dp"
android:layout_centerVertical="true"
android:layout_marginRight="60dp"
android:background="@drawable/confide_bg_hot_search_input"
android:tag="tag_search_input_bg" />
<ImageView
android:id="@+id/iv_search_icon"
android:layout_width="14dp"
android:layout_height="14dp"
android:layout_centerVertical="true"
android:layout_marginLeft="15dp"
android:layout_marginRight="10dp"
android:scaleType="centerCrop"
android:src="@drawable/confide_icon_input_search"
android:tag="tag_search_input_img" />
<EditText
android:id="@+id/etSearch"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginRight="20dp"
android:layout_toLeftOf="@+id/iv_delete_icon"
android:layout_toRightOf="@id/iv_search_icon"
android:background="@null"
android:cursorVisible="true"
android:focusable="true"
android:focusableInTouchMode="true"
android:hint="请输入倾诉师姓名"
android:imeOptions="actionSearch"
android:maxLength="100"
android:singleLine="true"
android:tag="tag_search_input_edit"
android:textColor="#242424"
android:textColorHint="#b3b3b3"
android:textCursorDrawable="@drawable/confide_edit_cursor_drawable"
android:textSize="13sp" />
<ImageView
android:id="@+id/iv_delete_icon"
android:layout_width="14dp"
android:layout_height="14dp"
android:layout_alignRight="@+id/view_search_input_bg"
android:layout_centerVertical="true"
android:layout_marginRight="12dp"
android:scaleType="centerCrop"
android:src="@drawable/platform_delete"
android:visibility="invisible" />
<TextView
android:id="@+id/tv_search_cancle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="10dp"
android:padding="5dp"
android:text="取消"
android:textColor="#242424"
android:textSize="15dp" />
</RelativeLayout>
<View
android:id="@+id/v_topLine"
android:layout_width="match_parent"
android:layout_height="0.5dp"
android:layout_below="@+id/rl_search"
android:layout_marginTop="@dimen/platform_dp_6"
android:background="@color/platform_color_E0E0E0"
/>
</LinearLayout>
\ No newline at end of file
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
android:layout_width="160dp" android:layout_width="160dp"
android:layout_height="47dp" android:layout_height="47dp"
android:layout_marginBottom="28dp" android:layout_marginBottom="28dp"
android:background="@{item.lineStatus==3?@drawable/confide_line_bg_3:(item.lineStatus==2?@drawable/confide_line_bg_2:@drawable/confide_line_bg_1)}" android:background="@{(item.lineStatus == 5 || item.lineStatus == 6) ? @drawable/confide_offline_book_bg : item.lineStatus==3?@drawable/confide_line_bg_3:(item.lineStatus==2?@drawable/confide_line_bg_2:@drawable/confide_line_bg_1)}"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent" app:layout_constraintRight_toRightOf="parent"
...@@ -166,13 +166,24 @@ ...@@ -166,13 +166,24 @@
app:layout_constraintCircleRadius="70dp" />--> app:layout_constraintCircleRadius="70dp" />-->
<com.facebook.drawee.view.SimpleDraweeView <com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/free"
android:layout_width="@dimen/platform_dp_48"
android:layout_height="@dimen/platform_dp_24"
android:visibility="@{item.listenFree?View.VISIBLE:View.GONE}"
app:layout_constraintCircle="@+id/layoutCall"
app:layout_constraintCircleAngle="70"
app:layout_constraintCircleRadius="70dp"
tools:ignore="MissingConstraints" />
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/confide_first_free" android:id="@+id/confide_first_free"
android:layout_width="@dimen/platform_dp_64" android:layout_width="@dimen/platform_dp_48"
android:layout_height="@dimen/platform_dp_34" android:layout_height="@dimen/platform_dp_24"
android:visibility="@{item.showFreeTag?View.VISIBLE:View.GONE}" android:visibility="@{item.showFreeTag?View.VISIBLE:View.GONE}"
app:layout_constraintCircle="@+id/layoutCall" app:layout_constraintCircle="@+id/layoutCall"
app:layout_constraintCircleAngle="70" app:layout_constraintCircleAngle="70"
app:layout_constraintCircleRadius="70dp" /> app:layout_constraintCircleRadius="70dp"
tools:ignore="MissingConstraints" />
<TextView <TextView
android:id="@+id/tvTag" android:id="@+id/tvTag"
......
...@@ -27,6 +27,7 @@ import com.ydl.ydl_image.config.SimpleImageOpConfiger ...@@ -27,6 +27,7 @@ import com.ydl.ydl_image.config.SimpleImageOpConfiger
import com.ydl.ydl_image.listener.YDLImageRecyclerOnScrollListener import com.ydl.ydl_image.listener.YDLImageRecyclerOnScrollListener
import com.ydl.ydl_image.manager.YDLImageCacheManager import com.ydl.ydl_image.manager.YDLImageCacheManager
import com.ydl.ydlcommon.base.BaseMvpFragment import com.ydl.ydlcommon.base.BaseMvpFragment
import com.ydl.ydlcommon.base.config.ChannelConfig
import com.ydl.ydlcommon.base.config.HttpConfig import com.ydl.ydlcommon.base.config.HttpConfig
import com.ydl.ydlcommon.data.PlatformDataManager import com.ydl.ydlcommon.data.PlatformDataManager
import com.ydl.ydlcommon.ui.LogoLoadingView import com.ydl.ydlcommon.ui.LogoLoadingView
...@@ -90,8 +91,9 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres ...@@ -90,8 +91,9 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
val ffrom = PlatformDataManager.getRam().getChannelName() val ffrom = PlatformDataManager.getRam().getChannelName()
if (!TextUtils.isEmpty(ffrom) && if (!TextUtils.isEmpty(ffrom) &&
(ffrom.startsWith("ATK_android_yyjlcs")) (ffrom.endsWith(ChannelConfig.Xinliceshiyiyu.name))
) { ) {
//抑郁焦虑测试
rl_hot_fix_for_huawei.visibility = View.GONE rl_hot_fix_for_huawei.visibility = View.GONE
} else { } else {
rl_hot_fix_for_huawei.visibility = View.VISIBLE rl_hot_fix_for_huawei.visibility = View.VISIBLE
......
...@@ -61,7 +61,7 @@ class ExpertSearchPresenter : SimplePresenter<IExpertSearchView>() { ...@@ -61,7 +61,7 @@ class ExpertSearchPresenter : SimplePresenter<IExpertSearchView>() {
if (allFilter.categoryId2List.size>0){ if (allFilter.categoryId2List.size>0){
val categoryMap2 = HashMap<String, Any>() val categoryMap2 = HashMap<String, Any>()
val categoryIdMap2 = HashMap<String, Any>() val categoryIdMap2 = HashMap<String, Any>()
categoryIdMap2["in"] = allFilter.categoryId2List categoryIdMap2["in"] = allFilter.categoryId2List.toSortedSet().toList()
categoryMap2["product_cates.category_id2"] = categoryIdMap2 categoryMap2["product_cates.category_id2"] = categoryIdMap2
categoryList.add(categoryMap2) categoryList.add(categoryMap2)
} }
...@@ -69,7 +69,7 @@ class ExpertSearchPresenter : SimplePresenter<IExpertSearchView>() { ...@@ -69,7 +69,7 @@ class ExpertSearchPresenter : SimplePresenter<IExpertSearchView>() {
if (allFilter.categoryId3List.size>0){ if (allFilter.categoryId3List.size>0){
val categoryMap3 = HashMap<String, Any>() val categoryMap3 = HashMap<String, Any>()
val categoryIdMap3 = HashMap<String, Any>() val categoryIdMap3 = HashMap<String, Any>()
categoryIdMap3["in"] = allFilter.categoryId3List categoryIdMap3["in"] = allFilter.categoryId3List.toSortedSet().toList()
categoryMap3["product_cates.category_id3"] = categoryIdMap3 categoryMap3["product_cates.category_id3"] = categoryIdMap3
categoryList.add(categoryMap3) categoryList.add(categoryMap3)
} }
...@@ -105,7 +105,7 @@ class ExpertSearchPresenter : SimplePresenter<IExpertSearchView>() { ...@@ -105,7 +105,7 @@ class ExpertSearchPresenter : SimplePresenter<IExpertSearchView>() {
} }
val wayMap = HashMap<String, Any>() val wayMap = HashMap<String, Any>()
wayMap["in"] = way wayMap["in"] = way
filterMap["service_type_list.service_type"] = wayMap filterMap["product_specs.spec_id"] = wayMap
} }
// 服务均价 // 服务均价
if (allFilter.priceRanges != null) { if (allFilter.priceRanges != null) {
...@@ -187,9 +187,6 @@ class ExpertSearchPresenter : SimplePresenter<IExpertSearchView>() { ...@@ -187,9 +187,6 @@ class ExpertSearchPresenter : SimplePresenter<IExpertSearchView>() {
fieldsMap["doctor_name"] = true fieldsMap["doctor_name"] = true
fieldsMap["uid"] = true fieldsMap["uid"] = true
fieldsMap["chat_status"] = true fieldsMap["chat_status"] = true
// fieldsMap["consult_status"] = true
// fieldsMap["listen_status"] = true
// fieldsMap["booking_status"] = true
fieldsMap["gender"] = true fieldsMap["gender"] = true
fieldsMap["years"] = true fieldsMap["years"] = true
fieldsMap["head"] = true fieldsMap["head"] = true
......
...@@ -37,7 +37,11 @@ import kotlin.math.roundToInt ...@@ -37,7 +37,11 @@ import kotlin.math.roundToInt
* 筛选弹窗 * 筛选弹窗
* Created by zqk on 17-9-15. * Created by zqk on 17-9-15.
*/ */
class FilterPopupWindow(private val context: Context, private val filterData: Filters, private val tempFilter: AllFilter) : PopupWindow(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT) { class FilterPopupWindow(
private val context: Context,
private val filterData: Filters,
private val tempFilter: AllFilter
) : PopupWindow(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT) {
private val mDisposableList = CompositeDisposable() private val mDisposableList = CompositeDisposable()
...@@ -139,7 +143,6 @@ class FilterPopupWindow(private val context: Context, private val filterData: Fi ...@@ -139,7 +143,6 @@ class FilterPopupWindow(private val context: Context, private val filterData: Fi
tempFilter.showType = filterData.showType[0] tempFilter.showType = filterData.showType[0]
tempFilter.ages.clear() tempFilter.ages.clear()
tempFilter.doctorEdu.clear() tempFilter.doctorEdu.clear()
tempFilter.enquiries.clear()
// 擅长人群 // 擅长人群
tempFilter.specialityCrowd.clear() tempFilter.specialityCrowd.clear()
tempFilter.others.clear() tempFilter.others.clear()
...@@ -158,17 +161,26 @@ class FilterPopupWindow(private val context: Context, private val filterData: Fi ...@@ -158,17 +161,26 @@ class FilterPopupWindow(private val context: Context, private val filterData: Fi
showTypeViews[1].isSelected = true showTypeViews[1].isSelected = true
for (v in enquiryViews) { for (v in enquiryViews) {
v.isSelected = false v.isSelected = false
if (v is TextView) { val textView: TextView = v.findViewById(R.id.tvFilterName)
v.paint.isFakeBoldText = false val ivIcon: ImageView = v.findViewById(R.id.iv_consultant_method)
textView.paint.isFakeBoldText = false
tempFilter.enquiries.forEach {
if (textView.text.toString() == it.value) {
Glide.with(context)
.load(it.unCheckUrl)
.into(ivIcon)
}
} }
} }
tempFilter.enquiries.clear()
for (v in ageViews) { for (v in ageViews) {
v.isSelected = false v.isSelected = false
if (v is TextView) { if (v is TextView) {
v.paint.isFakeBoldText = false v.paint.isFakeBoldText = false
} }
} }
for (v in goodAtViews){ for (v in goodAtViews) {
v.isSelected = false v.isSelected = false
v.paint.isFakeBoldText = false v.paint.isFakeBoldText = false
} }
...@@ -325,6 +337,7 @@ class FilterPopupWindow(private val context: Context, private val filterData: Fi ...@@ -325,6 +337,7 @@ class FilterPopupWindow(private val context: Context, private val filterData: Fi
fun addSubscription(disposable: Disposable) { fun addSubscription(disposable: Disposable) {
mDisposableList.add(disposable) mDisposableList.add(disposable)
} }
/** /**
* 其他选择 * 其他选择
* */ * */
...@@ -413,13 +426,13 @@ class FilterPopupWindow(private val context: Context, private val filterData: Fi ...@@ -413,13 +426,13 @@ class FilterPopupWindow(private val context: Context, private val filterData: Fi
if (text == "展开") { if (text == "展开") {
view.tv_crowd_open.text = "收起" view.tv_crowd_open.text = "收起"
view.iv_crowd_open.setImageResource(R.drawable.ic_crowd_close) view.iv_crowd_open.setImageResource(R.drawable.ic_crowd_close)
for (i in 20 until goodAtViews.size){ for (i in 20 until goodAtViews.size) {
goodAtViews[i].visibility = View.VISIBLE goodAtViews[i].visibility = View.VISIBLE
} }
} else { } else {
view.tv_crowd_open.text = "展开" view.tv_crowd_open.text = "展开"
view.iv_crowd_open.setImageResource(R.drawable.ic_crowd_open) view.iv_crowd_open.setImageResource(R.drawable.ic_crowd_open)
for (i in 20 until goodAtViews.size){ for (i in 20 until goodAtViews.size) {
goodAtViews[i].visibility = View.GONE goodAtViews[i].visibility = View.GONE
} }
} }
...@@ -452,7 +465,7 @@ class FilterPopupWindow(private val context: Context, private val filterData: Fi ...@@ -452,7 +465,7 @@ class FilterPopupWindow(private val context: Context, private val filterData: Fi
} }
} }
if (index>19){ if (index > 19) {
textView.visibility = View.GONE textView.visibility = View.GONE
} }
goodAtViews.add(textView) goodAtViews.add(textView)
...@@ -460,6 +473,7 @@ class FilterPopupWindow(private val context: Context, private val filterData: Fi ...@@ -460,6 +473,7 @@ class FilterPopupWindow(private val context: Context, private val filterData: Fi
} }
} }
/** /**
* 年龄 * 年龄
* */ * */
...@@ -500,6 +514,7 @@ class FilterPopupWindow(private val context: Context, private val filterData: Fi ...@@ -500,6 +514,7 @@ class FilterPopupWindow(private val context: Context, private val filterData: Fi
view.flAge.addView(textView) view.flAge.addView(textView)
} }
} }
/** /**
* 学历 * 学历
* */ * */
...@@ -545,8 +560,8 @@ class FilterPopupWindow(private val context: Context, private val filterData: Fi ...@@ -545,8 +560,8 @@ class FilterPopupWindow(private val context: Context, private val filterData: Fi
val mWidth = (popWidth - RxImageTool.dp2px(52f)) / enquirySize val mWidth = (popWidth - RxImageTool.dp2px(52f)) / enquirySize
for ((index, enquiry) in filterData.enquiry.withIndex()) { for ((index, enquiry) in filterData.enquiry.withIndex()) {
val llLayout = View.inflate(context, R.layout.consultant_method_item_filter, null) val llLayout = View.inflate(context, R.layout.consultant_method_item_filter, null)
val textView:TextView = llLayout.findViewById(R.id.tvFilterName) val textView: TextView = llLayout.findViewById(R.id.tvFilterName)
val ivIcon:ImageView = llLayout.findViewById(R.id.iv_consultant_method) val ivIcon: ImageView = llLayout.findViewById(R.id.iv_consultant_method)
val params = FrameLayout.LayoutParams(mWidth, RxImageTool.dp2px(36f)) val params = FrameLayout.LayoutParams(mWidth, RxImageTool.dp2px(36f))
val marginNum = RxImageTool.dp2px(5f) val marginNum = RxImageTool.dp2px(5f)
params.setMargins( params.setMargins(
...@@ -561,7 +576,7 @@ class FilterPopupWindow(private val context: Context, private val filterData: Fi ...@@ -561,7 +576,7 @@ class FilterPopupWindow(private val context: Context, private val filterData: Fi
.load(enquiry.unCheckUrl) .load(enquiry.unCheckUrl)
.into(ivIcon) .into(ivIcon)
enquiryViews.add(view) enquiryViews.add(llLayout)
if (tempFilter.enquiries.contains(enquiry)) { if (tempFilter.enquiries.contains(enquiry)) {
llLayout.isSelected = true llLayout.isSelected = true
textView.paint.isFakeBoldText = true textView.paint.isFakeBoldText = true
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/rvRegion" android:id="@+id/rvRegion"
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/platform_white" android:background="@color/platform_white"
android:layout_weight="1" android:layout_weight="1"
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/rvSub" android:id="@+id/rvSub"
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/platform_color_F7F7F7" android:background="@color/platform_color_F7F7F7"
android:layout_weight="2" android:layout_weight="2"
......
...@@ -101,7 +101,7 @@ dependencies { ...@@ -101,7 +101,7 @@ dependencies {
implementation modularPublication('com.ydl:m-course-api') implementation modularPublication('com.ydl:m-course-api')
implementation modularPublication('com.ydl:m-fm-api') implementation modularPublication('com.ydl:m-fm-api')
implementation modularPublication('com.ydl:m-consultant-api') implementation modularPublication('com.ydl:m-consultant-api')
implementation modularPublication('com.ydl:m-confide-api') implementation project(':api:confide')
}else { }else {
//发布时使用 //发布时使用
api rootProject.ext.dependencies["ydl-pay"] api rootProject.ext.dependencies["ydl-pay"]
......
...@@ -137,7 +137,7 @@ public class MembersActivity extends BaseActivity implements View.OnClickListene ...@@ -137,7 +137,7 @@ public class MembersActivity extends BaseActivity implements View.OnClickListene
initListeners(); initListeners();
// initDatas(); // initDatas();
setTabSelection(0); setTabSelection(0);
StatusBarUtils.Companion.setCustomStatusView(this,members_title_rel,true); StatusBarUtils.Companion.setCustomStatusViewForMembers(this,members_title_rel,true);
} }
private void initEvent() { private void initEvent() {
......
...@@ -37,6 +37,7 @@ import com.yidianling.dynamic.trendList.adapter.RecommendTopicListAdapter ...@@ -37,6 +37,7 @@ import com.yidianling.dynamic.trendList.adapter.RecommendTopicListAdapter
import com.yidianling.dynamic.trendList.adapter.TrendsListAdapter import com.yidianling.dynamic.trendList.adapter.TrendsListAdapter
import com.yidianling.dynamic.trendList.adapter.TrendsListAdapter.FOOTER_STATE_NO_DATA import com.yidianling.dynamic.trendList.adapter.TrendsListAdapter.FOOTER_STATE_NO_DATA
import com.yidianling.dynamic.trendList.adapter.TrendsListAdapter.FOOTRE_STATE_LOAD_MORE import com.yidianling.dynamic.trendList.adapter.TrendsListAdapter.FOOTRE_STATE_LOAD_MORE
import com.yidianling.dynamic.trendList.adapter.TrendsListAdapter.FOOTRE_STATE_INIT
import com.yidianling.dynamic.trendsDetail.TrendsDetailActivity import com.yidianling.dynamic.trendsDetail.TrendsDetailActivity
import com.yidianling.dynamic.trendsHome.TrendsHomeFragment import com.yidianling.dynamic.trendsHome.TrendsHomeFragment
import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.android.schedulers.AndroidSchedulers
...@@ -428,17 +429,13 @@ class TrendsListFragment : BaseLazyFragment(), ITrendsListView, ...@@ -428,17 +429,13 @@ class TrendsListFragment : BaseLazyFragment(), ITrendsListView,
if (trend_list_no_datas_rel!!.visibility != View.GONE) { if (trend_list_no_datas_rel!!.visibility != View.GONE) {
trend_list_no_datas_rel!!.visibility = View.GONE trend_list_no_datas_rel!!.visibility = View.GONE
} }
if (cdl!!.visibility != View.VISIBLE) {
cdl!!.visibility = View.VISIBLE
}
} }
private fun showErrorView() { private fun showErrorView() {
if (page == 1) { if (page == 1) {
cdl!!.visibility = View.GONE
trend_list_no_datas_rel!!.visibility = View.VISIBLE trend_list_no_datas_rel!!.visibility = View.VISIBLE
} else { } else {
cdl!!.visibility = View.VISIBLE
trend_list_no_datas_rel!!.visibility = View.GONE trend_list_no_datas_rel!!.visibility = View.GONE
} }
} }
...@@ -590,8 +587,11 @@ class TrendsListFragment : BaseLazyFragment(), ITrendsListView, ...@@ -590,8 +587,11 @@ class TrendsListFragment : BaseLazyFragment(), ITrendsListView,
} else { } else {
LogUtil.i("get datas no more data$data") LogUtil.i("get datas no more data$data")
trendsDatas!!.addAll(data) trendsDatas!!.addAll(data)
if (trendsDatas == null || trendsDatas!!.size <= 0) { if (trendsDatas == null || trendsDatas!!.size == 0) {
cdl!!.visibility = View.GONE mRcvAdapter!!.setDatas(trendsDatas, FOOTRE_STATE_INIT)
if (page == 1) {
mRcvAdapter!!.notifyDataSetChanged()
}
trend_list_no_datas_rel!!.visibility = View.VISIBLE trend_list_no_datas_rel!!.visibility = View.VISIBLE
return return
} }
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<com.ydl.ydlcommon.view.widgets.MultiSwipeRefreshLayout <com.ydl.ydlcommon.view.widgets.MultiSwipeRefreshLayout 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"
android:id="@+id/trends_lastr_swl" android:id="@+id/trends_lastr_swl"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<LinearLayout <androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:orientation="vertical"
android:background="@color/dynamic_white"> android:background="@color/dynamic_white">
<androidx.coordinatorlayout.widget.CoordinatorLayout <androidx.recyclerview.widget.RecyclerView
android:id="@+id/cdl" android:id="@+id/trends_rcv"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent"
android:background="@color/dynamic_f5f5f5"
<androidx.recyclerview.widget.RecyclerView android:descendantFocusability="blocksDescendants"
android:id="@+id/trends_rcv" app:layout_behavior="@string/appbar_scrolling_view_behavior" />
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/dynamic_f5f5f5"
android:descendantFocusability="blocksDescendants"
app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/image_scroll_top"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="85dp"
android:layout_marginRight="28dp"
android:padding="0dp"
android:background="@color/dynamic_white"
android:src="@drawable/dynamic_newsfeed_top"
android:visibility="visible"
app:backgroundTint="@color/dynamic_white"
app:borderWidth="0dp"
app:fabSize="mini"
android:scaleType="center"
app:layout_anchor="@+id/trends_rcv"
app:layout_anchorGravity="bottom|right|end"
app:layout_behavior="com.yidianling.dynamic.common.behavior.ScrollAwareFABBehavior"/>
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/recommend_trend_add_iv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:layout_marginRight="20dp"
android:background="@color/platform_main_theme"
android:elevation="3dp"
android:padding="0dp"
android:src="@drawable/dynamic_newsfeed_new2"
app:backgroundTint="@color/platform_main_theme"
app:borderWidth="0dp"
app:fabSize="normal"
app:layout_anchor="@+id/trends_rcv"
app:layout_anchorGravity="bottom|right|end"/>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
<RelativeLayout <RelativeLayout
android:id="@+id/trend_list_no_datas_rel" android:id="@+id/trend_list_no_datas_rel"
...@@ -77,7 +31,7 @@ ...@@ -77,7 +31,7 @@
android:layout_width="100dp" android:layout_width="100dp"
android:layout_height="100dp" android:layout_height="100dp"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:src="@drawable/dynamic_blank"/> android:src="@drawable/dynamic_blank" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
...@@ -86,11 +40,44 @@ ...@@ -86,11 +40,44 @@
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:layout_marginTop="15dp" android:layout_marginTop="15dp"
android:text="暂无相关记录~" android:text="暂无相关记录~"
android:textColor="@color/dynamic_text_gray"/> android:textColor="@color/dynamic_text_gray" />
</RelativeLayout> </RelativeLayout>
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/image_scroll_top"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="28dp"
android:layout_marginBottom="85dp"
android:background="@color/dynamic_white"
android:padding="0dp"
android:scaleType="center"
android:src="@drawable/dynamic_newsfeed_top"
android:visibility="visible"
app:backgroundTint="@color/dynamic_white"
app:borderWidth="0dp"
app:fabSize="mini"
app:layout_anchor="@+id/trends_rcv"
app:layout_anchorGravity="bottom|right|end"
app:layout_behavior="com.yidianling.dynamic.common.behavior.ScrollAwareFABBehavior" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/recommend_trend_add_iv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="20dp"
android:layout_marginBottom="20dp"
android:background="@color/platform_main_theme"
android:elevation="3dp"
android:padding="0dp"
android:src="@drawable/dynamic_newsfeed_new2"
app:backgroundTint="@color/platform_main_theme"
app:borderWidth="0dp"
app:fabSize="normal"
app:layout_anchor="@+id/trends_rcv"
app:layout_anchorGravity="bottom|right|end" />
</LinearLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>
</com.ydl.ydlcommon.view.widgets.MultiSwipeRefreshLayout>
</com.ydl.ydlcommon.view.widgets.MultiSwipeRefreshLayout>
\ No newline at end of file
...@@ -82,7 +82,7 @@ dependencies { ...@@ -82,7 +82,7 @@ dependencies {
implementation modularPublication('com.ydl:m-tests-api') implementation modularPublication('com.ydl:m-tests-api')
implementation modularPublication('com.ydl:m-home-api') implementation modularPublication('com.ydl:m-home-api')
implementation modularPublication('com.ydl:m-im-api') implementation modularPublication('com.ydl:m-im-api')
implementation modularPublication('com.ydl:m-confide-api') implementation project(':api:confide')
implementation project(':ydl-webview') implementation project(':ydl-webview')
implementation project(':ydl-media') implementation project(':ydl-media')
implementation project(":ydl-platform") implementation project(":ydl-platform")
......
...@@ -38,6 +38,7 @@ class HomeConfideBean : HomeItemBaseBean { ...@@ -38,6 +38,7 @@ class HomeConfideBean : HomeItemBaseBean {
var confideLine: Int = 0 var confideLine: Int = 0
var confideAddress: String? = null var confideAddress: String? = null
var confidePraise: String? = null var confidePraise: String? = null
var confidePraiseScore: String? = null
/** /**
* 实际费用 * 实际费用
*/ */
...@@ -63,5 +64,7 @@ class HomeConfideBean : HomeItemBaseBean { ...@@ -63,5 +64,7 @@ class HomeConfideBean : HomeItemBaseBean {
* 红包展示文本 * 红包展示文本
*/ */
var couponText : String? = null var couponText : String? = null
var listenFree: Boolean? = null
} }
} }
...@@ -176,7 +176,13 @@ open class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterIm ...@@ -176,7 +176,13 @@ open class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterIm
if (!TextUtils.isEmpty(doctorName)) { if (!TextUtils.isEmpty(doctorName)) {
searchText = doctorName searchText = doctorName
} }
home_tv.setOnClickListener { homeEvent?.searchTvClick(searchText) } home_tv.setOnClickListener {
homeEvent?.searchTvClick(searchText)
}
iv_search_icon.setOnClickListener {
homeEvent?.searchTvClick(searchText)
}
home_tv.text = searchText home_tv.text = searchText
} }
......
...@@ -2,18 +2,19 @@ package com.yidianling.home.ui.view ...@@ -2,18 +2,19 @@ package com.yidianling.home.ui.view
import android.annotation.SuppressLint import android.annotation.SuppressLint
import android.content.Context import android.content.Context
import android.graphics.Paint
import android.text.TextUtils 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.FrameLayout
import com.ydl.ydl_image.config.SimpleImageOpConfiger import com.blankj.utilcode.util.SpanUtils
import com.ydl.ydl_image.manager.YDLImageCacheManager import com.bumptech.glide.Glide
import com.bumptech.glide.load.engine.DiskCacheStrategy
import com.ydl.ydl_image.module.GlideApp
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.event.IHomeBaseEvent import com.yidianling.home.event.IHomeBaseEvent
import com.yidianling.home.model.bean.HomeConfideBean import com.yidianling.home.model.bean.HomeConfideBean
import kotlinx.android.synthetic.ydl.home_confide_expert_info_view.view.* import kotlinx.android.synthetic.ydl.home_confide_item_layout.view.*
/** /**
* @author jiucheng * @author jiucheng
...@@ -34,7 +35,7 @@ class HomeConfideExpertInfoView(private var mContext: Context, private var homeE ...@@ -34,7 +35,7 @@ class HomeConfideExpertInfoView(private var mContext: Context, private var homeE
private fun initView() { private fun initView() {
var params = FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT) var params = FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)
layoutParams = params layoutParams = params
View.inflate(context, R.layout.home_confide_expert_info_view, this) View.inflate(context, R.layout.home_confide_item_layout, this)
} }
fun setData(bean: HomeConfideBean.BodyBean?, position: Int, isLast: Boolean) { fun setData(bean: HomeConfideBean.BodyBean?, position: Int, isLast: Boolean) {
...@@ -44,12 +45,21 @@ class HomeConfideExpertInfoView(private var mContext: Context, private var homeE ...@@ -44,12 +45,21 @@ class HomeConfideExpertInfoView(private var mContext: Context, private var homeE
} }
//设置头像 //设置头像
setHead(bean) setHead(bean)
setListenAndScore(bean)
setFreeStatus(bean)
setConfideTag(bean)
setLineStatus(bean)
//设置名称 //设置名称
tv_name.text = bean.confidedName tv_name.text = bean.confidedName
//设置倾诉标签View的最大宽度 //设置倾诉标签View的最大宽度
tag_view.setConfideWidth() // tag_view.setConfideWidth()
//咨询师标签 //咨询师标签
tag_view.initData(bean.confidedTag as MutableList<String>) // tag_view.initData(bean.confidedTag as MutableList<String>)
//设置向TA倾诉人数 //设置向TA倾诉人数
setConfideNum(bean) setConfideNum(bean)
//设置接通率文案 //设置接通率文案
...@@ -57,7 +67,11 @@ class HomeConfideExpertInfoView(private var mContext: Context, private var homeE ...@@ -57,7 +67,11 @@ class HomeConfideExpertInfoView(private var mContext: Context, private var homeE
//设置向TA倾诉按钮状态 //设置向TA倾诉按钮状态
setConfideButton(bean) setConfideButton(bean)
//设置红包、原价 //设置红包、原价
setCoupon(bean) // setCoupon(bean)
//设置咨询师简介
tv_content.text = bean.confideContent
//最后一项显示分割线 //最后一项显示分割线
if (isLast) { if (isLast) {
view_line.visibility = View.GONE view_line.visibility = View.GONE
...@@ -73,11 +87,22 @@ class HomeConfideExpertInfoView(private var mContext: Context, private var homeE ...@@ -73,11 +87,22 @@ class HomeConfideExpertInfoView(private var mContext: Context, private var homeE
* 设置头像 * 设置头像
*/ */
private fun setHead(bean: HomeConfideBean.BodyBean) { private fun setHead(bean: HomeConfideBean.BodyBean) {
val op = SimpleImageOpConfiger() // val op = SimpleImageOpConfiger()
op.errorPic = R.drawable.platform_head_place_hold_pic // op.errorPic = R.drawable.platform_head_place_hold_pic
op.loadingPic = R.drawable.platform_head_place_hold_pic // op.loadingPic = R.drawable.platform_head_place_hold_pic
op.transform = 0 // op.transform = 0
YDLImageCacheManager.showImage(mContext, bean.confidedIcon, img_head, op) // YDLImageCacheManager.showImage(mContext, bean.confidedIcon, img_head, op)
//这样处理 是防止 滑动过程中 反复去加载图片
if (!TextUtils.isEmpty(bean.confidedIcon) && img_head.getTag(R.id.img_head) != bean.confidedIcon) {
GlideApp.with(context)
.load(bean.confidedIcon)
// .override(dp96, dp96)
.into(img_head)
img_head.setTag(R.id.img_head, bean.confidedIcon)
}
} }
/** /**
...@@ -135,41 +160,102 @@ class HomeConfideExpertInfoView(private var mContext: Context, private var homeE ...@@ -135,41 +160,102 @@ class HomeConfideExpertInfoView(private var mContext: Context, private var homeE
} }
} }
private fun setListenAndScore(bodyBean: HomeConfideBean.BodyBean) {
SpanUtils.with(price_content).append(bodyBean.confideFee)
.setForegroundColor(resources.getColor(R.color.home_confide_fe6040)).setFontSize(18, true)
.append("元").setForegroundColor(resources.getColor(R.color.home_confide_fe6040))
.setFontSize(11, true)
.append("/25分钟").setForegroundColor(resources.getColor(R.color.home_confide_aaaeba))
.setFontSize(11, true)
.create()
tv_score.text = bodyBean.confidePraiseScore
}
/** /**
* 设置红包、原价 * 设置在线状态
*/ */
@SuppressLint("SetTextI18n") private fun setLineStatus(bodyBean: HomeConfideBean.BodyBean) {
private fun setCoupon(bodyBean: HomeConfideBean.BodyBean) { when (bodyBean.confideLine) {//1在线 2离线 3通话中
1, 4 -> {
tv_online.text = "在线"
tv_online.setBackgroundResource(R.drawable.home_confide_online_main)
}
2 -> {
tv_online.text = "离线"
tv_online.setBackgroundResource(R.drawable.home_confide_offline_bg)
}
3 -> {
tv_online.text = "通话中"
tv_online.setBackgroundResource(R.drawable.home_confide_online_main)
}
}
}
if(!TextUtils.isEmpty(bodyBean.couponText)){ private fun setConfideTag(bodyBean: HomeConfideBean.BodyBean) {
tvCoupon.text = bodyBean.couponText if (null == bodyBean.confidedTag || bodyBean.confidedTag!!.isEmpty()) {
tvCoupon.visibility = View.VISIBLE return
}else{
tvCoupon.visibility = View.GONE
} }
if (TextUtils.isEmpty(bodyBean.confideFee) || TextUtils.isEmpty(bodyBean.couponMoney) || bodyBean.couponMoney!!.toFloat() <= 0){ var i = 0
tvOriginalPrice.visibility = View.GONE val sb = StringBuilder()
}else{ for (tag in bodyBean.confidedTag!!) {
tvOriginalPrice.visibility = View.VISIBLE if (i > 4) break
val originalBuffer = StringBuffer() sb.append(tag).append(" | ")
originalBuffer.append(bodyBean.confideFee).append("元/次") i++
tvOriginalPrice.text = originalBuffer.toString()
//添加删除线
tvOriginalPrice.paint.flags = Paint.STRIKE_THRU_TEXT_FLAG
} }
try { if (sb.length > 3) {
val couponMoney = bodyBean.couponMoney!!.toFloat().toInt() sb.setLength(sb.length - 3)
val confideFee = bodyBean.confideFee!!.toFloat().toInt()
if (couponMoney >= confideFee){
tv_price.text = "¥0"
}else{
val price = confideFee - couponMoney
tv_price.text = "¥"+price.toString()
}
}catch (e:Exception){
//防止数据类型变化引起奔溃
} }
flowlayout_tag.text = sb.toString()
}
private fun setFreeStatus(bodyBean: HomeConfideBean.BodyBean) {
if (bodyBean.listenFree == true && bodyBean.confideLine == 1) {
confide_free_logo.visibility = VISIBLE
Glide.with(context)
.load(R.drawable.home_confide__free)
.diskCacheStrategy(DiskCacheStrategy.RESOURCE)
.into(confide_free_logo)
} else {
confide_free_logo.visibility = GONE
}
}
/**
* 设置红包、原价
*/
@SuppressLint("SetTextI18n")
private fun setCoupon(bodyBean: HomeConfideBean.BodyBean) {
// if(!TextUtils.isEmpty(bodyBean.couponText)){
// tvCoupon.text = bodyBean.couponText
// tvCoupon.visibility = View.VISIBLE
// }else{
// tvCoupon.visibility = View.GONE
// }
// if (TextUtils.isEmpty(bodyBean.confideFee) || TextUtils.isEmpty(bodyBean.couponMoney) || bodyBean.couponMoney!!.toFloat() <= 0){
// tvOriginalPrice.visibility = View.GONE
// }else{
// tvOriginalPrice.visibility = View.VISIBLE
// val originalBuffer = StringBuffer()
// originalBuffer.append(bodyBean.confideFee).append("元/次")
// tvOriginalPrice.text = originalBuffer.toString()
// //添加删除线
// tvOriginalPrice.paint.flags = Paint.STRIKE_THRU_TEXT_FLAG
// }
// try {
// val couponMoney = bodyBean.couponMoney!!.toFloat().toInt()
// val confideFee = bodyBean.confideFee!!.toFloat().toInt()
//
// if (couponMoney >= confideFee){
// tv_price.text = "¥0"
// }else{
// val price = confideFee - couponMoney
// tv_price.text = "¥"+price.toString()
// }
// }catch (e:Exception){
// //防止数据类型变化引起奔溃
// }
} }
} }
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:bottomRightRadius="6dp"/>
<solid android:color="#4d000000" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:bottomRightRadius="6dp"/>
<solid android:color="#4d000000" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:topRightRadius="100dp"
android:bottomRightRadius="100dp"/>
<solid android:color="#40FFFFFF" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="@color/white"
tools:ignore="MissingDefaultResource">
<androidx.cardview.widget.CardView
android:id="@+id/card_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:cardElevation="0dp"
app:cardCornerRadius="6dp"
android:layout_marginTop="20dp"
android:layout_marginStart="15dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<FrameLayout
android:layout_width="96dp"
android:layout_height="96dp">
<ImageView
android:id="@+id/img_head"
android:layout_width="96dp"
android:layout_height="96dp"
android:scaleType="fitXY"/>
<TextView
android:id="@+id/tv_online"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="9dp"
android:paddingRight="9dp"
android:paddingTop="1dp"
android:paddingBottom="1dp"
android:textSize="10sp"
android:textColor="@color/white"
android:background="@drawable/home_confide_recommend_expert_line_bg"
tools:text="在线"/>
<ImageView
android:id="@+id/iv_play"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_gravity="bottom|right"
android:layout_marginBottom="8dp"
android:layout_marginEnd="8dp"/>
</FrameLayout>
</androidx.cardview.widget.CardView>
<TextView
android:id="@+id/tv_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:textColor="#333333"
android:textSize="16sp"
android:textStyle="bold"
app:layout_constraintStart_toEndOf="@id/card_view"
app:layout_constraintTop_toTopOf="@id/card_view"
tools:text="姚雨晴" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/ll_confide_data"
app:layout_constraintTop_toBottomOf="@id/tv_name"
app:layout_constraintStart_toEndOf="@id/card_view"
android:layout_marginStart="12dp"
android:orientation="horizontal"
>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center"
>
<TextView
android:id="@+id/tv_Connection"
android:layout_marginTop="12dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp"
android:textColor="#555555"
android:textStyle="bold"
tools:text="83%"
/>
<TextView
android:id="@+id/tv_ConnectionContent"
android:layout_marginTop="3dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="12sp"
android:textColor="#69696A"
android:text="接通率" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center"
android:layout_marginStart="25dp"
>
<TextView
android:id="@+id/tv_confideNum"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/platform_sp_14"
android:textColor="#555555"
android:textStyle="bold"
android:layout_marginTop="12dp"
tools:text="8000人"
/>
<TextView
android:id="@+id/tv_tv_confideNumContent"
android:layout_marginTop="@dimen/platform_dp_3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/platform_sp_12"
android:textColor="#69696A"
android:text="倾诉人次"
/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center"
android:layout_marginStart="25dp"
>
<TextView
android:id="@+id/tv_score"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/platform_sp_14"
android:textColor="#555555"
android:textStyle="bold"
android:layout_marginTop="12dp"
tools:text="4.9"
/>
<TextView
android:id="@+id/tv_tv_ScoreContent"
android:layout_marginTop="@dimen/platform_dp_3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/platform_sp_12"
android:textColor="#69696A"
android:text="评分"
/>
</LinearLayout>
</LinearLayout>
<TextView
android:id="@+id/price_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="3dp"
android:layout_marginRight="16dp"
android:text="50元/25分钟"
android:textSize="@dimen/platform_sp_12"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@+id/ll_confide_data" />
<TextView
android:id="@+id/flowlayout_tag"
android:layout_width="0dp"
android:layout_height="16dp"
android:layout_marginStart="12dp"
android:layout_marginEnd="12dp"
android:textColor="#9495A0"
android:maxLines="1"
android:ellipsize="end"
android:textSize="12sp"
app:layout_constraintBottom_toBottomOf="@+id/card_view"
app:layout_constraintEnd_toStartOf="@+id/price_content"
app:layout_constraintStart_toEndOf="@+id/card_view" />
<TextView
android:id="@+id/tv_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="13sp"
android:textColor="#919190"
android:maxLines="2"
android:ellipsize="end"
app:layout_constraintTop_toBottomOf="@id/card_view"
app:layout_constraintStart_toStartOf="@id/card_view"
android:layout_marginTop="@dimen/platform_dp_15"
tools:text="没有人一出生就是完美的,只有不断的相信自...己…才能成就自己的梦想。"
/>
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
>
<TextView
android:id="@+id/tv_confide"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginTop="@dimen/platform_dp_15"
android:layout_marginEnd="@dimen/platform_dp_15"
android:gravity="center"/>
<ImageView
android:layout_width="42dp"
android:layout_height="21dp"
android:id="@+id/confide_free_logo"
android:layout_marginTop="@dimen/platform_dp_5"
android:layout_marginStart="@dimen/platform_dp_8"/>
</FrameLayout>
<View
android:id="@+id/view_line"
android:layout_width="match_parent"
android:layout_height="0.5dp"
app:layout_constraintTop_toBottomOf="@id/tv_content"
android:layout_marginTop="@dimen/platform_dp_12"
android:layout_marginLeft="15dp"
android:background="#F0F0F0"/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
...@@ -62,7 +62,8 @@ ...@@ -62,7 +62,8 @@
android:layout_below="@+id/tv_name_layout" android:layout_below="@+id/tv_name_layout"
android:layout_marginStart="@dimen/platform_dp_16" android:layout_marginStart="@dimen/platform_dp_16"
android:layout_marginTop="6dp" android:layout_marginTop="6dp"
android:layout_marginEnd="@dimen/platform_dp_10" android:layout_toLeftOf="@+id/tv_consult_chat"
android:layout_marginRight="@dimen/platform_dp_10"
android:layout_toEndOf="@+id/img_consult_head" android:layout_toEndOf="@+id/img_consult_head"
android:orientation="horizontal" /> android:orientation="horizontal" />
......
...@@ -154,10 +154,10 @@ ...@@ -154,10 +154,10 @@
<ImageView <ImageView
android:id="@+id/iv_search_icon" android:id="@+id/iv_search_icon"
android:layout_width="12dp" android:layout_width="@dimen/platform_dp_26"
android:layout_height="12dp" android:layout_height="@dimen/platform_dp_14"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_marginLeft="12dp" android:paddingLeft="12dp"
android:src="@drawable/home_icon_search"/> android:src="@drawable/home_icon_search"/>
<TextView <TextView
......
...@@ -4,5 +4,9 @@ ...@@ -4,5 +4,9 @@
<color name="white_60">#99FFFFFF</color> <color name="white_60">#99FFFFFF</color>
<color name="white">#FFFFFF</color> <color name="white">#FFFFFF</color>
<color name="home_confide_61CEAC">#61CEAC</color>
<color name="home_confide_48CC95">#48CC95</color>
<color name="home_confide_fe6040">#fe6040</color>
<color name="home_confide_aaaeba">#aaaeba</color>
</resources> </resources>
...@@ -84,7 +84,7 @@ dependencies { ...@@ -84,7 +84,7 @@ dependencies {
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0' androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
kapt 'com.alibaba:arouter-compiler:1.2.2' kapt 'com.alibaba:arouter-compiler:1.2.2'
implementation 'com.ydl:nim-base:1.1.0.4' implementation 'com.ydl:nim-base:1.1.0.7'
// implementation 'com.netease.nimlib:basesdk:8.5.0' // implementation 'com.netease.nimlib:basesdk:8.5.0'
implementation 'com.netease.nimlib:avchat:9.1.1' implementation 'com.netease.nimlib:avchat:9.1.1'
implementation 'com.netease.nimlib:nrtc:9.1.1' implementation 'com.netease.nimlib:nrtc:9.1.1'
...@@ -103,7 +103,7 @@ dependencies { ...@@ -103,7 +103,7 @@ dependencies {
implementation modularPublication('com.ydl:m-course-api') implementation modularPublication('com.ydl:m-course-api')
implementation modularPublication('com.ydl:m-fm-api') implementation modularPublication('com.ydl:m-fm-api')
implementation modularPublication('com.ydl:m-consultant-api') implementation modularPublication('com.ydl:m-consultant-api')
implementation modularPublication('com.ydl:m-confide-api') implementation project(':api:confide')
}else { }else {
//发布时使用 //发布时使用
compileOnly rootProject.ext.dependencies["ydl-m-im-api"] compileOnly rootProject.ext.dependencies["ydl-m-im-api"]
......
...@@ -544,17 +544,13 @@ public class NetworkUtil { ...@@ -544,17 +544,13 @@ public class NetworkUtil {
*/ */
public static String getActiveMacAddress(Context context) { public static String getActiveMacAddress(Context context) {
if (!DeviceTool.checkHasAgreeSecret()) { if (DeviceTool.checkHasAgreeSecret()) {
return ""; WifiManager wifi = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
} WifiInfo info = wifi.getConnectionInfo();
WifiManager wifi = (WifiManager) context.getSystemService(Context.WIFI_SERVICE); if (info != null) {
return info.getMacAddress();
WifiInfo info = wifi.getConnectionInfo(); }
if (info != null) {
return info.getMacAddress();
} }
return ""; return "";
} }
......
package com.yidianling.im.bean
data class CanViewConsult(
val canViewConsult: Boolean = false
)
...@@ -236,7 +236,7 @@ class NimSDKOptionConfig { ...@@ -236,7 +236,7 @@ class NimSDKOptionConfig {
} else { } else {
String appFrom = BaseApp.Companion.getInstance().getGlobalConfig().getAppFrom(); String appFrom = BaseApp.Companion.getInstance().getGlobalConfig().getAppFrom();
if (YDLConstants.FROM_YDL.equals(appFrom)) { if (YDLConstants.FROM_YDL.equals(appFrom) || YDLConstants.FROM_YDL2.equals(appFrom)) {
// 小米推送 // 小米推送
config.xmAppId = "2882303761517432980"; config.xmAppId = "2882303761517432980";
config.xmAppKey = "5241743243980"; config.xmAppKey = "5241743243980";
......
...@@ -371,9 +371,9 @@ public class SessionHelper { ...@@ -371,9 +371,9 @@ public class SessionHelper {
}; };
infoButton.iconId = R.drawable.im_more12x; infoButton.iconId = R.drawable.im_more12x;
buttons.add(infoButton); buttons.add(infoButton);
p2pCustomization.buttons = buttons; if (p2pCustomization != null){
p2pCustomization.buttons = buttons;
}
myP2pCustomization.withSticker = true; myP2pCustomization.withSticker = true;
return myP2pCustomization; return myP2pCustomization;
} }
......
...@@ -14,6 +14,7 @@ import com.ydl.ydlcommon.base.lifecycle.ILifecycleable; ...@@ -14,6 +14,7 @@ import com.ydl.ydlcommon.base.lifecycle.ILifecycleable;
import com.ydl.ydlcommon.data.http.RxUtils; import com.ydl.ydlcommon.data.http.RxUtils;
import com.ydl.ydlcommon.data.http.ThrowableConsumer; import com.ydl.ydlcommon.data.http.ThrowableConsumer;
import com.ydl.ydlcommon.utils.StringUtils; import com.ydl.ydlcommon.utils.StringUtils;
import com.ydl.ydlcommon.utils.Utils;
import com.ydl.ydlcommon.utils.remind.ToastHelper; import com.ydl.ydlcommon.utils.remind.ToastHelper;
import com.yidianling.im.bean.MsgData; import com.yidianling.im.bean.MsgData;
import com.yidianling.im.config.constants.ImConstants; import com.yidianling.im.config.constants.ImConstants;
...@@ -64,6 +65,9 @@ public class MsgListAdapter extends CommonAdapter<MsgData> { ...@@ -64,6 +65,9 @@ public class MsgListAdapter extends CommonAdapter<MsgData> {
} }
((MsgListItemView) convertView).setData(mDataList.get(position)); ((MsgListItemView) convertView).setData(mDataList.get(position));
convertView.setOnClickListener(v -> { convertView.setOnClickListener(v -> {
if (Utils.isFastClick()) {
return;
}
//动态消息暂时不需要访问以下接口 //动态消息暂时不需要访问以下接口
boolean fla = false; boolean fla = false;
//判断是否是跳转专家主页 //判断是否是跳转专家主页
......
...@@ -167,7 +167,7 @@ public class YDLP2PMessageActivity extends YDLBaseMessageActivity { ...@@ -167,7 +167,7 @@ public class YDLP2PMessageActivity extends YDLBaseMessageActivity {
//读取未发送的临时消息 //读取未发送的临时消息
if (ActionHandlerStorage.getL(sessionId) != null) { if (ActionHandlerStorage.getL(sessionId) != null) {
if (messageFragment.getInputPanel()==null||messageFragment.getInputPanel().getInputContent() == null || messageFragment.getInputPanel().getInputContent().equals("")) { if (messageFragment.getInputPanel() == null || messageFragment.getInputPanel().getInputContent() == null || messageFragment.getInputPanel().getInputContent().equals("")) {
if (messageFragment.getInputPanel()!=null){ if (messageFragment.getInputPanel()!=null){
messageFragment.getInputPanel().setInputContent(ActionHandlerStorage.getL(sessionId).getImTempData(sessionId)); messageFragment.getInputPanel().setInputContent(ActionHandlerStorage.getL(sessionId).getImTempData(sessionId));
} }
...@@ -300,8 +300,9 @@ public class YDLP2PMessageActivity extends YDLBaseMessageActivity { ...@@ -300,8 +300,9 @@ public class YDLP2PMessageActivity extends YDLBaseMessageActivity {
if (isFinishing()) { if (isFinishing()) {
//聊天返回时,检查是否有未发送内容,如果有则保存到ImTempData 临时map中,再次进入时读取 //聊天返回时,检查是否有未发送内容,如果有则保存到ImTempData 临时map中,再次进入时读取
if (messageFragment != null) { if (messageFragment != null) {
if (ActionHandlerStorage.getL(sessionId) != null) if (ActionHandlerStorage.getL(sessionId) != null) {
ActionHandlerStorage.getL(sessionId).saveImTempData(sessionId, messageFragment.getInputPanel().getInputContent()); ActionHandlerStorage.getL(sessionId).saveImTempData(sessionId, messageFragment.getInputPanel().getInputContent());
}
} }
ActionHandlerStorage.recycleL(sessionId); ActionHandlerStorage.recycleL(sessionId);
} }
......
...@@ -6,6 +6,7 @@ import android.animation.ValueAnimator; ...@@ -6,6 +6,7 @@ import android.animation.ValueAnimator;
import android.annotation.SuppressLint; import android.annotation.SuppressLint;
import android.content.Intent; import android.content.Intent;
import android.graphics.Color; import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.media.AudioManager; import android.media.AudioManager;
import android.os.Bundle; import android.os.Bundle;
import android.os.Handler; import android.os.Handler;
...@@ -50,6 +51,7 @@ import com.ydl.ydlcommon.modular.ModularServiceManager; ...@@ -50,6 +51,7 @@ import com.ydl.ydlcommon.modular.ModularServiceManager;
import com.ydl.ydlcommon.utils.AnimUtils; import com.ydl.ydlcommon.utils.AnimUtils;
import com.ydl.ydlcommon.utils.LogUtil; import com.ydl.ydlcommon.utils.LogUtil;
import com.ydl.ydlcommon.utils.SharedPreferencesEditor; import com.ydl.ydlcommon.utils.SharedPreferencesEditor;
import com.ydl.ydlcommon.utils.Utils;
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils; import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils;
import com.ydl.ydlcommon.utils.log.AliYunLogConfig; import com.ydl.ydlcommon.utils.log.AliYunLogConfig;
import com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper; import com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper;
...@@ -58,6 +60,7 @@ import com.ydl.ydlcommon.view.CircleImageView; ...@@ -58,6 +60,7 @@ import com.ydl.ydlcommon.view.CircleImageView;
import com.ydl.ydlcommon.view.dialog.CommonDialog; import com.ydl.ydlcommon.view.dialog.CommonDialog;
import com.yidianling.common.tools.ToastUtil; import com.yidianling.common.tools.ToastUtil;
import com.yidianling.im.R; import com.yidianling.im.R;
import com.yidianling.im.config.constants.ImConstants;
import com.yidianling.im.event.CloseBottomWebviewEvent; import com.yidianling.im.event.CloseBottomWebviewEvent;
import com.yidianling.im.event.MultipleAnswerBean; import com.yidianling.im.event.MultipleAnswerBean;
import com.yidianling.im.event.MultipleSelectedEvent; import com.yidianling.im.event.MultipleSelectedEvent;
...@@ -184,6 +187,7 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy { ...@@ -184,6 +187,7 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
private TextView tv_all_comment_desc; private TextView tv_all_comment_desc;
private ImageView tv_all_comment_go; private ImageView tv_all_comment_go;
private ImCommentBannerView comment_banner_view; private ImCommentBannerView comment_banner_view;
private TextView tvCommentCount;
private ImRedStarGradeView good_num_icons; private ImRedStarGradeView good_num_icons;
...@@ -258,8 +262,9 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy { ...@@ -258,8 +262,9 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
top_expert_info_ll = rootView.findViewById(R.id.top_expert_info_ll); top_expert_info_ll = rootView.findViewById(R.id.top_expert_info_ll);
top_expert_info_cl = rootView.findViewById(R.id.top_expert_info_cl); top_expert_info_cl = rootView.findViewById(R.id.top_expert_info_cl);
comment_banner_view_ll = rootView.findViewById(R.id.comment_banner_view_ll); comment_banner_view_ll = rootView.findViewById(R.id.comment_banner_view_ll);
tv_all_comment_desc = rootView.findViewById(R.id.tv_all_comment_desc);
tv_all_comment_go = rootView.findViewById(R.id.tv_all_comment_go); tvCommentCount = rootView.findViewById(R.id.tv_comment_count);
comment_banner_view = rootView.findViewById(R.id.comment_banner_view); comment_banner_view = rootView.findViewById(R.id.comment_banner_view);
messageListView = rootView.findViewById(R.id.messageListView); // 消息列表 messageListView = rootView.findViewById(R.id.messageListView); // 消息列表
top_view_container = rootView.findViewById(R.id.top_view_container); // 消息列表 top_view_container = rootView.findViewById(R.id.top_view_container); // 消息列表
...@@ -280,11 +285,7 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy { ...@@ -280,11 +285,7 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
//做灵犀2.0 去掉常用语逻辑 //做灵犀2.0 去掉常用语逻辑
//rl_common_question_enter.setVisibility(ActionHandlerStorage.getL(sessionId) != null && ActionHandlerStorage.getL(sessionId).getUserType() == 3 ? View.VISIBLE : View.GONE); //rl_common_question_enter.setVisibility(ActionHandlerStorage.getL(sessionId) != null && ActionHandlerStorage.getL(sessionId).getUserType() == 3 ? View.VISIBLE : View.GONE);
if (null!=ActionHandlerStorage.getL(sessionId)&&ActionHandlerStorage.getL(sessionId).getUserType() != 2) {
if (null != getActivity() && null != rela_zixun) {
rela_zixun.setVisibility(View.GONE);
}
}
if (null!=ActionHandlerStorage.getL(sessionId)&&ActionHandlerStorage.getL(sessionId).isNotPrepare()) { if (null!=ActionHandlerStorage.getL(sessionId)&&ActionHandlerStorage.getL(sessionId).isNotPrepare()) {
IMChatUtil.INSTANCE.prepareChatData((AppCompatActivity) getActivity(), sessionId, (expertInfo) -> { IMChatUtil.INSTANCE.prepareChatData((AppCompatActivity) getActivity(), sessionId, (expertInfo) -> {
String toUid = expertInfo.shareData.toUid; String toUid = expertInfo.shareData.toUid;
...@@ -305,14 +306,13 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy { ...@@ -305,14 +306,13 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
//如果是群聊 //如果是群聊
if (SessionTypeEnum.Team==sessionType){ if (SessionTypeEnum.Team==sessionType){
titleBar.setRightIcon(getContext().getDrawable(R.drawable.platform_common_more)); titleBar.setRightIcon(getContext().getDrawable(R.drawable.platform_common_more));
rela_zixun.setVisibility(View.GONE);
titleBar.setTitleRightDraw(null); titleBar.setTitleRightDraw(null);
} }
} }
@SuppressLint("CheckResult") @SuppressLint("CheckResult")
private void initView() { private void initView() {
if (ChatStatusCacheHelper.getStatusCache("chatEvent")&&SessionTypeEnum.Team!=sessionType) { if (ChatStatusCacheHelper.getStatusCache("chatEvent")&&SessionTypeEnum.Team != sessionType) {
// 获取首问语数据 // 获取首问语数据
ServiceImpl.Companion.getInstance().getFirstQuestion() ServiceImpl.Companion.getInstance().getFirstQuestion()
.subscribeOn(Schedulers.io()) .subscribeOn(Schedulers.io())
...@@ -327,6 +327,29 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy { ...@@ -327,6 +327,29 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
ToastUtil.toastShort(throwable.getMessage()); ToastUtil.toastShort(throwable.getMessage());
}); });
} }
IP2PCustomActionHandler actionHandler = ActionHandlerStorage.getL(sessionId);
//是咨询师
boolean isExpert = null != actionHandler && actionHandler.getUserType() == 2;
//不是群聊
boolean notTeam = sessionType != SessionTypeEnum.Team;
//不是客服
boolean notKefu = !ImConstants.KEFUXIAOYI.equals(sessionId);
if (isExpert && notTeam && actionHandler.getInfo() != null && notKefu && actionHandler.getInfo().doctorId != null) {
String doctorId = actionHandler.getInfo().doctorId;
ServiceImpl.Companion.getInstance().canViewConsult(doctorId)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(response -> {
if (response.code.equals("200")) {
if (response.data != null && response.data.getCanViewConsult()) {
rela_zixun.setVisibility(View.VISIBLE);
}
}
}
);
}
//有未完成订单或者有未评价订单时,显示订单布局 //有未完成订单或者有未评价订单时,显示订单布局
if (ActionHandlerStorage.getL(sessionId) != null && ActionHandlerStorage.getL(sessionId).getInfo() != null) { if (ActionHandlerStorage.getL(sessionId) != null && ActionHandlerStorage.getL(sessionId).getInfo() != null) {
...@@ -344,7 +367,7 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy { ...@@ -344,7 +367,7 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
} else { } else {
titleBar.setTitleRightDraw(getResources().getDrawable(R.drawable.im_erduoxiaolv)); titleBar.setTitleRightDraw(getResources().getDrawable(R.drawable.im_erduoxiaolv));
} }
if (ActionHandlerStorage.getL(sessionId)!=null){ if (ActionHandlerStorage.getL(sessionId) != null){
titleBar.setTitle(ActionHandlerStorage.getL(sessionId).getInfo().name); titleBar.setTitle(ActionHandlerStorage.getL(sessionId).getInfo().name);
} }
// 初始化顶部专家信息栏 // 初始化顶部专家信息栏
...@@ -430,13 +453,13 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy { ...@@ -430,13 +453,13 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
getInputPanel().setInputHintContent(res.data.getInputBoxReminder()); getInputPanel().setInputHintContent(res.data.getInputBoxReminder());
} }
} }
if ("200".equals(res.code) && res.data != null) { // if ("200".equals(res.code) && res.data != null) {
if (res.data.getStatus() == 0) { // if (res.data.getStatus() == 0) {
if (null != getActivity() && null != rela_zixun) { // if (null != getActivity() && null != rela_zixun) {
rela_zixun.setVisibility(View.GONE); // rela_zixun.setVisibility(View.GONE);
} // }
} // }
} // }
}, throwable -> { }, throwable -> {
}); });
if (ActionHandlerStorage.getL(sessionId) != null && ActionHandlerStorage.getL(sessionId).getUserType() == 1 && ModularServiceManager.INSTANCE.provide(IUserService.class).getUserInfo().getUser_type() == 3) { if (ActionHandlerStorage.getL(sessionId) != null && ActionHandlerStorage.getL(sessionId).getUserType() == 1 && ModularServiceManager.INSTANCE.provide(IUserService.class).getUserInfo().getUser_type() == 3) {
...@@ -832,13 +855,24 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy { ...@@ -832,13 +855,24 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
} }
int commentCounter = ActionHandlerStorage.getL(sessionId).getInfo().commentCounter; int commentCounter = ActionHandlerStorage.getL(sessionId).getInfo().commentCounter;
tv_all_comment_desc.setText(String.valueOf(commentCounter)); String commentCountInfo = String.format("评价(%d)", commentCounter);
tvCommentCount.setText(commentCountInfo);
Drawable drawable = getResources().getDrawable(R.drawable.platform_right_arrow);
drawable.setBounds(0, 0, 36, 36);
tvCommentCount.setCompoundDrawables(null, null, drawable, null);
tvCommentCount.setCompoundDrawablePadding(4);
H5Params params = new H5Params(ActionHandlerStorage.getL(sessionId).getInfo().commentCounterUrl, ""); H5Params params = new H5Params(ActionHandlerStorage.getL(sessionId).getInfo().commentCounterUrl, "");
View.OnClickListener onClickListener = v -> NewH5Activity.start(getActivity(), params); View.OnClickListener onClickListener = v -> {
tv_all_comment_desc.setOnClickListener(onClickListener); if (Utils.isFastClick()) {
tv_all_comment_go.setOnClickListener(onClickListener); return;
}
ActionCountUtils.Companion.baiDuCountSign3("chat_page", "evaluate_lick_click", "", "", "");
NewH5Activity.start(getActivity(), params);
};
tvCommentCount.setOnClickListener(onClickListener);
comment_banner_view.initData(ActionHandlerStorage.getL(sessionId).getInfo().commentList); comment_banner_view.initData(ActionHandlerStorage.getL(sessionId).getInfo().commentList);
......
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