w-ui-v1 1.1.17 → 1.1.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/utils/nfc.ts +12 -10
package/package.json
CHANGED
package/utils/nfc.ts
CHANGED
|
@@ -211,17 +211,19 @@ function __read(intent) {
|
|
|
211
211
|
// }
|
|
212
212
|
// return result.toString();
|
|
213
213
|
// }
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
214
|
+
|
|
215
|
+
function bytesToDecimalString(inarray) {
|
|
216
|
+
let result = BigInt(0);
|
|
217
|
+
|
|
218
|
+
// 反转数组以适配大端序
|
|
219
|
+
const reversed = [...inarray].reverse();
|
|
220
|
+
for (let j = 0; j < reversed.length; j++) {
|
|
221
|
+
const byte = BigInt(parseInt(reversed[j])) & BigInt(0xff);
|
|
222
|
+
result = (result << BigInt(8)) | byte;
|
|
223
|
+
}
|
|
224
|
+
return result.toString().padStart(10, '0');
|
|
224
225
|
}
|
|
226
|
+
|
|
225
227
|
|
|
226
228
|
function reverseTwo(str) {
|
|
227
229
|
|