yuang-framework-ui-common 1.0.35 → 1.0.36

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.
@@ -65,7 +65,7 @@ http.interceptors.response.use(async (res: any) => {
65
65
  return Promise.reject(new Error(res?.data?.message));
66
66
  } else if (res?.data?.statusCode === 500822001) {
67
67
  clearGatewayConfig();
68
- showErrorMessage(messageMap.requestError || messageMap.requestError);
68
+ window.location.reload();
69
69
  return Promise.reject(new Error(res?.data?.message));
70
70
  } else if (res?.data?.statusCode === 500815001) {
71
71
  showErrorMessage(res?.data?.message || messageMap.requestError);
@@ -20,12 +20,12 @@ const getAesRandomKey = () => {
20
20
  /**
21
21
  * aes加密
22
22
  * @param aesKey
23
- * @param originData
23
+ * @param originalData
24
24
  */
25
- const aesEncrypt = (aesKey, originData) => {
25
+ const aesEncrypt = (aesKey, originalData) => {
26
26
  // 设置一个默认值,如果第二个参数为空采用默认值,不为空则采用新设置的密钥
27
27
  var key = CryptoJS.enc.Utf8.parse(aesKey)
28
- var srcs = CryptoJS.enc.Utf8.parse(originData)
28
+ var srcs = CryptoJS.enc.Utf8.parse(originalData)
29
29
  var encrypted = CryptoJS.AES.encrypt(srcs, key, {
30
30
  // 切记 需要和后端算法模式一致
31
31
  mode: CryptoJS.mode.ECB,
@@ -38,11 +38,11 @@ const aesEncrypt = (aesKey, originData) => {
38
38
  /**
39
39
  * aes解密
40
40
  * @param aesKey
41
- * @param originData
41
+ * @param originalData
42
42
  */
43
- const aesDecrypt = (aesKey, originData) => {
43
+ const aesDecrypt = (aesKey, originalData) => {
44
44
  var key = CryptoJS.enc.Utf8.parse(aesKey)
45
- var decrypt = CryptoJS.AES.decrypt(originData, key, {
45
+ var decrypt = CryptoJS.AES.decrypt(originalData, key, {
46
46
  // 切记 需要和后端算法模式一致
47
47
  mode: CryptoJS.mode.ECB,
48
48
  padding: CryptoJS.pad.Pkcs7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yuang-framework-ui-common",
3
- "version": "1.0.35",
3
+ "version": "1.0.36",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "scripts": {
@@ -8,7 +8,7 @@ const { proxy } = getCurrentInstance() as any;
8
8
 
9
9
 
10
10
  onMounted(() => {
11
- proxy.$http.get('/sso-api/standard/captcha/getCaptcha', { params: {} }).then((res: any) => {
11
+ proxy.$http.get('/sso-api/standard/framework-captcha/getCaptcha', { params: {} }).then((res: any) => {
12
12
 
13
13
  });
14
14
  })
@@ -23,7 +23,7 @@
23
23
  proxy.$http.get('/sso-api/client/auth/getSsoAccessToken', { params: { code: code } }).then((res: any) => {
24
24
  setSsoAccessToken(res.data.data);
25
25
  let redirectRoutePath = router.currentRoute.value.query.redirectRoutePath as string;
26
- redirectRoutePath = decodeURIComponent(redirectRoutePath) || ('/sso/login/login-success' as any);
26
+ redirectRoutePath = (redirectRoutePath && decodeURIComponent(redirectRoutePath)) || ('/sso/login/login-success' as any);
27
27
  router.push(redirectRoutePath);
28
28
  });
29
29
  });