Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
Y
ybf
Project
Project
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
xulili
ybf
Commits
2b81d85b
Commit
2b81d85b
authored
Feb 03, 2020
by
Z
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Z: Dot: Change LoginPage's logo's words.
parent
8252a3c9
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
63 additions
and
82 deletions
+63
-82
store.vue
ybf_admin/src/pages/in/contact/store.vue
+2
-2
index.vue
ybf_admin/src/pages/task/bar/index.vue
+1
-1
account.js
ybf_admin/src/store/modules/d2admin/modules/account.js
+7
-7
request.js
ybf_admin/src/utils/request.js
+1
-1
page.vue
ybf_admin/src/views/system/login/page.vue
+52
-71
No files found.
ybf_admin/src/pages/in/contact/store.vue
View file @
2b81d85b
...
...
@@ -60,7 +60,7 @@
<el-table-column
type=
"selection"
width=
"60"
></el-table-column>
<el-table-column
prop=
"name"
label=
"门店名称"
align=
"center"
></el-table-column>
<el-table-column
prop=
"type"
label=
"门店类型"
align=
"center"
width=
"120"
></el-table-column>
<el-table-column
prop
label=
"门店负责人"
align=
"center"
width=
"120"
></el-table-column>
<el-table-column
prop
=
“principal”
label=
"门店负责人"
align=
"center"
width=
"120"
></el-table-column>
<el-table-column
prop=
"signNum"
label=
"所属柜组"
align=
"center"
width=
"120"
></el-table-column>
<el-table-column
prop=
"location"
label=
"位置"
align=
"center"
width=
"120"
></el-table-column>
<el-table-column
prop=
"shopId"
label=
"门牌号"
align=
"center"
width=
"120"
></el-table-column>
...
...
@@ -221,7 +221,7 @@ export default {
},
methods
:
{
storeGetMainList
()
{
zlog
(
"--->In Get API!"
);
//
zlog("--->In Get API!");
ApiStoreGetMainList
().
then
(
res
=>
{
this
.
list
.
mainV
=
res
.
data
.
adminStalls
;
});
...
...
ybf_admin/src/pages/task/bar/index.vue
View file @
2b81d85b
...
...
@@ -95,7 +95,7 @@
<el-table-column
prop=
"taskDetail"
label=
"任务详情"
align=
"center"
style=
"min-width: 200px;"
></el-table-column>
<el-table-column
label=
"状态"
align=
"center"
width=
"160"
>
<template
slot-scope=
"scope"
>
{{
scope
.
row
.
taskStatus
}}
</
template
>
<template
slot-scope=
"scope"
>
{{
scope
.
row
.
taskStatus
===
'send'
?
'已发布'
:
'未发布'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
fixed=
"right"
width=
"240"
>
...
...
ybf_admin/src/store/modules/d2admin/modules/account.js
View file @
2b81d85b
...
...
@@ -13,7 +13,7 @@ export default {
* @param {Object} payload password {String} 密码
* @param {Object} payload route {Object} 登录成功后定向的路由对象 任何 vue-router 支持的格式
*/
login
({
dispatch
},
{
login
({
dispatch
},
{
loginName
=
''
,
loginPwd
=
''
}
=
{})
{
...
...
@@ -26,10 +26,10 @@ export default {
.
then
(
async
res
=>
{
// token 代表用户当前登录状态 建议在网络请求中携带 token
// 如有必要 token 需要定时更新,默认保存一天
if
(
res
.
result
==
'fail'
)
{
if
(
res
.
result
==
'fail'
)
{
console
.
log
(
'err: '
,
res
.
errorMsg
)
reject
(
res
)
}
else
{
}
else
{
util
.
cookies
.
set
(
'token'
,
res
.
data
)
// 用户登录后从持久化数据加载一系列的设置
await
dispatch
(
'load'
)
...
...
@@ -39,7 +39,7 @@ export default {
})
.
catch
(
err
=>
{
console
.
log
(
'err: '
,
err
)
reject
(
err
)
//
reject(err)
})
})
},
...
...
@@ -48,11 +48,11 @@ export default {
* @param {Object} context
* @param {Object} payload confirm {Boolean} 是否需要确认
*/
logout
({
commit
,
dispatch
},
{
confirm
=
false
}
=
{})
{
logout
({
commit
,
dispatch
},
{
confirm
=
false
}
=
{})
{
/**
* @description 注销
*/
async
function
logout
()
{
async
function
logout
()
{
// 删除cookie
util
.
cookies
.
remove
(
'token'
)
// 跳转路由
...
...
@@ -84,7 +84,7 @@ export default {
* @description 用户登录后从持久化数据加载一系列的设置
* @param {Object} context
*/
load
({
dispatch
})
{
load
({
dispatch
})
{
return
new
Promise
(
async
resolve
=>
{
// DB -> store 加载用户名
await
dispatch
(
'd2admin/user/load'
,
null
,
{
root
:
true
})
...
...
ybf_admin/src/utils/request.js
View file @
2b81d85b
...
...
@@ -14,7 +14,7 @@ const service = axios.create({
// request 拦截器
service
.
interceptors
.
request
.
use
(
request
=>
{
zlog
(
'--->request: request:'
,
request
)
//
zlog('--->request: request:', request)
return
request
},
error
=>
{
...
...
ybf_admin/src/views/system/login/page.vue
View file @
2b81d85b
...
...
@@ -4,27 +4,23 @@
<ul
class=
"circles"
style=
"2px solid greed;"
>
<li
v-for=
"n in 10"
:key=
"n"
></li>
</ul>
</div>
-->
</div>
-->
<!--
<div
class=
"page-login--layer page-login--layer-time loginbktime"
flex=
"main:center cross:center"
>
{{
time
}}
</div>
-->
</div>
-->
<div
class=
"page-login--layer"
>
<div
class=
"page-login--content"
flex=
"dir:top main:justify cross:stretch box:justify"
>
<div
class=
"page-login--content"
flex=
"dir:top main:justify cross:stretch box:justify"
>
<div
class=
"page-login--content-header"
>
<!--
<p
class=
"page-login--content-header-motto"
>
时间是一切财富中最宝贵的财富
</p>
-->
</p>
-->
</div>
<div
class=
"page-login--content-main"
flex=
"dir:top main:center cross:center"
>
<div
class=
"page-login--content-main"
flex=
"dir:top main:center cross:center"
>
<!-- logo -->
<div>
<p
style=
"font-size: 30px;margin-bottom: 20px ;color: #545252"
>
亿
佰
分管理系统
</p>
<p
style=
"font-size: 30px;margin-bottom: 20px ;color: #545252"
>
亿
百
分管理系统
</p>
</div>
<!-- form -->
<div
class=
"page-login--form"
>
...
...
@@ -34,97 +30,83 @@
label-position=
"top"
:rules=
"rules"
:model=
"formLogin"
size=
"default"
>
size=
"default"
>
<el-form-item
prop=
"username"
>
<el-input
type=
"text"
v-model=
"formLogin.username"
placeholder=
"用户名"
>
<el-input
type=
"text"
v-model=
"formLogin.username"
placeholder=
"用户名"
>
<i
slot=
"prepend"
class=
"fa fa-user-circle-o"
></i>
</el-input>
</el-form-item>
<el-form-item
prop=
"password"
>
<el-input
type=
"password"
v-model=
"formLogin.password"
placeholder=
"密码"
>
<el-input
type=
"password"
v-model=
"formLogin.password"
placeholder=
"密码"
>
<i
slot=
"prepend"
class=
"fa fa-keyboard-o"
></i>
</el-input>
</el-form-item>
<el-button
<el-button
size=
"default"
@
click=
"loginSubmit"
type=
"primary"
class=
"button-login"
>
登录
</el-button>
class=
"button-login"
>
登录
</el-button>
</el-form>
</el-card>
<p
class=
"page-login--options"
flex=
"main:justify cross:center"
>
</p>
<p
class=
"page-login--options"
flex=
"main:justify cross:center"
></p>
</div>
</div>
<div
class=
"page-login--content-footer"
>
</div>
<div
class=
"page-login--content-footer"
></div>
</div>
</div>
</div>
</
template
>
<
script
>
import
dayjs
from
'dayjs'
import
{
mapActions
}
from
'vuex'
import
localeMixin
from
'@/locales/mixin.js'
import
dayjs
from
"dayjs"
;
import
{
mapActions
}
from
"vuex"
;
import
localeMixin
from
"@/locales/mixin.js"
;
import
{
ApiLoginSubmit
}
from
"@api/login/main"
;
import
md5
from
"js-md5"
;
export
default
{
mixins
:
[
localeMixin
],
data
()
{
mixins
:
[
localeMixin
],
data
()
{
return
{
timeInterval
:
null
,
time
:
dayjs
().
format
(
'HH:mm:ss'
),
time
:
dayjs
().
format
(
"HH:mm:ss"
),
// 快速选择用户
dialogVisible
:
false
,
formLogin
:
{
username
:
'18888888888'
,
password
:
'admin123'
,
username
:
"18888888888"
,
password
:
"admin123"
},
// 表单校验
rules
:
{
username
:
[
{
required
:
true
,
message
:
'请输入用户名'
,
trigger
:
'blur'
message
:
"请输入用户名"
,
trigger
:
"blur"
}
],
password
:
[
{
required
:
true
,
message
:
'请输入密码'
,
trigger
:
'blur'
message
:
"请输入密码"
,
trigger
:
"blur"
}
]
}
}
}
;
},
mounted
()
{
mounted
()
{
this
.
timeInterval
=
setInterval
(()
=>
{
this
.
refreshTime
()
},
1000
)
this
.
refreshTime
()
;
},
1000
)
;
},
beforeDestroy
()
{
clearInterval
(
this
.
timeInterval
)
beforeDestroy
()
{
clearInterval
(
this
.
timeInterval
)
;
},
methods
:
{
...
mapActions
(
'd2admin/account'
,
[
'login'
]),
...
mapActions
(
"d2admin/account"
,
[
"login"
]),
// loginSubmit(){
// let postData = {
...
...
@@ -139,15 +121,15 @@ export default {
// }
// })
// },
refreshTime
()
{
this
.
time
=
dayjs
().
format
(
'HH:mm:ss'
)
refreshTime
()
{
this
.
time
=
dayjs
().
format
(
"HH:mm:ss"
);
},
/**
* @description 提交表单
*/
// 提交登录信息
loginSubmit
()
{
this
.
$refs
.
loginForm
.
validate
(
(
valid
)
=>
{
loginSubmit
()
{
this
.
$refs
.
loginForm
.
validate
(
valid
=>
{
if
(
valid
)
{
// 登录
// 注意 这里的演示没有传验证码
...
...
@@ -155,26 +137,25 @@ export default {
this
.
login
({
loginName
:
this
.
formLogin
.
username
,
loginPwd
:
md5
(
this
.
formLogin
.
password
)
})
.
then
(()
=>
{
// 重定向对象不存在则返回顶层路径
// this.$router.replace(this.$route.query.redirect || '/home/main')
this
.
$router
.
replace
(
this
.
$route
.
query
.
redirect
||
'/in/contact'
)
})
}).
then
(()
=>
{
// 重定向对象不存在则返回顶层路径
// this.$router.replace(this.$route.query.redirect || '/home/main')
this
.
$router
.
replace
(
this
.
$route
.
query
.
redirect
||
"/in/contact"
);
});
}
else
{
// 登录表单校验失败
this
.
$message
.
error
(
'表单校验失败,请检查'
)
this
.
$message
.
error
(
"表单校验失败,请检查"
);
}
})
})
;
}
}
}
}
;
</
script
>
<
style
lang=
"scss"
>
.page-login
{
@extend
%unable-select
;
$backgroundColor
:
#
F0F2F
5
;
$backgroundColor
:
#
f0f2f
5
;
// ---
background-color
:
$backgroundColor
;
height
:
100%
;
...
...
@@ -296,7 +277,7 @@ export default {
color
:
$color-text-normal
;
a
{
color
:
$color-text-normal
;
margin
:
0
.5em
;
margin
:
0
0
.5em
;
&
:hover
{
color
:
$color-text-main
;
}
...
...
@@ -342,16 +323,16 @@ export default {
list-style
:
none
;
width
:
20px
;
height
:
20px
;
background
:
#
FFF
;
background
:
#
fff
;
animation
:
animate
25s
linear
infinite
;
bottom
:
-200px
;
@keyframes
animate
{
0
%
{
0
%
{
transform
:
translateY
(
0
)
rotate
(
0deg
);
opacity
:
1
;
border-radius
:
0
;
}
100
%
{
100
%
{
transform
:
translateY
(
-1000px
)
rotate
(
720deg
);
opacity
:
0
;
border-radius
:
50%
;
...
...
@@ -428,7 +409,7 @@ export default {
</
style
>
<
style
scoped
>
.loginbktime
{
.loginbktime
{
/*border: 2px solid red;*/
}
</
style
>
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