yuang-framework-ui-common 1.0.85 → 1.0.87

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.
@@ -163,8 +163,12 @@ const beforeRequestConfig = (config: any) => {
163
163
  config.headers["Sso-Access-Token"] = ssoAccessToken;
164
164
  }
165
165
 
166
- config.headers["Uims-Application-Code"] = application.uimsApplicationCode;
167
-
166
+ let uimsApplicationCode = getLocalStorageItem("uimsApplicationCode") ?? '';
167
+ if(uimsApplicationCode){
168
+ config.headers["Uims-Application-Code"] = uimsApplicationCode;
169
+ } else {
170
+ config.headers["Uims-Application-Code"] = application.uimsApplicationCode;
171
+ }
168
172
  config.headers["Request-Id"] = new Date().getTime().toString() + (parseInt((Math.random() * 10000).toString())).toString();
169
173
  }
170
174
 
@@ -2,6 +2,7 @@ const getExceptionRoutes = () => {
2
2
  return [
3
3
  {
4
4
  path: '/exception/403',
5
+ name: 'exception-403',
5
6
  component: () => import('../../src/views/exception/403/index.vue'),
6
7
  meta: {
7
8
  title: '403'
@@ -9,6 +10,7 @@ const getExceptionRoutes = () => {
9
10
  },
10
11
  {
11
12
  path: '/exception/500',
13
+ name: 'exception-500',
12
14
  component: () => import('../../src/views/exception/500/index.vue'),
13
15
  meta: {
14
16
  title: '500'
@@ -16,6 +18,7 @@ const getExceptionRoutes = () => {
16
18
  },
17
19
  {
18
20
  path: '/:path(.*)*',
21
+ name: 'exception-404',
19
22
  component: () => import('../../src/views/exception/404/index.vue'),
20
23
  meta: {
21
24
  title: '404'
@@ -140,19 +140,19 @@ const setSsoAccessToken = (param: any) => {
140
140
  if (!param.ssoAccessToken) {
141
141
  throw new Error('参数[ssoAccessToken]为空');
142
142
  }
143
- if (!param.ssoExpiresIn) {
144
- throw new Error('参数[ssoExpiresIn]为空');
143
+ if (!param.ssoAccessTokenExpiresIn) {
144
+ throw new Error('参数[ssoAccessTokenExpiresIn]为空');
145
145
  }
146
146
  if (!param.ssoRefreshToken) {
147
147
  throw new Error('参数[ssoRefreshToken]为空');
148
148
  }
149
- if (!param.ssoRefreshExpiresIn) {
150
- throw new Error('参数[ssoRefreshExpiresIn]为空');
149
+ if (!param.ssoRefreshTokenExpiresIn) {
150
+ throw new Error('参数[ssoRefreshTokenExpiresIn]为空');
151
151
  }
152
152
  Cookies.set(ssoAccessTokenCookieKey, param.ssoAccessToken);
153
153
 
154
- setLocalStorageItem(ssoAccessTokenLocalKey, param.ssoAccessToken, param.ssoExpiresIn);
155
- setLocalStorageItem(ssoRefreshTokenLocalKey, param.ssoRefreshToken, param.ssoRefreshExpiresIn);
154
+ setLocalStorageItem(ssoAccessTokenLocalKey, param.ssoAccessToken, param.ssoAccessTokenExpiresIn);
155
+ setLocalStorageItem(ssoRefreshTokenLocalKey, param.ssoRefreshToken, param.ssoRefreshTokenExpiresIn);
156
156
 
157
157
  }
158
158
 
@@ -168,14 +168,14 @@ const setSsoCookieAccessToken = (param: any) => {
168
168
  if (!param.ssoAccessToken) {
169
169
  throw new Error('参数[ssoAccessToken]为空');
170
170
  }
171
- if (!param.ssoExpiresIn) {
172
- throw new Error('参数[ssoExpiresIn]为空');
171
+ if (!param.ssoAccessTokenExpiresIn) {
172
+ throw new Error('参数[ssoAccessTokenExpiresIn]为空');
173
173
  }
174
174
  if (!param.ssoRefreshToken) {
175
175
  throw new Error('参数[ssoRefreshToken]为空');
176
176
  }
177
- if (!param.ssoRefreshExpiresIn) {
178
- throw new Error('参数[ssoRefreshExpiresIn]为空');
177
+ if (!param.ssoRefreshTokenExpiresIn) {
178
+ throw new Error('参数[ssoRefreshTokenExpiresIn]为空');
179
179
  }
180
180
  Cookies.set(ssoAccessTokenCookieKey, param.ssoAccessToken);
181
181
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yuang-framework-ui-common",
3
- "version": "1.0.85",
3
+ "version": "1.0.87",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "scripts": {