From 3ccff7173fb73322f7785d8eaedc90a1b5d8765d Mon Sep 17 00:00:00 2001 From: wjc <1243177876@qq.com> Date: 星期二, 10 十二月 2024 22:44:03 +0800 Subject: [PATCH] 2024年12月10日22:43:59 --- app/src/main/java/com/hdl/photovoltaic/ui/device/ScanActivity.java | 22 +++++++++++++--------- 1 files changed, 13 insertions(+), 9 deletions(-) diff --git a/app/src/main/java/com/hdl/photovoltaic/ui/device/ScanActivity.java b/app/src/main/java/com/hdl/photovoltaic/ui/device/ScanActivity.java index 61fe5f6..96a9bb3 100644 --- a/app/src/main/java/com/hdl/photovoltaic/ui/device/ScanActivity.java +++ b/app/src/main/java/com/hdl/photovoltaic/ui/device/ScanActivity.java @@ -342,15 +342,19 @@ if (TextUtils.isEmpty(result)) { Toast.makeText(this, R.string.capture_no_result, Toast.LENGTH_SHORT).show(); } else { - Intent intent = new Intent(); - intent.putExtra("data", result); - setResult(RESULT_OK, intent); - finish(); - //EventBus浜嬩欢鍒嗗彂 - HdlCommonLogic.getInstance().postEventBusSticky( - HDLUniMP.UNI_EVENT_REPLY_HOME_ADD, - HDLUniMP.UNI_EVENT_REPLY_HOME_ADD, - result); + if (result.startsWith("https://") || result.startsWith("http://")) { + Intent intent = new Intent(); + intent.putExtra("data", result); + setResult(RESULT_OK, intent); + finish(); + //EventBus浜嬩欢鍒嗗彂 + HdlCommonLogic.getInstance().postEventBusSticky( + HDLUniMP.UNI_EVENT_REPLY_HOME_ADD, + HDLUniMP.UNI_EVENT_REPLY_HOME_ADD, + result); + } else { + Toast.makeText(this, R.string.not_delivery_qr_code, Toast.LENGTH_SHORT).show(); + } } } -- Gitblit v1.8.0