adtec-core-package 1.6.6 → 1.6.7

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": "adtec-core-package",
3
- "version": "1.6.6",
3
+ "version": "1.6.7",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "scripts": {
@@ -10,6 +10,8 @@ import { v4 as uuidv4 } from 'uuid'
10
10
  import encrypt from './encrypt'
11
11
  // @ts-ignore
12
12
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
13
+ // @ts-ignore
14
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
13
15
 
14
16
  import { Md5 } from 'ts-md5'
15
17
  import { ElMessage } from 'element-plus'
@@ -52,13 +54,8 @@ function setHeaders(config: any) {
52
54
 
53
55
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
54
56
  // @ts-ignore
55
- dataJson = dataJson
56
- .replaceAll('"', '')
57
- .replaceAll(',', '')
58
- .replaceAll(':', '')
59
- .replaceAll('.', '')
60
- .replaceAll('/', '')
61
- dataJson = dataJson.split('').sort().join('')
57
+ dataJson=dataJson.replace(/[^\u4E00-\u9FA5A-Za-z0-9]/g, '')
58
+ dataJson = dataJson.split('').sort().join('').trim()
62
59
  config.headers.sessionId = sessionStorage.getItem('sessionId')
63
60
  config.headers.Authorization = Authorization
64
61
  config.headers.signa = Md5.hashStr(Authorization + signa + dataJson)