vue-plugin-presets 3.12.10 → 3.12.91

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": "vue-plugin-presets",
3
- "version": "3.12.10",
3
+ "version": "3.12.91",
4
4
  "private": false,
5
5
  "main": "packages/utils/index.js",
6
6
  "scripts": {
@@ -31,7 +31,7 @@ export const ContentTypeEnum={
31
31
  }
32
32
 
33
33
  /**
34
- * header
34
+ * 请求header
35
35
  * @description: contentTyp
36
36
  */
37
37
  export const ConfigEnum={
@@ -40,15 +40,17 @@ export const ConfigEnum={
40
40
  // LICENSE_TOKEN
41
41
  LICENSE_TOKEN:'X-Access-License-Token',
42
42
  LICENSE_KEY:'X-Access-License-Key',
43
+ // DRAG_TOKEN
43
44
  DRAG_TOKEN:'Drag-Token',
44
45
  // TIMESTAMP
45
46
  TIMESTAMP:'X-TIMESTAMP',
46
47
  // Sign
47
48
  Sign:'X-Sign',
48
- // TENANT ID
49
+ // 租户id
49
50
  TENANT_ID:'tenant-id',
50
51
  // baseURL
51
52
  DRAG_BASE_URL:'drag-base-url',
52
- TEST_DOMAIN:'',
53
- TEST_TOKEN:'',
53
+ TEST_DOMAIN:'http://localhost:8080/jeecg-boot',
54
+ //测试Token
55
+ TEST_TOKEN:'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2NTEyMDI4NjYsInVzZXJuYW1lIjoiYWRtaW4ifQ.sJPoIdDZPwHR0yVPxsxMjHfZ2HfJseX84tjKDVPnYss',
54
56
  }
@@ -1,24 +1,22 @@
1
1
  import axios from 'axios';
2
2
  import { ConfigEnum } from '../enums/httpEnum.js';
3
3
  const service = axios.create({
4
- baseURL: localStorage.getItem(ConfigEnum.DRAG_BASE_URL),
4
+ baseURL: localStorage.getItem(ConfigEnum.DRAG_BASE_URL) || ConfigEnum.TEST_DOMAIN,
5
5
  });
6
-
7
- const decodedString00 = Buffer.from("6Z2e5rOV5o6I5p2DLOivt+mAmui/h+WQiOazlemAlOW+hOi/m+ihjOaOiOadg+azqOWGjA==", 'base64').toString('utf-8');
8
- const decodedString01 = Buffer.from("VlVFX0FQUF9MSUNFTlNFX1RPS0VO", 'base64').toString('utf-8');
9
- const decodedString02 = Buffer.from("bGljZW5zZS5qc29u", 'base64').toString('utf-8');
10
-
11
- // Add a request interceptor
6
+ // 添加请求拦截器
12
7
  service.interceptors.request.use(
13
8
  function (config) {
14
- let licenseData = require('../' + decodedString02);
9
+ let licenseData = require('../license.json');
15
10
  let checkLicense = licenseData.licenseToken;
16
11
  if (!checkLicense) {
17
- console.info(decodedString00)
12
+ console.info("非法授权,请通过合法途径进行授权注册")
18
13
  throw 'error';
19
14
  }
20
- config.headers[ConfigEnum.LICENSE_TOKEN] = process['env'][decodedString01];
21
- config.headers[ConfigEnum.TOKEN] = localStorage.getItem(ConfigEnum.DRAG_TOKEN);
15
+ //let jsEncrypt = new JSEncrypt();
16
+ //jsEncrypt.setPublicKey(licenseData.publicKey);
17
+ //let licenseToken = jsEncrypt.encrypt(licenseData.licenseToken);
18
+ config.headers[ConfigEnum.LICENSE_TOKEN] = process['env']['VUE_APP_LICENSE_TOKEN'];
19
+ config.headers[ConfigEnum.TOKEN] = localStorage.getItem(ConfigEnum.DRAG_TOKEN) || ConfigEnum.TEST_TOKEN;
22
20
  return config;
23
21
  },
24
22
  function (error) {
@@ -26,7 +24,7 @@ service.interceptors.request.use(
26
24
  }
27
25
  );
28
26
 
29
- // Add a response interceptor
27
+ // 添加响应拦截器
30
28
  service.interceptors.response.use(
31
29
  function (response) {
32
30
  return response;