Browse Source

1.授权渠道不做任何返回操作,全交给h5

tags/0.0.6
“yanghuaxuan” 4 years ago
parent
commit
159f123705
1 changed files with 14 additions and 14 deletions
  1. +14
    -14
      android/src/main/java/com/wxwx/flutter_alibc/WebActivity.java

+ 14
- 14
android/src/main/java/com/wxwx/flutter_alibc/WebActivity.java View File

@@ -167,20 +167,20 @@ public class WebActivity extends Activity {
public void showSource(final String html) { public void showSource(final String html) {
//获取网页内容,用于判断是否成功绑定关系id //获取网页内容,用于判断是否成功绑定关系id


try { // try {
if (html.contains("成功")) {//成功 // if (html.contains("成功")) {//成功
// Toast.makeText(WebActivity.this, "授权成功", Toast.LENGTH_SHORT).show(); // // Toast.makeText(WebActivity.this, "授权成功", Toast.LENGTH_SHORT).show();
setResult(222222); // setResult(222222);
finish(); // finish();
} else {//失败 // } else {//失败
setResult(111111); // setResult(111111);
mainWeb.setAlpha(0); // mainWeb.setAlpha(0);
finish(); // finish();
} // }
//
} catch (Exception e) { // } catch (Exception e) {
e.printStackTrace(); // e.printStackTrace();
} // }
} }


@JavascriptInterface @JavascriptInterface


||||||
x
 
000:0
Loading…
Cancel
Save