@lambo-design/shared 1.0.0-beta.373 → 1.0.0-beta.374

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": "@lambo-design/shared",
3
- "version": "1.0.0-beta.373",
3
+ "version": "1.0.0-beta.374",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "author": "lambo",
@@ -26,8 +26,8 @@
26
26
  "nanoid": "^3.3.7",
27
27
  "node-rsa": "^1.1.1",
28
28
  "qs": "^6.11.0",
29
- "@lambo-design/xlsx-style": "^1.0.0-beta.9",
30
- "@lambo-design/xlsx": "^1.0.0-beta.2"
29
+ "@lambo-design/xlsx": "^1.0.0-beta.2",
30
+ "@lambo-design/xlsx-style": "^1.0.0-beta.9"
31
31
  },
32
32
  "devDependencies": {
33
33
  "vue": "^2.6.12"
@@ -8,4 +8,9 @@ headers.auth = {
8
8
  token: 'token'
9
9
  }
10
10
 
11
+ headers.ajaxHeader = {
12
+ HEADER_TIMESTAMP : 'X-Timestamp',
13
+ HEADER_NONCE : 'X-Nonce'
14
+ }
15
+
11
16
  export default headers
@@ -9,6 +9,7 @@ import cancelToken from "./cancel-token"
9
9
  import { isCancel,Cancel } from "axios";
10
10
  import Vue from "vue";
11
11
  import {CancelReason} from "./cancel-reason";
12
+ import {guid} from "../number";
12
13
  let timer1, timer2;
13
14
  let hasDialog = false;
14
15
 
@@ -28,6 +29,9 @@ function requestInterceptors(config) {
28
29
  config.headers[headers.tenant.systemType] = systemType;
29
30
  }
30
31
 
32
+ config.headers[headers.ajaxHeader.HEADER_TIMESTAMP] = new Date().getTime();
33
+ config.headers[headers.ajaxHeader.HEADER_NONCE] = guid();
34
+
31
35
  //sso_token认证
32
36
  if (params.hasOwnProperty('sso_token')||sessionStorage.getItem('sso_token')) {
33
37
  config.params = Object.assign({