From 3e904bfa8a1bb53dcf461e5c717f9b808e179245 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期三, 08 一月 2025 16:27:48 +0800
Subject: [PATCH] 2025年01月08日16:27:46
---
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