w-ui-v1 1.0.57 → 1.0.58
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 +4 -2
package/package.json
CHANGED
package/utils/nfc.ts
CHANGED
|
@@ -203,8 +203,10 @@ function __read(intent) {
|
|
|
203
203
|
// }
|
|
204
204
|
function bytesToDecimalString(inarray) {
|
|
205
205
|
let result = BigInt(0);
|
|
206
|
-
|
|
207
|
-
|
|
206
|
+
// 反转数组以适配大端序
|
|
207
|
+
const reversed = [...inarray].reverse();
|
|
208
|
+
for (let j = 0; j < reversed.length; j++) {
|
|
209
|
+
const byte = BigInt(parseInt(reversed[j])) & BigInt(0xff);
|
|
208
210
|
result = (result << BigInt(8)) | byte;
|
|
209
211
|
}
|
|
210
212
|
return result.toString();
|