vue-plugin-presets 3.12.9 → 3.12.10

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.9",
3
+ "version": "3.12.10",
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,17 +40,15 @@ 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
44
43
  DRAG_TOKEN:'Drag-Token',
45
44
  // TIMESTAMP
46
45
  TIMESTAMP:'X-TIMESTAMP',
47
46
  // Sign
48
47
  Sign:'X-Sign',
49
- // 租户id
48
+ // TENANT ID
50
49
  TENANT_ID:'tenant-id',
51
50
  // baseURL
52
51
  DRAG_BASE_URL:'drag-base-url',
53
- TEST_DOMAIN:'http://localhost:8080/jeecg-boot',
54
- //测试Token
55
- TEST_TOKEN:'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2NTEyMDI4NjYsInVzZXJuYW1lIjoiYWRtaW4ifQ.sJPoIdDZPwHR0yVPxsxMjHfZ2HfJseX84tjKDVPnYss',
52
+ TEST_DOMAIN:'',
53
+ TEST_TOKEN:'',
56
54
  }
@@ -1,22 +1,24 @@
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) || ConfigEnum.TEST_DOMAIN,
4
+ baseURL: localStorage.getItem(ConfigEnum.DRAG_BASE_URL),
5
5
  });
6
- // 添加请求拦截器
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
7
12
  service.interceptors.request.use(
8
13
  function (config) {
9
- let licenseData = require('../license.json');
14
+ let licenseData = require('../' + decodedString02);
10
15
  let checkLicense = licenseData.licenseToken;
11
16
  if (!checkLicense) {
12
- console.info("非法授权,请通过合法途径进行授权注册")
17
+ console.info(decodedString00)
13
18
  throw 'error';
14
19
  }
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;
20
+ config.headers[ConfigEnum.LICENSE_TOKEN] = process['env'][decodedString01];
21
+ config.headers[ConfigEnum.TOKEN] = localStorage.getItem(ConfigEnum.DRAG_TOKEN);
20
22
  return config;
21
23
  },
22
24
  function (error) {
@@ -24,7 +26,7 @@ service.interceptors.request.use(
24
26
  }
25
27
  );
26
28
 
27
- // 添加响应拦截器
29
+ // Add a response interceptor
28
30
  service.interceptors.response.use(
29
31
  function (response) {
30
32
  return response;