Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
csbr-daop
/
fe-data-trusted-space
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
864664a1
authored
2025-06-13 14:46:34 +0800
by
lxs
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
通过config.js配置appKey
1 parent
671191c1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
1 deletions
index.html
public/config.js
src/store/modules/user.ts
src/types/global.d.ts
index.html
View file @
864664a
...
...
@@ -12,6 +12,7 @@
<meta
http-equiv=
"Cache"
content=
"no-cache"
>
<meta
name=
"Keywords"
content=
"数据资产服务平台-服务于央国企、上市公司、拟上市公司的数据要素登记流通服务"
>
<meta
name=
"description"
content=
"数据资产服务平台,服务于央国企、上市公司、拟上市公司的数据要素登记流通服务。数据资产服务平台提供最专业、权威的数据要素资产登记服务、入表服务、交易流通服务、金融服务和治理及挖掘服务,旨在激活央国企、上市公司、拟上市公司的数据流通体系,释放数据要素新质生产力。"
>
<script
src=
"./public/config.js"
></script>
<title>
%VITE_APP_TITLE%
</title>
</head>
<body
class=
"over-hidden"
>
...
...
@@ -46,5 +47,6 @@
}
</script>
<script
type=
"module"
src=
"/src/main.ts"
></script>
</body>
</html>
...
...
public/config.js
0 → 100644
View file @
864664a
system
.
__APP_CONFIG__
=
{
appKey
:
'672c2c38e4b0cac8732a6106'
,
}
src/store/modules/user.ts
View file @
864664a
...
...
@@ -33,7 +33,8 @@ const useUserStore = defineStore(
function
getToken
(
data
,
state
)
{
data
.
platformGuid
=
"7f16f697aec111ef8656fa163e60becd"
;
data
.
userType
=
2
;
data
.
appKey
=
'672c2c38e4b0cac8732a6106'
;
// data.appKey = '672c2c38e4b0cac8732a6106';
data
.
appKey
=
system
.
__APP_CONFIG__
.
appKey
;
data
.
validateUri
=
location
.
origin
==
'http://localhost:9000'
?
'http://localhost:9000/'
:
location
.
origin
+
'/'
;
return
getTokenPromise
.
value
=
getTokenByCode
(
data
).
then
((
res
:
any
)
=>
{
getTokenPromise
.
value
=
null
;
...
...
src/types/global.d.ts
View file @
864664a
...
...
@@ -275,3 +275,12 @@ declare namespace Menu {
children
:
recordRaw
[]
}
}
// 配置appKey
declare
global
{
interface
System
{
__APP_CONFIG__
:
{
appKey
:
string
};
}
}
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment