vue2-client 1.11.6-alpha.1 → 1.11.6-alpha.3

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": "vue2-client",
3
- "version": "1.11.6-alpha.1",
3
+ "version": "1.11.6-alpha.3",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
@@ -11,7 +11,7 @@ import qs from 'qs'
11
11
  import { logout, V4RefreshToken } from '@vue2-client/services/user'
12
12
  import { LOGIN, SEARCH, V4_LOGIN } from '@vue2-client/services/apiService'
13
13
  import { setV4AccessToken } from '@vue2-client/utils/login'
14
-
14
+ import EncryptUtil from '@vue2-client/utils/EncryptUtil'
15
15
  // 是否显示重新登录
16
16
  let isReloginShow
17
17
 
@@ -161,14 +161,13 @@ function loadInterceptors () {
161
161
  }
162
162
  }
163
163
 
164
- const v4SessionKey = '224b184e1059343a8cfd536e54e57d9f'
165
-
164
+ const v4SessionKey = localStorage.getItem(V4_SESSION_KEY)
166
165
  if (['post'].includes(config.method.toLowerCase()) && v4SessionKey &&
167
166
  !config.url.includes('/logic/openapi/') &&
168
167
  !config.url.includes('auth/login')) {
169
168
  if (config.data && !(config.data instanceof FormData)) {
170
169
  config.data = {
171
- encrypted: encryptData(config.data, v4SessionKey)
170
+ encrypted: EncryptUtil.AESEncryptCBC(config.data, v4SessionKey)
172
171
  }
173
172
  config.headers['X-Sec'] = '1'
174
173
  config.headers['X-Rand'] = Math.random().toString(36).substr(2, 5)