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.
- package/package.json +1 -1
- package/utils/nfc.ts +6 -4
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();
|
|
@@ -247,13 +249,13 @@ function writeData() {
|
|
|
247
249
|
return;
|
|
248
250
|
}
|
|
249
251
|
readyWriteData = true;
|
|
250
|
-
waiting = plus.nativeUI.showWaiting("
|
|
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("
|
|
258
|
+
waiting = plus.nativeUI.showWaiting("请将卡靠近!", {
|
|
257
259
|
modal: false
|
|
258
260
|
});
|
|
259
261
|
}
|