修复测试反馈问题
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.alibaba.android.arouter.facade.annotation.Route;
|
||||||
import com.shayu.onetoone.R;
|
import com.shayu.onetoone.R;
|
||||||
import com.shayu.onetoone.manager.RouteManager;
|
import com.shayu.onetoone.manager.RouteManager;
|
||||||
|
import com.shayu.onetoone.utils.ConversationUtils;
|
||||||
import com.shayu.onetoone.utils.UserManager;
|
import com.shayu.onetoone.utils.UserManager;
|
||||||
import com.yunbao.common.Constants;
|
import com.yunbao.common.Constants;
|
||||||
import com.yunbao.common.bean.IMLoginModel;
|
import com.yunbao.common.bean.IMLoginModel;
|
||||||
@ -139,6 +140,8 @@ public class WebViewActivity extends AbsOTOActivity {
|
|||||||
.setTitle("快來認識更多有趣的朋友吧!")
|
.setTitle("快來認識更多有趣的朋友吧!")
|
||||||
.setUrl(event.getData())
|
.setUrl(event.getData())
|
||||||
.showDialog();
|
.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 pageClose = false;
|
||||||
private boolean dialogClose = false;
|
private boolean dialogClose = false;
|
||||||
private boolean permitSetHigh =true;
|
private boolean permitSetHigh = true;
|
||||||
//同名activity跳转问题
|
//同名activity跳转问题
|
||||||
private boolean LiveZhuangBana = true;
|
private boolean LiveZhuangBana = true;
|
||||||
private static JavascriptInterfaceUtils sInstance;
|
private static JavascriptInterfaceUtils sInstance;
|
||||||
@ -63,8 +63,8 @@ public class JavascriptInterfaceUtils {
|
|||||||
/**
|
/**
|
||||||
* 允许js修改webview高度
|
* 允许js修改webview高度
|
||||||
*/
|
*/
|
||||||
public JavascriptInterfaceUtils setPermitSetHigh(boolean isPermit){
|
public JavascriptInterfaceUtils setPermitSetHigh(boolean isPermit) {
|
||||||
this.permitSetHigh=isPermit;
|
this.permitSetHigh = isPermit;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -512,7 +512,7 @@ public class JavascriptInterfaceUtils {
|
|||||||
if ("0".equals(height)) {
|
if ("0".equals(height)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(!permitSetHigh){
|
if (!permitSetHigh) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Handler handler = new Handler(Looper.getMainLooper());
|
Handler handler = new Handler(Looper.getMainLooper());
|
||||||
@ -612,6 +612,8 @@ public class JavascriptInterfaceUtils {
|
|||||||
|
|
||||||
@JavascriptInterface
|
@JavascriptInterface
|
||||||
public void androidCallChat(String targetId) {
|
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