w-ui-v1 1.1.15 → 1.1.17

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "w-ui-v1",
3
- "version": "1.1.15",
3
+ "version": "1.1.17",
4
4
  "description": "w-ui",
5
5
  "author": "wgxshh",
6
6
  "license": "ISC",
package/utils/nfc.ts CHANGED
@@ -201,15 +201,26 @@ function __read(intent) {
201
201
  // }
202
202
  // return out;
203
203
  // }
204
- function bytesToDecimalString(inarray) {
205
- let result = BigInt(0);
206
- // 反转数组以适配大端序
207
- const reversed = [...inarray].reverse();
208
- for (let j = 0; j < reversed.length; j++) {
209
- const byte = BigInt(parseInt(reversed[j])) & BigInt(0xff);
210
- result = (result << BigInt(8)) | byte;
211
- }
212
- return result.toString();
204
+ // function bytesToDecimalString(inarray) {
205
+ // let result = BigInt(0);
206
+ // // 反转数组以适配大端序
207
+ // const reversed = [...inarray].reverse();
208
+ // for (let j = 0; j < reversed.length; j++) {
209
+ // const byte = BigInt(parseInt(reversed[j])) & BigInt(0xff);
210
+ // result = (result << BigInt(8)) | byte;
211
+ // }
212
+ // return result.toString();
213
+ // }
214
+ function bytesToDecimalString(inarray) {
215
+ let result = '';
216
+ // 处理每个字节(保持原始顺序)
217
+ for (let j = 0; j < inarray.length; j++) {
218
+ // 解析当前字节值并确保在0-255范围内
219
+ const byteValue = parseInt(inarray[j]) & 0xFF;
220
+ // 转换为三位字符串(不足三位补零)
221
+ result += byteValue.toString().padStart(3, '0');
222
+ }
223
+ return result;
213
224
  }
214
225
 
215
226
  function reverseTwo(str) {
@@ -7,6 +7,7 @@
7
7
  defineOptions({
8
8
  name: 'WLogin',
9
9
  })
10
+
10
11
  // 定义props
11
12
  const props = defineProps({
12
13
  // 图片
@@ -18,6 +19,10 @@
18
19
  type: Boolean,
19
20
  default: false,
20
21
  },
22
+ loginload:{
23
+ type: Function,
24
+ default:null
25
+ }
21
26
  })
22
27
  onMounted(() => {
23
28
  getPublicKey()
@@ -71,6 +76,7 @@
71
76
  uni.setStorageSync('userInfo', {
72
77
  ...data.user
73
78
  })
79
+ props.loginload&&props.loginload({...data.user})
74
80
  })
75
81
 
76
82
  uni.reLaunch({