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
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
29 deletions
+35
-29
index.html
index.html
+2
-2
login.vue
src/views/common/login.vue
+7
-2
main-navbar.vue
src/views/main-navbar.vue
+19
-20
indexcarouselmanage-add-or-update.vue
src/views/modules/info/indexcarouselmanage-add-or-update.vue
+7
-5
No files found.
index.html
View file @
a5424937
...
@@ -18,8 +18,9 @@
...
@@ -18,8 +18,9 @@
<script
src=
"./static/plugins/ueditor-1.4.3.3/ueditor.all.min.js"
></script>
<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=
"./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>
</head>
<body>
<body>
<div
id=
"app"
></div>
<div
id=
"app"
></div>
</body>
</body>
</html>
</html>
\ No newline at end of file
src/views/common/login.vue
View file @
a5424937
...
@@ -69,14 +69,19 @@
...
@@ -69,14 +69,19 @@
}
}
},
},
submit
()
{
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
)
=>
{
this
.
$refs
[
'dataForm'
].
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
this
.
$http
({
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
'/office/sys/login'
),
url
:
this
.
$http
.
adornUrl
(
'/office/sys/login'
),
method
:
'post'
,
method
:
'post'
,
data
:
this
.
$http
.
adornData
({
data
:
this
.
$http
.
adornData
({
'username'
:
this
.
dataForm
.
userName
,
'username'
:
userName
,
'password'
:
this
.
dataForm
.
password
'password'
:
password
})
})
}).
then
(({
data
})
=>
{
}).
then
(({
data
})
=>
{
if
(
data
&&
data
.
code
===
0
)
{
if
(
data
&&
data
.
code
===
0
)
{
...
...
src/views/main-navbar.vue
View file @
a5424937
...
@@ -97,24 +97,24 @@
...
@@ -97,24 +97,24 @@
},
},
// 退出
// 退出
logoutHandle
()
{
logoutHandle
()
{
clearLoginInfo
()
//
clearLoginInfo()
this
.
$router
.
push
({
name
:
'login'
})
//
this.$router.push({ name: 'login' })
//
this.$confirm(`确定进行[退出]操作?`, '提示', {
this
.
$confirm
(
`确定进行[退出]操作?`
,
'提示'
,
{
//
confirmButtonText: '确定',
confirmButtonText
:
'确定'
,
//
cancelButtonText: '取消',
cancelButtonText
:
'取消'
,
//
type: 'warning'
type
:
'warning'
//
}).then(() => {
}).
then
(()
=>
{
//
this.$http({
this
.
$http
({
// url: this.$http.adornUrl('
/sys/logout'),
url
:
this
.
$http
.
adornUrl
(
'/office
/sys/logout'
),
//
method: 'post',
method
:
'post'
,
//
data: this.$http.adornData()
data
:
this
.
$http
.
adornData
()
//
}).then(({data}) => {
}).
then
(({
data
})
=>
{
//
if (data && data.code === 0) {
if
(
data
&&
data
.
code
===
0
)
{
//
clearLoginInfo()
clearLoginInfo
()
//
this.$router.push({ name: 'login' })
this
.
$router
.
push
({
name
:
'login'
})
//
}
}
//
})
})
//
}).catch(() => {})
}).
catch
(()
=>
{})
}
}
}
}
}
}
...
@@ -133,4 +133,4 @@
...
@@ -133,4 +133,4 @@
.site-navbar
{
.site-navbar
{
background-color
:
rgba
(
0
,
40
,
77
,
1
);
background-color
:
rgba
(
0
,
40
,
77
,
1
);
}
}
</
style
>
</
style
>
\ No newline at end of file
src/views/modules/info/indexcarouselmanage-add-or-update.vue
View file @
a5424937
...
@@ -98,7 +98,7 @@
...
@@ -98,7 +98,7 @@
</el-row>
</el-row>
<p
v-show=
"showInfo"
>
{{
dataForm
.
brief
}}
</p>
<p
v-show=
"showInfo"
>
{{
dataForm
.
brief
}}
</p>
</el-form-item>
</el-form-item>
<el-form-item
label=
"图片:"
prop=
"picIndexPath"
class=
"setdes setdes3 pic"
>
<el-form-item
label=
"图片:"
prop=
"picIndexPath"
class=
"setdes setdes3 pic"
>
<el-upload
<el-upload
v-show=
"!showInfo"
v-show=
"!showInfo"
...
@@ -333,11 +333,14 @@ export default {
...
@@ -333,11 +333,14 @@ export default {
this
.
imgUrl
=
new
FormData
()
this
.
imgUrl
=
new
FormData
()
const
isJPG
=
file
.
type
===
'image/jpeg'
const
isJPG
=
file
.
type
===
'image/jpeg'
const
isPNG
=
file
.
type
===
'image/png'
const
isPNG
=
file
.
type
===
'image/png'
const
isGIF
=
file
.
type
===
'image/gif'
const
isLt2M
=
file
.
size
/
1024
/
1024
<
2
const
isLt2M
=
file
.
size
/
1024
/
1024
<
2
if
(
!
isJPG
)
{
if
(
!
isJPG
)
{
if
(
!
isPNG
)
{
if
(
!
isPNG
)
{
this
.
$message
.
error
(
'上传图片只能是 JPG, PNG 格式!'
)
if
(
!
isGIF
)
{
return
this
.
$message
.
error
(
'上传图片只能是 JPG, PNG, GIF 格式!'
)
return
}
}
}
}
}
if
(
!
isLt2M
)
{
if
(
!
isLt2M
)
{
...
@@ -383,4 +386,4 @@ export default {
...
@@ -383,4 +386,4 @@ export default {
color
:
#e6a23c
;
color
:
#e6a23c
;
cursor
:
pointer
;
cursor
:
pointer
;
}
}
</
style
>
</
style
>
\ No newline at end of file
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