通过config.js配置appKey
Showing
4 changed files
with
16 additions
and
1 deletions
| ... | @@ -12,6 +12,7 @@ | ... | @@ -12,6 +12,7 @@ |
| 12 | <meta http-equiv="Cache" content="no-cache"> | 12 | <meta http-equiv="Cache" content="no-cache"> |
| 13 | <meta name="Keywords" content="数据资产服务平台-服务于央国企、上市公司、拟上市公司的数据要素登记流通服务"> | 13 | <meta name="Keywords" content="数据资产服务平台-服务于央国企、上市公司、拟上市公司的数据要素登记流通服务"> |
| 14 | <meta name="description" content="数据资产服务平台,服务于央国企、上市公司、拟上市公司的数据要素登记流通服务。数据资产服务平台提供最专业、权威的数据要素资产登记服务、入表服务、交易流通服务、金融服务和治理及挖掘服务,旨在激活央国企、上市公司、拟上市公司的数据流通体系,释放数据要素新质生产力。"> | 14 | <meta name="description" content="数据资产服务平台,服务于央国企、上市公司、拟上市公司的数据要素登记流通服务。数据资产服务平台提供最专业、权威的数据要素资产登记服务、入表服务、交易流通服务、金融服务和治理及挖掘服务,旨在激活央国企、上市公司、拟上市公司的数据流通体系,释放数据要素新质生产力。"> |
| 15 | <script src="./public/config.js"></script> | ||
| 15 | <title>%VITE_APP_TITLE%</title> | 16 | <title>%VITE_APP_TITLE%</title> |
| 16 | </head> | 17 | </head> |
| 17 | <body class="over-hidden"> | 18 | <body class="over-hidden"> |
| ... | @@ -46,5 +47,6 @@ | ... | @@ -46,5 +47,6 @@ |
| 46 | } | 47 | } |
| 47 | </script> | 48 | </script> |
| 48 | <script type="module" src="/src/main.ts"></script> | 49 | <script type="module" src="/src/main.ts"></script> |
| 50 | |||
| 49 | </body> | 51 | </body> |
| 50 | </html> | 52 | </html> | ... | ... |
public/config.js
0 → 100644
| ... | @@ -33,7 +33,8 @@ const useUserStore = defineStore( | ... | @@ -33,7 +33,8 @@ const useUserStore = defineStore( |
| 33 | function getToken(data, state) { | 33 | function getToken(data, state) { |
| 34 | data.platformGuid = "7f16f697aec111ef8656fa163e60becd"; | 34 | data.platformGuid = "7f16f697aec111ef8656fa163e60becd"; |
| 35 | data.userType = 2; | 35 | data.userType = 2; |
| 36 | data.appKey = '672c2c38e4b0cac8732a6106'; | 36 | // data.appKey = '672c2c38e4b0cac8732a6106'; |
| 37 | data.appKey = system.__APP_CONFIG__.appKey; | ||
| 37 | data.validateUri = location.origin == 'http://localhost:9000' ? 'http://localhost:9000/' : location.origin + '/'; | 38 | data.validateUri = location.origin == 'http://localhost:9000' ? 'http://localhost:9000/' : location.origin + '/'; |
| 38 | return getTokenPromise.value = getTokenByCode(data).then((res: any) => { | 39 | return getTokenPromise.value = getTokenByCode(data).then((res: any) => { |
| 39 | getTokenPromise.value = null; | 40 | getTokenPromise.value = null; | ... | ... |
| ... | @@ -275,3 +275,12 @@ declare namespace Menu { | ... | @@ -275,3 +275,12 @@ declare namespace Menu { |
| 275 | children: recordRaw[] | 275 | children: recordRaw[] |
| 276 | } | 276 | } |
| 277 | } | 277 | } |
| 278 | |||
| 279 | // 配置appKey | ||
| 280 | declare global { | ||
| 281 | interface System { | ||
| 282 | __APP_CONFIG__: { | ||
| 283 | appKey: string | ||
| 284 | }; | ||
| 285 | } | ||
| 286 | } | ... | ... |
-
Please register or sign in to post a comment