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.
package/lib/config/httpConfig.ts
CHANGED
@@ -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
|
-
|
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);
|
package/lib/utils/aesUtils.ts
CHANGED
@@ -20,12 +20,12 @@ const getAesRandomKey = () => {
|
|
20
20
|
/**
|
21
21
|
* aes加密
|
22
22
|
* @param aesKey
|
23
|
-
* @param
|
23
|
+
* @param originalData
|
24
24
|
*/
|
25
|
-
const aesEncrypt = (aesKey,
|
25
|
+
const aesEncrypt = (aesKey, originalData) => {
|
26
26
|
// 设置一个默认值,如果第二个参数为空采用默认值,不为空则采用新设置的密钥
|
27
27
|
var key = CryptoJS.enc.Utf8.parse(aesKey)
|
28
|
-
var srcs = CryptoJS.enc.Utf8.parse(
|
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
|
41
|
+
* @param originalData
|
42
42
|
*/
|
43
|
-
const aesDecrypt = (aesKey,
|
43
|
+
const aesDecrypt = (aesKey, originalData) => {
|
44
44
|
var key = CryptoJS.enc.Utf8.parse(aesKey)
|
45
|
-
var decrypt = CryptoJS.AES.decrypt(
|
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
@@ -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
|
});
|