From 03de8a211b53b98feb9d8141fe9c2aeb369cfe5f Mon Sep 17 00:00:00 2001 From: Zamir SUN Date: Sun, 15 Mar 2026 15:49:55 +0800 Subject: [PATCH 1/3] Fix Octopus support by enable reading ISO-18092 cards Signed-off-by: Zamir SUN --- assets/read.js | 8 +++++--- lib/main.dart | 6 ++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/assets/read.js b/assets/read.js index 2e8a74d..e522709 100644 --- a/assets/read.js +++ b/assets/read.js @@ -840,9 +840,11 @@ returnMap = { ...returnMap, ...subCard }; } } - if (tag.type === "felica" && tag.systemCode === "8008") { - // Octopus - return await ReadOctopus(); + if (tag.type === "iso18092") { + if (tag.systemCode === "8008") { + // Octopus + return await ReadOctopus(); + } } else if (tag.type === "mifare_ultralight") { return await ReadMifareUltralight(); } else if (tag.type === "mifare_plus") { diff --git a/lib/main.dart b/lib/main.dart index b5ca9f2..baf87e2 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -153,8 +153,10 @@ class _PlatformAdaptingHomePageState extends State { case 'poll': error = null; try { - final tag = - await FlutterNfcKit.poll(iosAlertMessage: S(context).waitForCard); + final tag = await FlutterNfcKit.poll( + iosAlertMessage: S(context).waitForCard, + readIso18092: true, + ); final json = tag.toJson(); // try to read ndef and insert into json From 3992f33081d086ba63805fd7de878a4670fcad1c Mon Sep 17 00:00:00 2001 From: Zamir SUN Date: Sun, 5 Apr 2026 22:52:26 +0800 Subject: [PATCH 2/3] read.js: Fix TransWuhan card number length Signed-off-by: Zamir SUN --- assets/read.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/read.js b/assets/read.js index e522709..0d2e9eb 100644 --- a/assets/read.js +++ b/assets/read.js @@ -319,7 +319,7 @@ let ReadTransWuhan = async (fci) => { let f15 = await BasicInfoFile(fci); if (!f15) return {}; - const number = f15.slice(24, 40); + const number = f15.slice(31, 40); const issue_date = f15.slice(40, 48); const expiry_date = f15.slice(48, 56); const balance_atc_trans = await ReadPBOCBalanceATCAndTrans(); From 6348df84aeafe0689f192e713f32b128f015e095 Mon Sep 17 00:00:00 2001 From: Zamir SUN Date: Sun, 5 Apr 2026 22:57:36 +0800 Subject: [PATCH 3/3] =?UTF-8?q?codes.js:=20=E5=A2=9E=E5=8A=A0=20=E5=91=BC?= =?UTF-8?q?=E5=92=8C=E6=B5=A9=E7=89=B9=E5=9C=B0=E9=93=81=E5=82=A8=E5=80=BC?= =?UTF-8?q?=E5=8D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Zamir SUN --- assets/codes.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/codes.js b/assets/codes.js index 33e6e34..b63e7f6 100644 --- a/assets/codes.js +++ b/assets/codes.js @@ -82,7 +82,8 @@ ChinaPostCode = { "A004": "全国景区一卡通", "4000": "重庆", "2500": "山东一卡通", -"9000": "济南" +"9000": "济南", +"0003": "呼和浩特地铁" }; UnionPayRegion = { "1200": "河北省",