yuang-framework-ui-common 1.0.57 → 1.0.59

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.
@@ -36,6 +36,7 @@ http.interceptors.request.use(async config => {
36
36
  if (!gatewayAccessToken && config.url != `${application.gatewayServerBaseUrl}/server/gateway-config/getGatewayConfig`) {
37
37
  await initGateway();
38
38
  }
39
+
39
40
  beforeRequestConfig(config);
40
41
  return config;
41
42
  }, error => {
@@ -150,6 +151,18 @@ const beforeRequestConfig = (config: any) => {
150
151
  if (ssoAccessToken) {
151
152
  config.headers["Sso-Access-Token"] = ssoAccessToken;
152
153
  }
154
+
155
+ let uimsApplicationCode = '';
156
+ if (config.url == `${application.gatewayServerBaseUrl}/sso-api/client/sso-user/getSsoIdentity`) {
157
+ uimsApplicationCode = config.params.uimsApplicationCode
158
+ setLocalStorageItem("uimsApplicationCode", uimsApplicationCode, 0);
159
+ } else{
160
+ uimsApplicationCode = getLocalStorageItem("uimsApplicationCode") ?? '';
161
+ }
162
+ if (uimsApplicationCode) {
163
+ config.headers["Uims-Application-Code"] = uimsApplicationCode;
164
+ }
165
+
153
166
  config.headers["Request-Id"] = new Date().getTime().toString() + (parseInt((Math.random() * 10000).toString())).toString();
154
167
  }
155
168
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yuang-framework-ui-common",
3
- "version": "1.0.57",
3
+ "version": "1.0.59",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "scripts": {
@@ -32,7 +32,7 @@
32
32
  });
33
33
  };
34
34
  const getSsoIdentity = () => {
35
- http.get(`${application.gatewayServerBaseUrl}/sso-api/client/sso-user/getSsoIdentity`, { params: { ssoClientAccount: 'yuang-sso' } }).then((res: any) => {
35
+ http.get(`${application.gatewayServerBaseUrl}/sso-api/client/sso-user/getSsoIdentity`, { params: { uimsApplicationCode: 'yuang-sso-ui-pc' } }).then((res: any) => {
36
36
  ssoData.ssoIdentity = res.data.data;
37
37
  console.log('ssoIdentity', ssoData.ssoIdentity);
38
38
  ElMessage.success('获取成功');