Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gs1-admin
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
吴迪
gs1-admin
Commits
a5424937
Commit
a5424937
authored
Jun 28, 2024
by
田爽
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
登录加密,退出接口,轮播图文件格式
parent
0b65a66c
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
19 deletions
+28
-19
index.html
index.html
+1
-0
login.vue
src/views/common/login.vue
+7
-2
main-navbar.vue
src/views/main-navbar.vue
+16
-16
indexcarouselmanage-add-or-update.vue
src/views/modules/info/indexcarouselmanage-add-or-update.vue
+4
-1
No files found.
index.html
View file @
a5424937
...
...
@@ -18,6 +18,7 @@
<script
src=
"./static/plugins/ueditor-1.4.3.3/ueditor.all.min.js"
></script>
<script
src=
"./static/plugins/ueditor-1.4.3.3/lang/zh-cn/zh-cn.js"
></script>
<
%
}
%
>
<script
src=
"https://cdn.jsdelivr.net/npm/jsencrypt@3.0.0-beta.1/bin/jsencrypt.min.js"
></script>
</head>
<body>
<div
id=
"app"
></div>
...
...
src/views/common/login.vue
View file @
a5424937
...
...
@@ -69,14 +69,19 @@
}
},
submit
()
{
const
publicKey
=
'MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBANOf6KgVV4tc+QGyoFWMPGNpYSitenD8sqiei5KliOExO0Cq+bE1LaaFpvNPgg4H/600YsCa0Yn7P/DwbugTwe0CAwEAAQ=='
const
encrypt
=
new
JSEncrypt
()
encrypt
.
setPublicKey
(
publicKey
);
const
userName
=
encrypt
.
encrypt
(
this
.
dataForm
.
userName
);
const
password
=
encrypt
.
encrypt
(
this
.
dataForm
.
password
);
this
.
$refs
[
'dataForm'
].
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
'/office/sys/login'
),
method
:
'post'
,
data
:
this
.
$http
.
adornData
({
'username'
:
this
.
dataForm
.
userName
,
'password'
:
this
.
dataForm
.
password
'username'
:
userName
,
'password'
:
password
})
}).
then
(({
data
})
=>
{
if
(
data
&&
data
.
code
===
0
)
{
...
...
src/views/main-navbar.vue
View file @
a5424937
...
...
@@ -97,24 +97,24 @@
},
// 退出
logoutHandle
()
{
clearLoginInfo
()
this
.
$router
.
push
({
name
:
'login'
})
// this.$confirm(`确定进行[退出]操作?`, '提示', {
// confirmButtonText: '确定',
// cancelButtonText: '取消',
// type: 'warning'
// }).then(() => {
// this.$http({
// url: this.$http.adornUrl('/sys/logout'),
// method: 'post',
// data: this.$http.adornData()
// }).then(({data}) => {
// if (data && data.code === 0) {
// clearLoginInfo()
// this.$router.push({ name: 'login' })
// }
// })
// }).catch(() => {})
this
.
$confirm
(
`确定进行[退出]操作?`
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
'/office/sys/logout'
),
method
:
'post'
,
data
:
this
.
$http
.
adornData
()
}).
then
(({
data
})
=>
{
if
(
data
&&
data
.
code
===
0
)
{
clearLoginInfo
()
this
.
$router
.
push
({
name
:
'login'
})
}
})
}).
catch
(()
=>
{})
}
}
}
...
...
src/views/modules/info/indexcarouselmanage-add-or-update.vue
View file @
a5424937
...
...
@@ -333,13 +333,16 @@ export default {
this
.
imgUrl
=
new
FormData
()
const
isJPG
=
file
.
type
===
'image/jpeg'
const
isPNG
=
file
.
type
===
'image/png'
const
isGIF
=
file
.
type
===
'image/gif'
const
isLt2M
=
file
.
size
/
1024
/
1024
<
2
if
(
!
isJPG
)
{
if
(
!
isPNG
)
{
this
.
$message
.
error
(
'上传图片只能是 JPG, PNG 格式!'
)
if
(
!
isGIF
)
{
this
.
$message
.
error
(
'上传图片只能是 JPG, PNG, GIF 格式!'
)
return
}
}
}
if
(
!
isLt2M
)
{
this
.
$message
.
error
(
'上传头像图片大小不能超过 2MB!'
)
return
...
...
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