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
3c096382
Commit
3c096382
authored
Nov 16, 2021
by
Lyan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改登录
parent
1bc29154
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
200 additions
and
40 deletions
+200
-40
index.html
index.html
+1
-1
package-lock.json
package-lock.json
+0
-0
index.js
src/router/index.js
+180
-18
login.vue
src/views/common/login.vue
+4
-7
main-navbar.vue
src/views/main-navbar.vue
+2
-2
main.vue
src/views/main.vue
+11
-10
index-qa.js
static/config/index-qa.js
+1
-1
index.js
static/config/index.js
+1
-1
No files found.
index.html
View file @
3c096382
...
...
@@ -4,7 +4,7 @@
<meta
charset=
"UTF-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"ie=edge"
>
<title>
人人快速开发平台
</title>
<title>
gs1后台管理
</title>
<
%
if
(
process
.
env
.
NODE_ENV =
==
'
production
')
{
%
>
<!-- 生产环境 -->
<script>
document
.
write
(
'<script src="./config/index.js?t='
+
new
Date
().
getTime
()
+
'"><
\
/script>'
);
</script>
...
...
package-lock.json
0 → 100644
View file @
3c096382
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/router/index.js
View file @
3c096382
...
...
@@ -62,26 +62,188 @@ router.beforeEach((to, from, next) => {
if
(
router
.
options
.
isAddDynamicMenuRoutes
||
fnCurrentRouteType
(
to
,
globalRoutes
)
===
'global'
)
{
next
()
}
else
{
http
({
url
:
http
.
adornUrl
(
'/sys/menu/nav'
),
method
:
'get'
,
params
:
http
.
adornParams
()
}).
then
(({
data
})
=>
{
if
(
data
&&
data
.
code
===
0
)
{
fnAddDynamicMenuRoutes
(
data
.
menuList
)
console
.
log
(
http
)
var
navDataList
=
[
{
'menuId'
:
1
,
'parentId'
:
0
,
'parentName'
:
null
,
'name'
:
'系统管理'
,
'url'
:
null
,
'perms'
:
null
,
'type'
:
0
,
'icon'
:
'system'
,
'orderNum'
:
0
,
'open'
:
null
,
'list'
:
[
{
'menuId'
:
2
,
'parentId'
:
1
,
'parentName'
:
null
,
'name'
:
'管理员列表'
,
'url'
:
'sys/user'
,
'perms'
:
null
,
'type'
:
1
,
'icon'
:
'admin'
,
'orderNum'
:
1
,
'open'
:
null
,
'list'
:
null
},
{
'menuId'
:
3
,
'parentId'
:
1
,
'parentName'
:
null
,
'name'
:
'角色管理'
,
'url'
:
'sys/role'
,
'perms'
:
null
,
'type'
:
1
,
'icon'
:
'role'
,
'orderNum'
:
2
,
'open'
:
null
,
'list'
:
null
},
{
'menuId'
:
4
,
'parentId'
:
1
,
'parentName'
:
null
,
'name'
:
'菜单管理'
,
'url'
:
'sys/menu'
,
'perms'
:
null
,
'type'
:
1
,
'icon'
:
'menu'
,
'orderNum'
:
3
,
'open'
:
null
,
'list'
:
null
},
{
'menuId'
:
5
,
'parentId'
:
1
,
'parentName'
:
null
,
'name'
:
'SQL监控'
,
'url'
:
'http://localhost:8080/renren-fast/druid/sql.html'
,
'perms'
:
null
,
'type'
:
1
,
'icon'
:
'sql'
,
'orderNum'
:
4
,
'open'
:
null
,
'list'
:
null
},
{
'menuId'
:
6
,
'parentId'
:
1
,
'parentName'
:
null
,
'name'
:
'定时任务'
,
'url'
:
'job/schedule'
,
'perms'
:
null
,
'type'
:
1
,
'icon'
:
'job'
,
'orderNum'
:
5
,
'open'
:
null
,
'list'
:
null
},
{
'menuId'
:
27
,
'parentId'
:
1
,
'parentName'
:
null
,
'name'
:
'参数管理'
,
'url'
:
'sys/config'
,
'perms'
:
'sys:config:list,sys:config:info,sys:config:save,sys:config:update,sys:config:delete'
,
'type'
:
1
,
'icon'
:
'config'
,
'orderNum'
:
6
,
'open'
:
null
,
'list'
:
null
},
{
'menuId'
:
30
,
'parentId'
:
1
,
'parentName'
:
null
,
'name'
:
'文件上传'
,
'url'
:
' '
,
'perms'
:
'sys:oss:all'
,
'type'
:
1
,
'icon'
:
'oss'
,
'orderNum'
:
6
,
'open'
:
null
,
'list'
:
null
},
{
'menuId'
:
29
,
'parentId'
:
1
,
'parentName'
:
null
,
'name'
:
'系统日志'
,
'url'
:
'sys/log'
,
'perms'
:
'sys:log:list'
,
'type'
:
1
,
'icon'
:
'log'
,
'orderNum'
:
7
,
'open'
:
null
,
'list'
:
null
}
]
}
]
var
permissions
=
[
'sys:schedule:info'
,
'sys:menu:update'
,
'sys:menu:delete'
,
'sys:config:info'
,
'sys:menu:list'
,
'sys:config:save'
,
'sys:config:update'
,
'sys:schedule:resume'
,
'sys:user:delete'
,
'sys:config:list'
,
'sys:user:update'
,
'sys:role:list'
,
'sys:menu:info'
,
'sys:menu:select'
,
'sys:schedule:update'
,
'sys:schedule:save'
,
'sys:role:select'
,
'sys:user:list'
,
'sys:menu:save'
,
'sys:role:save'
,
'sys:schedule:log'
,
'sys:role:info'
,
'sys:schedule:delete'
,
'sys:role:update'
,
'sys:schedule:list'
,
'sys:user:info'
,
'sys:schedule:run'
,
'sys:config:delete'
,
'sys:role:delete'
,
'sys:user:save'
,
'sys:schedule:pause'
,
'sys:log:list'
,
'sys:oss:all'
]
fnAddDynamicMenuRoutes
(
navDataList
)
router
.
options
.
isAddDynamicMenuRoutes
=
true
sessionStorage
.
setItem
(
'menuList'
,
JSON
.
stringify
(
data
.
menu
List
||
'[]'
))
sessionStorage
.
setItem
(
'permissions'
,
JSON
.
stringify
(
data
.
permissions
||
'[]'
))
sessionStorage
.
setItem
(
'menuList'
,
JSON
.
stringify
(
navData
List
||
'[]'
))
sessionStorage
.
setItem
(
'permissions'
,
JSON
.
stringify
(
permissions
||
'[]'
))
next
({
...
to
,
replace
:
true
})
}
else
{
sessionStorage
.
setItem
(
'menuList'
,
'[]'
)
sessionStorage
.
setItem
(
'permissions'
,
'[]'
)
next
()
}
}).
catch
((
e
)
=>
{
console
.
log
(
`%c
${
e
}
请求菜单列表和权限失败,跳转至登录页!!`
,
'color:blue'
)
router
.
push
({
name
:
'login'
})
})
// http({
// url: http.adornUrl('/sys/menu/nav'),
// method: 'get',
// params: http.adornParams()
// }).then(({data}) => {
// if (data && data.code === 0) {
// fnAddDynamicMenuRoutes(data.menuList)
// router.options.isAddDynamicMenuRoutes = true
// sessionStorage.setItem('menuList', JSON.stringify(data.menuList || '[]'))
// sessionStorage.setItem('permissions', JSON.stringify(data.permissions || '[]'))
// next({ ...to, replace: true })
// } else {
// sessionStorage.setItem('menuList', '[]')
// sessionStorage.setItem('permissions', '[]')
// next()
// }
// }).catch((e) => {
// console.log(`%c${e} 请求菜单列表和权限失败,跳转至登录页!!`, 'color:blue')
// router.push({ name: 'login' })
// })
}
})
...
...
src/views/common/login.vue
View file @
3c096382
...
...
@@ -22,7 +22,7 @@
</el-input>
</el-col>
<el-col
:span=
"10"
class=
"login-captcha"
>
<
img
:src=
"captchaPath"
@
click=
"getCaptcha()"
alt=
""
>
<
!--
<img
:src=
"captchaPath"
@
click=
"getCaptcha()"
alt=
""
>
--
>
</el-col>
</el-row>
</el-form-item>
...
...
@@ -62,7 +62,7 @@
}
},
created
()
{
this
.
getCaptcha
()
//
this.getCaptcha()
},
methods
:
{
// 提交表单
...
...
@@ -70,20 +70,17 @@
this
.
$refs
[
'dataForm'
].
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
'/sys/login'
),
url
:
this
.
$http
.
adornUrl
(
'/
office/
sys/login'
),
method
:
'post'
,
data
:
this
.
$http
.
adornData
({
'username'
:
this
.
dataForm
.
userName
,
'password'
:
this
.
dataForm
.
password
,
'uuid'
:
this
.
dataForm
.
uuid
,
'captcha'
:
this
.
dataForm
.
captcha
'password'
:
this
.
dataForm
.
password
})
}).
then
(({
data
})
=>
{
if
(
data
&&
data
.
code
===
0
)
{
this
.
$cookie
.
set
(
'token'
,
data
.
token
)
this
.
$router
.
replace
({
name
:
'home'
})
}
else
{
this
.
getCaptcha
()
this
.
$message
.
error
(
data
.
msg
)
}
})
...
...
src/views/main-navbar.vue
View file @
3c096382
...
...
@@ -2,8 +2,8 @@
<nav
class=
"site-navbar"
:class=
"'site-navbar--' + navbarLayoutType"
>
<div
class=
"site-navbar__header"
>
<h1
class=
"site-navbar__brand"
@
click=
"$router.push(
{ name: 'home' })">
<a
class=
"site-navbar__brand-lg"
href=
"javascript:;"
>
人人快速开发平台
</a>
<a
class=
"site-navbar__brand-mini"
href=
"javascript:;"
>
人人
</a>
<a
class=
"site-navbar__brand-lg"
href=
"javascript:;"
>
gs1后台管理
</a>
<a
class=
"site-navbar__brand-mini"
href=
"javascript:;"
>
gs1
</a>
</h1>
</div>
<div
class=
"site-navbar__body clearfix"
>
...
...
src/views/main.vue
View file @
3c096382
...
...
@@ -73,17 +73,18 @@
},
// 获取当前管理员信息
getUserInfo
()
{
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
'/sys/user/info'
),
method
:
'get'
,
params
:
this
.
$http
.
adornParams
()
}).
then
(({
data
})
=>
{
if
(
data
&&
data
.
code
===
0
)
{
this
.
loading
=
false
this
.
userId
=
data
.
user
.
userId
this
.
userName
=
data
.
user
.
username
}
})
// this.$http({
// url: this.$http.adornUrl('/sys/user/info'),
// method: 'get',
// params: this.$http.adornParams()
// }).then(({data}) => {
// if (data && data.code === 0) {
// this.loading = false
// this.userId = data.user.userId
// this.userName = data.user.username
// }
// })
}
}
}
...
...
static/config/index-qa.js
View file @
3c096382
...
...
@@ -5,7 +5,7 @@
window
.
SITE_CONFIG
=
{};
// api接口请求地址
window
.
SITE_CONFIG
[
'baseUrl'
]
=
'
http://localhost:8080/renren-fast
'
;
window
.
SITE_CONFIG
[
'baseUrl'
]
=
'
http://81.68.189.225:9091
'
;
// cdn地址 = 域名 + 版本号
window
.
SITE_CONFIG
[
'domain'
]
=
'./'
;
// 域名
...
...
static/config/index.js
View file @
3c096382
...
...
@@ -5,7 +5,7 @@
window
.
SITE_CONFIG
=
{};
// api接口请求地址
window
.
SITE_CONFIG
[
'baseUrl'
]
=
'http://
localhost:8080/renren-fast
'
;
window
.
SITE_CONFIG
[
'baseUrl'
]
=
'http://
81.68.189.225:9091
'
;
// cdn地址 = 域名 + 版本号
window
.
SITE_CONFIG
[
'domain'
]
=
'./'
;
// 域名
...
...
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