From 86d35991108f81b17294f613549554697db11b27 Mon Sep 17 00:00:00 2001 From: lijia Date: Thu, 5 Dec 2024 10:10:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=96=E9=83=A8=E8=B7=B3=E5=9B=9E=E6=B5=8B?= =?UTF-8?q?=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hndahesudintocctmsdriver/H5Activity.java | 23 ++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/com/arpa/hndahesudintocctmsdriver/H5Activity.java b/app/src/main/java/com/arpa/hndahesudintocctmsdriver/H5Activity.java index a349d49..2c8ec0c 100644 --- a/app/src/main/java/com/arpa/hndahesudintocctmsdriver/H5Activity.java +++ b/app/src/main/java/com/arpa/hndahesudintocctmsdriver/H5Activity.java @@ -211,6 +211,15 @@ public class H5Activity extends AppCompatActivity { if (uri != null) { // 芝麻认证刷脸结束返回获取后续操作页面地址 // String callbackUrl = uri.getQueryParameter("callback"); + String urlString = uri.toString(); + if ("dahe://driver:8088/realBack".equals(urlString)) { + Intent in = new Intent(ctx, FaceSuccActivity.class); + in.putExtra("isGoCar", true); + startActivity(in); + ActivityUtils.finishToActivity(MainActivity.class, false); + + return; + } String callbackUrl = uri.getQueryParameter("realnameUrl"); if (!TextUtils.isEmpty(callbackUrl)) { @@ -227,17 +236,18 @@ public class H5Activity extends AppCompatActivity { if (url.startsWith("alipay")) { try { Intent intent2 = new Intent(Intent.ACTION_VIEW, Uri.parse(url)); - intent2.putExtra("isGoCar",isGoCar); + intent2.putExtra("isGoCar", isGoCar); startActivity(intent2); return; } catch (Exception e) { } - }else if (url.startsWith("https://agreement.dahehuoyun.com/#/1ba5c216/912f4c9587/5eb5184653/6ef9")) { +// }else if (url.startsWith("https://agreement.dahehuoyun.com/#/1ba5c216/912f4c9587/5eb5184653/6ef9")) { + } else if (url.startsWith("https://agreement.dahehuoyun.com/goApp")) { Intent in = new Intent(ctx, FaceSuccActivity.class); startActivity(in); if (isGoCar) { ActivityUtils.finishToActivity(MainActivity.class, false); - }else{ + } else { finish(); } return; @@ -260,13 +270,14 @@ public class H5Activity extends AppCompatActivity { Uri uri = Uri.parse(url); Log.e("test", "要加载的地址:" + uri.getScheme() + " " + url + " "); if (uri.getScheme().equals("http") || uri.getScheme().equals("https")) { - if (url.startsWith("https://agreement.dahehuoyun.com/#/1ba5c216/912f4c9587/5eb5184653/6ef9")) { +// if (url.startsWith("https://agreement.dahehuoyun.com/#/1ba5c216/912f4c9587/5eb5184653/6ef9")) { + if (url.startsWith("https://agreement.dahehuoyun.com/goApp")) { Intent in = new Intent(ctx, FaceSuccActivity.class); - in.putExtra("isGoCar",isGoCar); + in.putExtra("isGoCar", isGoCar); startActivity(in); if (isGoCar) { ActivityUtils.finishToActivity(MainActivity.class, false); - }else{ + } else { finish(); } return true;