Commit 1b5ec1db by 霍志良

Merge remote-tracking branch 'origin/new_dev_4.3.91' into 心事动态发布优化

parents edfb598e a5d2d185
...@@ -9,9 +9,9 @@ ext { ...@@ -9,9 +9,9 @@ ext {
"m-consultant" : "0.0.60.21", "m-consultant" : "0.0.60.21",
"m-fm" : "0.0.30.08", "m-fm" : "0.0.30.08",
"m-user" : "0.0.62.04", "m-user" : "0.0.62.04",
"m-home" : "0.0.23.37", "m-home" : "0.0.23.44",
"m-im" : "0.0.21.30", "m-im" : "0.0.21.33",
"m-dynamic" : "0.0.7.36", "m-dynamic" : "0.0.7.37",
"m-article" : "0.0.0.10", "m-article" : "0.0.0.10",
"m-muse" : "0.0.28.28", "m-muse" : "0.0.28.28",
...@@ -28,7 +28,7 @@ ext { ...@@ -28,7 +28,7 @@ ext {
"m-tests-api" : "0.0.2", "m-tests-api" : "0.0.2",
"m-user-api" : "0.0.10.19", "m-user-api" : "0.0.10.19",
"m-home-api" : "0.0.4.2", "m-home-api" : "0.0.4.2",
"m-im-api" : "0.0.12.23", "m-im-api" : "0.0.12.24",
"m-dynamic-api" : "0.0.3.71", "m-dynamic-api" : "0.0.3.71",
//-------------- 功能组件 -------------- //-------------- 功能组件 --------------
...@@ -95,9 +95,9 @@ ext { ...@@ -95,9 +95,9 @@ ext {
"m-consultant" : "0.0.60.21", "m-consultant" : "0.0.60.21",
"m-fm" : "0.0.30.08", "m-fm" : "0.0.30.08",
"m-user" : "0.0.62.04", "m-user" : "0.0.62.04",
"m-home" : "0.0.23.37", "m-home" : "0.0.23.41",
"m-im" : "0.0.21.30", "m-im" : "0.0.21.33",
"m-dynamic" : "0.0.7.36", "m-dynamic" : "0.0.7.37",
"m-article" : "0.0.0.8", "m-article" : "0.0.0.8",
"m-muse" : "0.0.28.28", "m-muse" : "0.0.28.28",
...@@ -113,7 +113,7 @@ ext { ...@@ -113,7 +113,7 @@ ext {
"m-tests-api" : "0.0.2", "m-tests-api" : "0.0.2",
"m-user-api" : "0.0.10.19", "m-user-api" : "0.0.10.19",
"m-home-api" : "0.0.4.2", "m-home-api" : "0.0.4.2",
"m-im-api" : "0.0.12.23", "m-im-api" : "0.0.12.24",
"m-dynamic-api" : "0.0.3.71", "m-dynamic-api" : "0.0.3.71",
//-------------- 功能组件 -------------- //-------------- 功能组件 --------------
//mdt组件 //mdt组件
......
...@@ -657,6 +657,7 @@ public class TrendsDetailActivity extends BaseMvpActivity<ITrendsDetailView, ITr ...@@ -657,6 +657,7 @@ public class TrendsDetailActivity extends BaseMvpActivity<ITrendsDetailView, ITr
@Override @Override
public void showFousChangeView() { public void showFousChangeView() {
tvGuanzhu.setText("已关注"); tvGuanzhu.setText("已关注");
tvGuanzhu.setEnabled(false);
new Timer().schedule(new TimerTask() { new Timer().schedule(new TimerTask() {
@Override @Override
public void run() { public void run() {
...@@ -1464,6 +1465,7 @@ public class TrendsDetailActivity extends BaseMvpActivity<ITrendsDetailView, ITr ...@@ -1464,6 +1465,7 @@ public class TrendsDetailActivity extends BaseMvpActivity<ITrendsDetailView, ITr
tvGuanzhu.setVisibility(GONE); tvGuanzhu.setVisibility(GONE);
tvGuanzhu.setText("已关注"); tvGuanzhu.setText("已关注");
}else{ }else{
tvGuanzhu.setEnabled(true);
tvGuanzhu.setVisibility(VISIBLE); tvGuanzhu.setVisibility(VISIBLE);
tvGuanzhu.setText("关注"); tvGuanzhu.setText("关注");
} }
......
...@@ -59,10 +59,10 @@ ...@@ -59,10 +59,10 @@
"url": "https://h2.yidianling.com/experts/search?cat=1&" "url": "https://h2.yidianling.com/experts/search?cat=1&"
}, },
{ {
"cateId": 699, "cateId": 0,
"cateTitle": "精神咨询", "cateTitle": "法律咨询",
"coverUrl": "https://img.ydlcdn.com/file/2020/02/21/8sgcaowkgbd9d7j0.jpg", "coverUrl": "https://img.ydlcdn.com/file/2020/02/21/8sgcaowkgbd9d7j0.jpg",
"url": "https://h2.yidianling.com/experts/search?cat=699&" "url": "https://h2.yidianling.com/experts/cates"
}, },
{ {
"cateId": 0, "cateId": 0,
...@@ -160,19 +160,6 @@ ...@@ -160,19 +160,6 @@
"title": "性格心理学:透析对方性格,解决相处问题" "title": "性格心理学:透析对方性格,解决相处问题"
}, },
{ {
"focId": 21309,
"imageIphonex": "https://img.ydlcdn.com/file/2020/03/04/72dmpjkbohis3qe0.png",
"imageUrl": "https://img.ydlcdn.com/file/2020/03/04/577tdchz4ti0ts9z.png",
"linkUrl": "ydl-user://h5/h5?params=%7B%22url%22%3A%22https%3A%2F%2Fm.ydl.com%2Fzx%2Factivity%2Fpsychiatry%22%7D",
"shareData": {
"title": "精神科医生专题页",
"cover": "https://img.ydlcdn.com/file/2020/03/04/577tdchz4ti0ts9z.png",
"desc": "",
"shareUrl": ""
},
"title": "精神科医生专题页"
},
{
"focId": 19412, "focId": 19412,
"imageIphonex": "https://img.ydlcdn.com/file/2019/12/24/k7o29a2rig40e9s6.jpg", "imageIphonex": "https://img.ydlcdn.com/file/2019/12/24/k7o29a2rig40e9s6.jpg",
"imageUrl": "https://img.ydlcdn.com/file/2019/12/24/s55wai4yrero8bv4.jpg", "imageUrl": "https://img.ydlcdn.com/file/2019/12/24/s55wai4yrero8bv4.jpg",
......
...@@ -203,7 +203,6 @@ class YdlHomeAdapter(private val mContext: Context, ...@@ -203,7 +203,6 @@ class YdlHomeAdapter(private val mContext: Context,
} }
//顶部预约专家,即时倾诉,心理课堂,心理测试按钮模块 //顶部预约专家,即时倾诉,心理课堂,心理测试按钮模块
is HomeButtonBannerViewHolder -> { is HomeButtonBannerViewHolder -> {
// listenFree?.let { holder.buttonBannerView.setVisibilityFree(it) }
list[1].headerBean?.listenFree?.let { holder.buttonBannerView.setVisibilityFree(it) } list[1].headerBean?.listenFree?.let { holder.buttonBannerView.setVisibilityFree(it) }
} }
//咨询模块 //咨询模块
......
...@@ -106,22 +106,6 @@ open class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterIm ...@@ -106,22 +106,6 @@ open class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterIm
} }
override fun initDataAndEvent() { override fun initDataAndEvent() {
// val homeViewOrder = HomeViewConfig.HomeViewOrder()
//
// homeViewOrder.bannerIndex = -1
// homeViewOrder.testsIndex = 1
// homeViewOrder.consultIndex = 2
// homeViewOrder.footerIndex = 3
//
// homeViewOrder.fmIndex = null
// homeViewOrder.articleIndex = null
// homeViewOrder.dynamicIndex = null
// homeViewOrder.museIndex = null
// homeViewOrder.confideIndex = null
// homeViewOrder.courseIndex = null
// homeViewOrder.buttonIndex = null
//
// HomeViewConfig.setOrder(homeViewOrder)
mActivity = requireActivity() mActivity = requireActivity()
mContext = requireContext() mContext = requireContext()
initHomeEvent() initHomeEvent()
...@@ -532,6 +516,7 @@ open class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterIm ...@@ -532,6 +516,7 @@ open class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterIm
isFromCreate = false isFromCreate = false
mPresenter?.loadHomeData() mPresenter?.loadHomeData()
} else { } else {
mPresenter?.loadHomeData()
mPresenter?.getConsultData(consultLastSelectType, consultLastSelectPosition) mPresenter?.getConsultData(consultLastSelectType, consultLastSelectPosition)
mPresenter?.getConfideData(confideLastSelectType, confideLastSelectPosition) mPresenter?.getConfideData(confideLastSelectType, confideLastSelectPosition)
} }
......
...@@ -43,6 +43,7 @@ class HomeButtonBannerView(private val mContext: Context, private var homeEvent: ...@@ -43,6 +43,7 @@ class HomeButtonBannerView(private val mContext: Context, private var homeEvent:
val params = RecyclerView.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT) val params = RecyclerView.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)
layoutParams = params layoutParams = params
View.inflate(mContext, R.layout.home_button_banner_view, this) View.inflate(mContext, R.layout.home_button_banner_view, this)
setVisibilityFree(listenFree)
Glide.with(context) Glide.with(context)
.load(R.drawable.qingsu_new_free_dynamic) .load(R.drawable.qingsu_new_free_dynamic)
.diskCacheStrategy(DiskCacheStrategy.RESOURCE) .diskCacheStrategy(DiskCacheStrategy.RESOURCE)
......
...@@ -153,6 +153,23 @@ object IMChatUtil { ...@@ -153,6 +153,23 @@ object IMChatUtil {
} }
/** /**
* 直接和对方聊天,不判断是否有代运营
* @param context
* @param chatItemBean
*/
@SuppressLint("CheckResult")
fun startChatBySessionId(context: AppCompatActivity?, sessionId: String) {
context?.let {
prepareChatData(it, sessionId, object :
ChatDataRequestListener {
override fun onSuccess(expertInfo: IMExpertBuild) {
startChatSession(sessionId, expertInfo, 0, context)
}
})
}
}
/**
* 非私聊列表进入,前置数据请求 * 非私聊列表进入,前置数据请求
* */ * */
@SuppressLint("CheckResult") @SuppressLint("CheckResult")
...@@ -184,9 +201,7 @@ object IMChatUtil { ...@@ -184,9 +201,7 @@ object IMChatUtil {
.observeOn(AndroidSchedulers.mainThread()) .observeOn(AndroidSchedulers.mainThread())
.subscribe({ res: BaseResponse<UserTypeBean> -> .subscribe({ res: BaseResponse<UserTypeBean> ->
if (res.code == 200 && res.data != null) { if (res.code == 200 && res.data != null) {
if (res.data!!.chatEvent) { //和助理私聊需要打开常用语弹窗 ChatStatusCacheHelper.setStatusCache("chatEvent", res.data!!.chatEvent)
ChatStatusCacheHelper.setStatusCache("chatEvent", res.data!!.chatEvent)
}
if (TextUtils.equals(res.data!!.userType, USER_TYPE_EXPERT.toString()) if (TextUtils.equals(res.data!!.userType, USER_TYPE_EXPERT.toString())
) { //专家 ) { //专家
//在uid用户类型确定为专家的情况下,根据uid调用接口判断是进入专家私聊还是助理私聊 //在uid用户类型确定为专家的情况下,根据uid调用接口判断是进入专家私聊还是助理私聊
...@@ -259,12 +274,7 @@ object IMChatUtil { ...@@ -259,12 +274,7 @@ object IMChatUtil {
.observeOn(AndroidSchedulers.mainThread()) .observeOn(AndroidSchedulers.mainThread())
.subscribe({ res: BaseResponse<UserTypeBean> -> .subscribe({ res: BaseResponse<UserTypeBean> ->
if (res.code == 200 && res.data != null) { if (res.code == 200 && res.data != null) {
if (res.data!!.chatEvent) { //和助理私聊需要打开常用语弹窗 ChatStatusCacheHelper.setStatusCache("chatEvent", res.data!!.chatEvent)
ChatStatusCacheHelper.setStatusCache(
"chatEvent",
res.data!!.chatEvent
)
}
if (TextUtils.equals(res.data!!.userType, USER_TYPE_EXPERT.toString())) { //专家 if (TextUtils.equals(res.data!!.userType, USER_TYPE_EXPERT.toString())) { //专家
//在uid用户类型确定为专家的情况下,根据uid调用接口判断是进入专家私聊还是助理私聊 //在uid用户类型确定为专家的情况下,根据uid调用接口判断是进入专家私聊还是助理私聊
getImJavaApi().getChatUid(toUid) getImJavaApi().getChatUid(toUid)
...@@ -374,9 +384,7 @@ object IMChatUtil { ...@@ -374,9 +384,7 @@ object IMChatUtil {
.observeOn(AndroidSchedulers.mainThread()) .observeOn(AndroidSchedulers.mainThread())
.subscribe({ res: BaseResponse<UserTypeBean> -> .subscribe({ res: BaseResponse<UserTypeBean> ->
if (res.code == 200 && res.data != null) { if (res.code == 200 && res.data != null) {
if (res.data!!.chatEvent) { //和助理私聊需要打开常用语弹窗 ChatStatusCacheHelper.setStatusCache("chatEvent", res.data!!.chatEvent)
ChatStatusCacheHelper.setStatusCache("chatEvent", res.data!!.chatEvent)
}
if (TextUtils.equals(res.data!!.userType, "2")) { if (TextUtils.equals(res.data!!.userType, "2")) {
//接口返回值是专家,java接口 //接口返回值是专家,java接口
prepareExpertChatData(context, toUid, listener) prepareExpertChatData(context, toUid, listener)
......
...@@ -70,6 +70,9 @@ class IMServiceImpl : IImService { ...@@ -70,6 +70,9 @@ class IMServiceImpl : IImService {
override fun startP2PSession(context: Activity, location: Int, ffrom2: String?) { override fun startP2PSession(context: Activity, location: Int, ffrom2: String?) {
IMChatUtil.startCms(context,location,ffrom2) IMChatUtil.startCms(context,location,ffrom2)
} }
override fun startChatBySessionId(context: Activity, toUid: String) {
IMChatUtil.startChatBySessionId(context as AppCompatActivity,toUid)
}
override fun startP2PXiaoYi(context: Context) { override fun startP2PXiaoYi(context: Context) {
if (!ImIn.loginByOneKeyLogin(context,true)) { if (!ImIn.loginByOneKeyLogin(context,true)) {
......
...@@ -321,10 +321,11 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy { ...@@ -321,10 +321,11 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
rela_zixun.setVisibility(View.GONE); rela_zixun.setVisibility(View.GONE);
titleBar.setTitleRightDraw(null); titleBar.setTitleRightDraw(null);
} }
}
// 判断最近一次发送消息的时间是否大于24小时 @SuppressLint("CheckResult")
long time = System.currentTimeMillis()-SPUtils.getInstance().getLong(ModularServiceManager.INSTANCE.provide(IUserService.class).getUserInfo().getUid(),0L); private void initView() {
if (time==0L||time>24*60*60*1000){ //如果等于0或者大于则请求首问语接口 if (ChatStatusCacheHelper.getStatusCache("chatEvent")&&SessionTypeEnum.Team!=sessionType) {
// 获取首问语数据 // 获取首问语数据
ServiceImpl.Companion.getInstance().getFirstQuestion() ServiceImpl.Companion.getInstance().getFirstQuestion()
.subscribeOn(Schedulers.io()) .subscribeOn(Schedulers.io())
...@@ -339,34 +340,6 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy { ...@@ -339,34 +340,6 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
ToastUtil.toastShort(throwable.getMessage()); ToastUtil.toastShort(throwable.getMessage());
}); });
} }
}
@SuppressLint("CheckResult")
private void initView() {
if (ActionHandlerStorage.getL(sessionId) != null && ActionHandlerStorage.getL(sessionId).getUserType() == 3) {
//助理
/*rl_common_question_enter.setOnClickListener(v -> {
rl_common_question_enter.setOnClickListener(v -> {
if (commonQuestionBeanList != null && commonQuestionBeanList.size() > 0) {
openOrCloseCommonQuestionLayout(true);
} else {
getCommonQuestionListData();
}
});*/
if (ChatStatusCacheHelper.getStatusCache("chatEvent")) {
if (commonQuestionBeanList != null && commonQuestionBeanList.size() > 0) {
// rl_common_question_enter.postDelayed(() -> openOrCloseCommonQuestionLayout(true), 300);
} else {
try {
YdlBuryPointUtil.sendPv("common_question_pager");
} catch (Exception e) {
e.printStackTrace();
}
getCommonQuestionListData();
}
ChatStatusCacheHelper.clearDataByKey("chatEvent");
}
}
//有未完成订单或者有未评价订单时,显示订单布局 //有未完成订单或者有未评价订单时,显示订单布局
if (ActionHandlerStorage.getL(sessionId) != null && ActionHandlerStorage.getL(sessionId).getInfo() != null) { if (ActionHandlerStorage.getL(sessionId) != null && ActionHandlerStorage.getL(sessionId).getInfo() != null) {
...@@ -1517,26 +1490,26 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy { ...@@ -1517,26 +1490,26 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
} }
@SuppressLint("CheckResult") // @SuppressLint("CheckResult")
private void getCommonQuestionListData() { // private void getCommonQuestionListData() {
ServiceImpl.Companion.getInstance().getCommonQuestionList() // ServiceImpl.Companion.getInstance().getCommonQuestionList()
.subscribeOn(Schedulers.io()) // .subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread()) // .observeOn(AndroidSchedulers.mainThread())
.subscribe(res -> { // .subscribe(res -> {
if (res.data != null && res.data.size() > 0) { // if (res.data != null && res.data.size() > 0) {
if (commonQuestionBeanList == null) { // if (commonQuestionBeanList == null) {
commonQuestionBeanList = new ArrayList<>(); // commonQuestionBeanList = new ArrayList<>();
} else { // } else {
commonQuestionBeanList.clear(); // commonQuestionBeanList.clear();
} // }
commonQuestionBeanList.addAll(res.data); // commonQuestionBeanList.addAll(res.data);
// initCommonQuestionLayout(); // initCommonQuestionLayout();
} // }
//
}, throwable -> { // }, throwable -> {
ToastUtil.toastShort(throwable.toString()); // ToastUtil.toastShort(throwable.toString());
}); // });
} // }
/* /*
* 用户是否在当前页面 * 用户是否在当前页面
* *
......
...@@ -68,6 +68,7 @@ import com.yidianling.nimbase.common.util.string.StringUtil; ...@@ -68,6 +68,7 @@ import com.yidianling.nimbase.common.util.string.StringUtil;
import com.yidianling.uikit.api.NimUIKit; import com.yidianling.uikit.api.NimUIKit;
import com.yidianling.uikit.api.NimUIKitImpl; import com.yidianling.uikit.api.NimUIKitImpl;
import com.yidianling.uikit.business.ait.AitTextChangeListener; import com.yidianling.uikit.business.ait.AitTextChangeListener;
import com.yidianling.uikit.business.session.helper.ChatStatusCacheHelper;
import com.yidianling.uikit.custom.widget.SafeHelpRemindDialog; import com.yidianling.uikit.custom.widget.SafeHelpRemindDialog;
import com.yidianling.user.api.service.IUserService; import com.yidianling.user.api.service.IUserService;
...@@ -313,8 +314,6 @@ public class InputPanel implements IEmoticonSelectedListener, IAudioRecordCallba ...@@ -313,8 +314,6 @@ public class InputPanel implements IEmoticonSelectedListener, IAudioRecordCallba
String content = firstQuestionAdapter.getData().get(position).getContent(); String content = firstQuestionAdapter.getData().get(position).getContent();
// 埋点 // 埋点
ActionCountUtils.Companion.baiDuCountSign3("counselor_consult_page","quick_language_click",content,"",""); ActionCountUtils.Companion.baiDuCountSign3("counselor_consult_page","quick_language_click",content,"","");
// 根据uid记录每次发消息的时间戳
SPUtils.getInstance().put(uid,System.currentTimeMillis());
onTextMessageSendButtonPressed(content); onTextMessageSendButtonPressed(content);
clFirstQuestion.setVisibility(View.GONE); clFirstQuestion.setVisibility(View.GONE);
}); });
...@@ -553,9 +552,6 @@ public class InputPanel implements IEmoticonSelectedListener, IAudioRecordCallba ...@@ -553,9 +552,6 @@ public class InputPanel implements IEmoticonSelectedListener, IAudioRecordCallba
* 替换之后最终发送的字符串 * 替换之后最终发送的字符串
*/ */
private void onTextMessageSendButtonClick() { private void onTextMessageSendButtonClick() {
// 根据uid记录每次发消息的时间戳
SPUtils.getInstance().put(uid,System.currentTimeMillis());
IMMessage textMessage = createTextMessage(sendText); IMMessage textMessage = createTextMessage(sendText);
if (container.proxy.sendMessage(textMessage)) { if (container.proxy.sendMessage(textMessage)) {
restoreText(true); restoreText(true);
......
...@@ -21,6 +21,8 @@ interface IImService : IProvider { ...@@ -21,6 +21,8 @@ interface IImService : IProvider {
// 打开私聊界面 // 打开私聊界面
fun startP2PSession(context: Activity, toUid: String) fun startP2PSession(context: Activity, toUid: String)
// 直接打开聊天页面,不走分配导医
fun startChatBySessionId(context: Activity, toUid: String)
// 打开信息前置收集页 // 打开信息前置收集页
fun startP2PSession(context: Activity, location: Int, ffrom2: String?) fun startP2PSession(context: Activity, location: Int, ffrom2: String?)
......
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