From 1863007fd5fc407af48a27c47362e0b1345b668a Mon Sep 17 00:00:00 2001 From: wjc <1243177876@qq.com> Date: 星期一, 23 十二月 2024 20:51:33 +0800 Subject: [PATCH] (修改新主题)2024年12月23日20:51:09 --- 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