w-ui-v1 1.0.57 → 1.0.59

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/utils/nfc.ts +6 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "w-ui-v1",
3
- "version": "1.0.57",
3
+ "version": "1.0.59",
4
4
  "description": "w-ui",
5
5
  "author": "wgxshh",
6
6
  "license": "ISC",
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
- for (let j = 0; j < inarray.length; j++) {
207
- const byte = BigInt(parseInt(inarray[j])) & BigInt(0xff);
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();
@@ -247,13 +249,13 @@ function writeData() {
247
249
  return;
248
250
  }
249
251
  readyWriteData = true;
250
- waiting = plus.nativeUI.showWaiting("请将NFC卡靠近!");
252
+ waiting = plus.nativeUI.showWaiting("请将卡靠近!");
251
253
  }
252
254
 
253
255
  function readData(getCardNo) {
254
256
  readyRead = true;
255
257
  _getCardNo = getCardNo
256
- waiting = plus.nativeUI.showWaiting("请将NFC卡靠近!", {
258
+ waiting = plus.nativeUI.showWaiting("请将卡靠近!", {
257
259
  modal: false
258
260
  });
259
261
  }