From 2fece6551faab0402e7ed53658a60d2256e7a5be Mon Sep 17 00:00:00 2001
From: zuoxiao <470321431@qq.com>
Date: 星期四, 12 六月 2025 14:58:56 +0800
Subject: [PATCH] feat(generallibrary): 新增挂失功能并优化相关界面- 新增 LossCardActivity 和 CardWriteSuccessActivity - 实现卡片挂失功能和写卡成功页面 - 优化充值界面布局- 调整卡片信息显示逻辑 - 修复部分 UI样式问题

---
 baselibrary/src/main/java/com/dayu/baselibrary/tools/nfc/NativeNfcReadHelper.java |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/baselibrary/src/main/java/com/dayu/baselibrary/tools/nfc/NativeNfcReadHelper.java b/baselibrary/src/main/java/com/dayu/baselibrary/tools/nfc/NativeNfcReadHelper.java
index 4c8aa09..ef74114 100644
--- a/baselibrary/src/main/java/com/dayu/baselibrary/tools/nfc/NativeNfcReadHelper.java
+++ b/baselibrary/src/main/java/com/dayu/baselibrary/tools/nfc/NativeNfcReadHelper.java
@@ -31,8 +31,6 @@
     private static NativeNfcReadHelper helper;
 
 
-    public NativeNfcReadHelper(Intent intent, Activity activity) {
-    }
 
 
     @Override
@@ -49,7 +47,7 @@
      */
     public static NativeNfcReadHelper getInstence(Intent intent, Activity activity) {
         if (helper == null) {
-            helper = new NativeNfcReadHelper(intent, activity);
+            helper = new NativeNfcReadHelper();
         }
         helper.setIntent(intent);
         return helper;
@@ -387,6 +385,9 @@
 
     @Override
     public String getCardNumber() {
+        if (tag == null) {
+            return "";
+        }
         MifareClassic mfc = MifareClassic.get(tag);
         if (null != mfc) {
             try {
@@ -434,7 +435,13 @@
     }
 
 
+
+
+
     public String getCardNumberNoClose() {
+        if (tag == null) {
+            return "";
+        }
         MifareClassic mfc = MifareClassic.get(tag);
         if (null != mfc) {
             try {
@@ -667,4 +674,6 @@
         }
         return null;
     }
+
+
 }

--
Gitblit v1.8.0