@jctrans-materials/nuxt 1.0.12 → 1.0.14
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 +3 -3
- package/src/runtime/plugin.ts +4 -2
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jctrans-materials/nuxt",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.14",
|
|
5
5
|
"description": "Nuxt module for JCtrans UI components",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": "./src/module.ts"
|
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
"nuxt": "^3.0.0",
|
|
13
13
|
"vue": "^3.5.26",
|
|
14
14
|
"vue-router": "^4.6.4",
|
|
15
|
-
"@jctrans-materials/comps-vue3": "1.0.
|
|
15
|
+
"@jctrans-materials/comps-vue3": "1.0.14"
|
|
16
16
|
},
|
|
17
17
|
"peerDependencies": {
|
|
18
18
|
"nuxt": "^3.0.0",
|
|
19
|
-
"@jctrans-materials/comps-vue3": "1.0.
|
|
19
|
+
"@jctrans-materials/comps-vue3": "1.0.14"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@nuxt/module-builder": "latest"
|
package/src/runtime/plugin.ts
CHANGED
|
@@ -14,7 +14,9 @@ export default defineNuxtPlugin((nuxtApp) => {
|
|
|
14
14
|
// 1. 初始化静态配置
|
|
15
15
|
const finalBaseURL: string =
|
|
16
16
|
(runtimeConfig.public.PROD_CLIENT_PROXY_API as string) ||
|
|
17
|
-
sharedConfig.prefixPath
|
|
17
|
+
sharedConfig.prefixPath ||
|
|
18
|
+
"";
|
|
19
|
+
const LOGIN_PAGE = runtimeConfig.public.APP_LOGIN_PAGE;
|
|
18
20
|
|
|
19
21
|
// 1. 初始化静态配置(建议把最新的 URL 也更新进去)
|
|
20
22
|
initSharedConfig({
|
|
@@ -33,7 +35,7 @@ export default defineNuxtPlugin((nuxtApp) => {
|
|
|
33
35
|
const appId = sharedConfig.appId || getAppId();
|
|
34
36
|
const currentPath = encodeURIComponent(window.location.pathname);
|
|
35
37
|
// 跳转至登录
|
|
36
|
-
window.location.href = `https://passport.jctrans.com/login?appId=${appId}&path=${currentPath}`;
|
|
38
|
+
window.location.href = `${LOGIN_PAGE || `https://passport.jctrans.com`}/login?appId=${appId}&path=${currentPath}`;
|
|
37
39
|
}
|
|
38
40
|
},
|
|
39
41
|
});
|