Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
VueElementTemplate
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
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
HireTest
VueElementTemplate
Commits
3fe2a376
Commit
3fe2a376
authored
8 years ago
by
Pan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refine
parent
b3e1b6c8
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
46 additions
and
26 deletions
+46
-26
README.md
README.md
+6
-0
login.js
src/mock/login.js
+20
-13
user.js
src/store/modules/user.js
+1
-0
fetch.js
src/utils/fetch.js
+1
-1
index.vue
src/views/dashboard/default/index.vue
+1
-2
index.vue
src/views/dashboard/editor/index.vue
+4
-4
index.vue
src/views/dashboard/index.vue
+5
-4
index.vue
src/views/login/index.vue
+8
-2
No files found.
README.md
View file @
3fe2a376
...
...
@@ -5,6 +5,8 @@ vue+element+axios 的管理后台 [线上地址](http://panjiachen.github.io/vue
###功能
-
[
x
]
登录/注销
-
[
x
]
权限验证
-
[
x
]
侧边栏
-
[
x
]
面包屑
-
[
x
]
富文本编辑器
-
[
x
]
Markdown编辑器
-
[
x
]
JSON编辑器
...
...
@@ -20,6 +22,10 @@ vue+element+axios 的管理后台 [线上地址](http://panjiachen.github.io/vue
-
[
x
]
table example
-
[
x
]
form example
-
[
x
]
多环境发布
-
[
x
]
dashboard
-
[
x
]
二次登录
-
[
x
]
动态侧边栏
###How to use?
```
bash
...
...
This diff is collapsed.
Click to expand it.
src/mock/login.js
View file @
3fe2a376
...
...
@@ -26,23 +26,30 @@ const userMap = {
export
default
{
loginByEmail
:
config
=>
{
const
{
email
}
=
config
.
params
;
return
new
Promise
(
resolve
=>
{
setTimeout
(()
=>
{
resolve
([
200
,
{
data
:
userMap
[
email
.
split
(
'@'
)[
0
]]
}]);
},
500
);
return
new
Promise
((
resolve
,
reject
)
=>
{
if
(
userMap
[
email
.
split
(
'@'
)[
0
]])
{
setTimeout
(()
=>
{
resolve
([
200
,
{
data
:
userMap
[
email
.
split
(
'@'
)[
0
]]
}]);
},
500
);
}
else
{
reject
(
'账号不正确'
)
}
})
},
getInfo
:
config
=>
{
const
{
token
}
=
config
.
params
;
console
.
log
(
userMap
[
token
])
return
new
Promise
(
resolve
=>
{
setTimeout
(()
=>
{
resolve
([
200
,
{
data
:
userMap
[
token
]
}]);
},
100
);
return
new
Promise
((
resolve
,
reject
)
=>
{
if
(
userMap
[
token
])
{
setTimeout
(()
=>
{
resolve
([
200
,
{
data
:
userMap
[
token
]
}]);
},
100
);
}
else
{
reject
(
'获取失败'
)
}
})
},
logout
:
()
=>
new
Promise
(
resolve
=>
{
...
...
This diff is collapsed.
Click to expand it.
src/store/modules/user.js
View file @
3fe2a376
...
...
@@ -114,6 +114,7 @@ const user = {
return
new
Promise
((
resolve
,
reject
)
=>
{
logout
(
state
.
token
).
then
(()
=>
{
commit
(
'SET_TOKEN'
,
''
);
commit
(
'SET_ROLES'
,
[]);
Cookies
.
remove
(
'X-Ivanka-Token'
);
resolve
();
}).
catch
(
error
=>
{
...
...
This diff is collapsed.
Click to expand it.
src/utils/fetch.js
View file @
3fe2a376
...
...
@@ -61,7 +61,7 @@ export function fetch(options) {
})
.
catch
(
error
=>
{
Message
({
message
:
'发生异常错误,请刷新页面重试,或联系程序员'
,
message
:
error
,
type
:
'error'
,
duration
:
5
*
1000
});
...
...
This diff is collapsed.
Click to expand it.
src/views/dashboard/default/index.vue
View file @
3fe2a376
...
...
@@ -6,13 +6,12 @@
</PanThumb>
<div
class=
"info-container"
>
<span
class=
"display_name"
>
{{
name
}}
</span>
<span
style=
'font-size:20px;padding-top:20px;display:inline-block;'
>
赶紧把你们想要的快捷键报给产品锦鲤!
</span>
<span
style=
'font-size:20px;padding-top:20px;display:inline-block;'
>
普通编辑dashboard
</span>
</div>
</div>
<div>
<img
class=
'emptyGif'
:src=
"emptyGif"
>
</div>
</div>
</
template
>
...
...
This diff is collapsed.
Click to expand it.
src/views/dashboard/editor/index.vue
View file @
3fe2a376
...
...
@@ -27,12 +27,12 @@
</div>
<div
class=
"btn-group"
>
<router-link
class=
"pan-btn blue-btn"
to=
"/components/index"
>
组
价
</router-link>
<router-link
class=
"pan-btn blue-btn"
to=
"/components/index"
>
组
件
</router-link>
<router-link
class=
"pan-btn light-blue-btn"
to=
"/charts/index"
>
图表
</router-link>
<router-link
class=
"pan-btn red-btn"
to=
"/errorpage/404"
>
错误页面
</router-link>
<router-link
class=
"pan-btn pink-btn"
to=
"/e
rrlog/log"
>
错误日志
</router-link>
<router-link
class=
"pan-btn green-btn"
to=
"/
article/wscnlist"
>
导出excel
</router-link>
<router-link
class=
"pan-btn tiffany-btn"
to=
"/ex
cel/download"
>
实时列表
</router-link>
<router-link
class=
"pan-btn pink-btn"
to=
"/e
xcel/download"
>
导出excel
</router-link>
<router-link
class=
"pan-btn green-btn"
to=
"/
example/table"
>
table
</router-link>
<router-link
class=
"pan-btn tiffany-btn"
to=
"/ex
ample/form1"
>
form
</router-link>
</div>
<div
class=
"clearfix main-dashboard-container"
>
...
...
This diff is collapsed.
Click to expand it.
src/views/dashboard/index.vue
View file @
3fe2a376
...
...
@@ -29,10 +29,11 @@
if
(
this
.
roles
.
indexOf
(
'admin'
)
>=
0
)
{
return
;
}
const
isEditor
=
this
.
roles
.
some
(
v
=>
v
.
indexOf
(
'editor'
)
>=
0
)
if
(
!
isEditor
)
{
this
.
currentRole
=
'DefaultDashboard'
;
}
// const isEditor = this.roles.some(v => v.indexOf('editor') >= 0)
// if (!isEditor) {
// this.currentRole = 'DefaultDashboard';
// }
this
.
currentRole
=
'DefaultDashboard'
;
}
}
</
script
>
This diff is collapsed.
Click to expand it.
src/views/login/index.vue
View file @
3fe2a376
...
...
@@ -19,6 +19,8 @@
登录
</el-button>
</el-form-item>
<div
class=
'tips'
>
admin账号为:admin@wallstreetcn 密码随便填
</div>
<div
class=
'tips'
>
editor账号:editor@wallstreetcn 密码随便填
</div>
<router-link
to=
"/sendpwd"
class=
"forget-pwd"
>
忘记密码?(或首次登录)
</router-link>
...
...
@@ -56,7 +58,7 @@
};
return
{
loginForm
:
{
email
:
''
,
email
:
'
admin@wallstreetcn.com
'
,
password
:
''
},
loginRules
:
{
...
...
@@ -125,7 +127,11 @@
<
style
rel=
"stylesheet/scss"
lang=
"scss"
scoprd
>
@import
"src/styles/mixin.scss"
;
.tips
{
font-size
:
14px
;
color
:
#fff
;
margin-bottom
:
5px
;
}
.login-container
{
@include
relative
;
height
:
100vh
;
...
...
This diff is collapsed.
Click to expand it.
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