Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
holo-web
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xinkong
holo-web
Commits
6cba1d4d
Commit
6cba1d4d
authored
Apr 07, 2025
by
txy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
统一门户添加神思平台
parent
9ef197db
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
59 additions
and
9 deletions
+59
-9
package.json
login/package.json
+1
-0
index.vue
login/src/components/navigator/index.vue
+29
-4
index.vue
login/src/views/navigation/index.vue
+29
-5
No files found.
login/package.json
View file @
6cba1d4d
...
...
@@ -30,6 +30,7 @@
],
"dependencies"
:
{
"element-ui"
:
"^2.15.13"
,
"sm-crypto"
:
"^0.3.13"
,
"vue"
:
"^2.6.11"
,
"vue-clipboard2"
:
"^0.3.1"
,
"vue-router"
:
"^3.4.6"
,
...
...
login/src/components/navigator/index.vue
View file @
6cba1d4d
...
...
@@ -47,6 +47,7 @@
import
AuthDao
from
"
@/dao/auth
"
;
import
portalSelect
from
"
@/components/portalSelect
"
;
import
{
sm2
}
from
'
sm-crypto
'
let
timer
=
null
;
...
...
@@ -148,20 +149,44 @@ export default {
},
4000
);
}
},
// 处理神思超融合平台
encrypt
()
{
const
loginData
=
{
username
:
'
ssoUser
'
,
password
:
'
sso@VMS0403!
'
,
timeStamp
:
new
Date
().
getTime
()
}
console
.
log
(
"
loginDat
"
,
loginData
);
const
publicKey
=
'
046498fdd8eced560c57da1f8ceed865802560a883b8251ef2022597330f37fe7cdc824aa659ac37b0f91dc032b85060167ed48d205cb66df54bad596b596698ad
'
// 将loginData对象转换为JSON字符串
const
jsonData
=
JSON
.
stringify
(
loginData
)
// 加密
return
sm2
.
doEncrypt
(
jsonData
,
publicKey
,
'
1
'
)
// 加密结果
},
// 单击点击跳转路由
linkTo
(
item
)
{
console
.
log
(
item
)
clearTimeout
(
timer
);
timer
=
setTimeout
(()
=>
{
const
{
url
}
=
item
;
window
.
location
.
href
=
url
;
if
(
item
.
id
==
'
E59FB13BCE634475829F13DA3865502C
'
){
window
.
location
.
href
=
`https://37.8.219.231/#/?encryptAuth=
${
this
.
encrypt
()}
`
}
else
{
const
{
url
}
=
item
;
window
.
location
.
href
=
url
;
}
},
300
);
},
// 双击打开新窗口
dblclickLinkTo
(
item
)
{
clearTimeout
(
timer
);
const
{
url
}
=
item
;
window
.
open
(
url
);
if
(
item
.
id
==
'
E59FB13BCE634475829F13DA3865502C
'
){
window
.
open
(
`https://37.8.219.231/#/?encryptAuth=
${
this
.
encrypt
()}
`
)
}
else
{
const
{
url
}
=
item
;
window
.
open
(
url
);
}
},
}
};
...
...
login/src/views/navigation/index.vue
View file @
6cba1d4d
...
...
@@ -45,6 +45,7 @@
import
Navigator
from
"
@/components/navigator
"
;
import
*
as
URL
from
"
@/config/url
"
;
import
AuthDao
from
"
@/dao/auth
"
;
import
{
sm2
}
from
'
sm-crypto
'
let
timer
=
null
;
...
...
@@ -98,20 +99,43 @@ export default {
close
()
{
this
.
$router
.
push
(
URL
.
LOGIN
);
},
// 处理神思超融合平台
encrypt
()
{
const
loginData
=
{
username
:
'
ssoUser
'
,
password
:
'
sso@VMS0403!
'
,
timeStamp
:
new
Date
().
getTime
()
}
console
.
log
(
"
loginDat
"
,
loginData
);
const
publicKey
=
'
046498fdd8eced560c57da1f8ceed865802560a883b8251ef2022597330f37fe7cdc824aa659ac37b0f91dc032b85060167ed48d205cb66df54bad596b596698ad
'
// 将loginData对象转换为JSON字符串
const
jsonData
=
JSON
.
stringify
(
loginData
)
// 加密
return
sm2
.
doEncrypt
(
jsonData
,
publicKey
,
'
1
'
)
// 加密结果
},
// 单击点击跳转路由
linkTo
(
item
)
{
console
.
log
(
item
)
clearTimeout
(
timer
);
timer
=
setTimeout
(()
=>
{
const
{
url
}
=
item
;
window
.
location
.
href
=
url
;
if
(
item
.
id
==
'
E59FB13BCE634475829F13DA3865502C
'
){
window
.
location
.
href
=
`https://37.8.219.231/#/?encryptAuth=
${
this
.
encrypt
()}
`
}
else
{
const
{
url
}
=
item
;
window
.
location
.
href
=
url
;
}
},
300
);
},
// 双击打开新窗口
dblclickLinkTo
(
item
)
{
clearTimeout
(
timer
);
const
{
url
}
=
item
;
window
.
open
(
url
);
clearTimeout
(
timer
);
if
(
item
.
id
==
'
E59FB13BCE634475829F13DA3865502C
'
){
window
.
open
(
`https://37.8.219.231/#/?encryptAuth=
${
this
.
encrypt
()}
`
)
}
else
{
const
{
url
}
=
item
;
window
.
open
(
url
);
}
},
},
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment