修复测试反馈问题
This commit is contained in:
parent
5c311b4309
commit
be6cfd4464
@ -20,6 +20,7 @@ import android.webkit.WebViewClient;
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.shayu.onetoone.R;
|
||||
import com.shayu.onetoone.manager.RouteManager;
|
||||
import com.shayu.onetoone.utils.ConversationUtils;
|
||||
import com.shayu.onetoone.utils.UserManager;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.bean.IMLoginModel;
|
||||
@ -139,6 +140,8 @@ public class WebViewActivity extends AbsOTOActivity {
|
||||
.setTitle("快來認識更多有趣的朋友吧!")
|
||||
.setUrl(event.getData())
|
||||
.showDialog();
|
||||
}else if (event.getMethod().equals("androidCallChat")){
|
||||
ConversationUtils.startConversation(mContext,event.getData());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ public class JavascriptInterfaceUtils {
|
||||
//判断是页面关闭还是网页回退
|
||||
private boolean pageClose = false;
|
||||
private boolean dialogClose = false;
|
||||
private boolean permitSetHigh =true;
|
||||
private boolean permitSetHigh = true;
|
||||
//同名activity跳转问题
|
||||
private boolean LiveZhuangBana = true;
|
||||
private static JavascriptInterfaceUtils sInstance;
|
||||
@ -63,8 +63,8 @@ public class JavascriptInterfaceUtils {
|
||||
/**
|
||||
* 允许js修改webview高度
|
||||
*/
|
||||
public JavascriptInterfaceUtils setPermitSetHigh(boolean isPermit){
|
||||
this.permitSetHigh=isPermit;
|
||||
public JavascriptInterfaceUtils setPermitSetHigh(boolean isPermit) {
|
||||
this.permitSetHigh = isPermit;
|
||||
return this;
|
||||
}
|
||||
|
||||
@ -512,7 +512,7 @@ public class JavascriptInterfaceUtils {
|
||||
if ("0".equals(height)) {
|
||||
return;
|
||||
}
|
||||
if(!permitSetHigh){
|
||||
if (!permitSetHigh) {
|
||||
return;
|
||||
}
|
||||
Handler handler = new Handler(Looper.getMainLooper());
|
||||
@ -612,6 +612,8 @@ public class JavascriptInterfaceUtils {
|
||||
|
||||
@JavascriptInterface
|
||||
public void androidCallChat(String targetId) {
|
||||
ToastUtil.show("网页触发聊一聊:" + targetId);
|
||||
Bus.get().post(new JavascriptInterfaceEvent()
|
||||
.setData(targetId)
|
||||
.setMethod("androidCallChat"));
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user