w-ui-v1 1.1.17 → 1.1.18
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 +13 -10
package/package.json
CHANGED
package/utils/nfc.ts
CHANGED
|
@@ -211,17 +211,20 @@ 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
|
+
let resultStr=""
|
|
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
|
+
resultStr=resultStr+((result << BigInt(8)) | byte)
|
|
223
|
+
result = (result << BigInt(8)) | byte;
|
|
224
|
+
}
|
|
225
|
+
return resultStr;
|
|
224
226
|
}
|
|
227
|
+
|
|
225
228
|
|
|
226
229
|
function reverseTwo(str) {
|
|
227
230
|
|