Commit df05c6eb by 霍志良

feat:JS方法添加

parent 3eb42a8f
......@@ -11,6 +11,9 @@ import com.ydl.webview.NewH5Activity;
import com.ydl.ydlcommon.modular.ModularServiceManager;
import com.yidianling.common.tools.LogUtil;
import com.yidianling.im.api.service.IImService;
import com.yidianling.im.event.CloseBottomWebviewEvent;
import de.greenrobot.event.EventBus;
/**
* webview 点击事件监听 抽象类
......@@ -446,5 +449,10 @@ public class WVClickAbstractListener implements WebViewClientClickListener {
}
}
@Override
public void chatCloseBottomWebView() {
EventBus.getDefault().post(new CloseBottomWebviewEvent(true));
}
}
......@@ -381,6 +381,11 @@ class WebJavascriptHandler : IJavascriptHandler{
wvEnventPro?.setSelfPageType(it.selfPageType)
}
}
"chat_close_bottom_webview" -> {
jsData.cmd!!.params?.let {
wvEnventPro?.setSelfPageType(it.selfPageType)
}
}
}
}
}
......@@ -182,4 +182,7 @@ public interface WebViewClientClickListener {
//设置当前页面类型
void setSelfPageType(int selfType);
//关闭私聊窗口立即咨询webview
void chatCloseBottomWebView();
}
package com.yidianling.im.event
data class CloseBottomWebviewEvent( var close:Boolean)
\ No newline at end of file
......@@ -71,6 +71,7 @@ import com.yidianling.common.tools.ToastUtil;
import com.yidianling.im.R;
import com.yidianling.im.bean.RemoveHistory;
import com.yidianling.im.config.constants.ImConstants;
import com.yidianling.im.event.CloseBottomWebviewEvent;
import com.yidianling.im.event.MultipleAnswerBean;
import com.yidianling.im.event.MultipleSelectedEvent;
import com.yidianling.im.helper.IMChatUtil;
......@@ -1153,6 +1154,9 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
answerMultipleQuestion(multipleAnswerBean);
}
}
public void onEvent(CloseBottomWebviewEvent event){
expertConsultServiceListDialog.changeItem();
}
private void updateLocalMsg(Integer position,ArrayList<String> selectedPosition) {
IMMessage message=ImIn.INSTANCE.getImMessage();
//更新本地消息
......
package com.yidianling.uikit.custom.widget.expertConsultService.view
import `in`.srain.cube.views.GridViewWithHeaderAndFooter
import android.app.Dialog
import android.content.Context
import android.os.Bundle
......@@ -17,7 +16,6 @@ import com.netease.nimlib.sdk.msg.constant.SessionTypeEnum
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.yidianling.common.tools.RxDeviceTool
import com.yidianling.common.tools.RxImageTool
import com.yidianling.common.tools.ToastUtil
import com.yidianling.im.R
import com.yidianling.im.session.extension.CustomAttachSubScriptTime
import com.yidianling.uikit.business.session.helper.MessageListPanelHelper
......@@ -36,11 +34,12 @@ class ExpertConsultServiceListDialog(val mContext: Context, val mList: List<Serv
val toUid:String,val doctorID:String): Dialog(mContext, R.style.dialog_default_style) {
private var mConsultServiceListView: ExpertConsultServiceView? = null
private var mConsultServiceDetailView: ExpertConsultServiceDetailView? = null
private var mWebviewView: ExpertConsultWebview? = null
private var mViewList: ArrayList<View> = ArrayList()
private var mSelectType: String = "全部"
fun changeItem(){
dialog_bottom_scroll_view.currentItem = 0
}
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
......@@ -103,11 +102,11 @@ class ExpertConsultServiceListDialog(val mContext: Context, val mList: List<Serv
mViewList.add(mConsultServiceListView as View)
mConsultServiceDetailView = ExpertConsultServiceDetailView(mContext, object : ConsultServiceViewCallback {
override fun onBackClick() {
dialog_bottom_scroll_view.currentItem = 0
}
},mIsBusy,toUid)
// mConsultServiceDetailView = ExpertConsultServiceDetailView(mContext, object : ConsultServiceViewCallback {
// override fun onBackClick() {
// dialog_bottom_scroll_view.currentItem = 0
// }
// },mIsBusy,toUid)
// mViewList.add(mConsultServiceDetailView as View)
mWebviewView= ExpertConsultWebview(mContext,doctorID =doctorID )
......
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