Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
圆滚滚核心
vue-element-admin
提交
3fe2a376
V
vue-element-admin
项目概览
圆滚滚核心
/
vue-element-admin
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vue-element-admin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
3fe2a376
编写于
4月 24, 2017
作者:
P
Pan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refine
上级
b3e1b6c8
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
46 addition
and
26 deletion
+46
-26
README.md
README.md
+6
-0
src/mock/login.js
src/mock/login.js
+20
-13
src/store/modules/user.js
src/store/modules/user.js
+1
-0
src/utils/fetch.js
src/utils/fetch.js
+1
-1
src/views/dashboard/default/index.vue
src/views/dashboard/default/index.vue
+1
-2
src/views/dashboard/editor/index.vue
src/views/dashboard/editor/index.vue
+4
-4
src/views/dashboard/index.vue
src/views/dashboard/index.vue
+5
-4
src/views/login/index.vue
src/views/login/index.vue
+8
-2
未找到文件。
README.md
浏览文件 @
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
...
...
src/mock/login.js
浏览文件 @
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
=>
{
...
...
src/store/modules/user.js
浏览文件 @
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
=>
{
...
...
src/utils/fetch.js
浏览文件 @
3fe2a376
...
...
@@ -61,7 +61,7 @@ export function fetch(options) {
})
.
catch
(
error
=>
{
Message
({
message
:
'
发生异常错误,请刷新页面重试,或联系程序员
'
,
message
:
error
,
type
:
'
error
'
,
duration
:
5
*
1000
});
...
...
src/views/dashboard/default/index.vue
浏览文件 @
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
>
...
...
src/views/dashboard/editor/index.vue
浏览文件 @
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"
>
...
...
src/views/dashboard/index.vue
浏览文件 @
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
>
src/views/login/index.vue
浏览文件 @
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
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录