Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
techbook
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
front-end-dev
techbook
Commits
8ce94856
Commit
8ce94856
authored
Aug 22, 2019
by
zhangyanni
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
退出依然记住密码
parent
c5735d68
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
59 additions
and
4 deletions
+59
-4
common.scss
public/css/common.scss
+26
-0
PageTop.vue
src/components/index/PageTop.vue
+29
-2
emailLoginCmpt.vue
src/components/login/emailLoginCmpt.vue
+2
-1
mobileLoginCmpt.vue
src/components/login/mobileLoginCmpt.vue
+2
-1
No files found.
public/css/common.scss
View file @
8ce94856
...
...
@@ -573,4 +573,29 @@ i{
-moz-animation
:
fadeInOut
3s
;
-ms-animation
:
fadeInOut
3s
;
-o-animation
:
fadeInOut
3s
;
}
//抽屉
.el-drawer.userInfo-drawer
{
width
:
20%
!
important
;
&
.el-drawer__header
{
padding
:
0
;
}
&
.el-drawer__body
{
padding-top
:
20px
;
}
&
.el-drawer__close-btn
{
position
:
absolute
;
padding
:
0
;
margin
:
0
;
top
:
13px
;
left
:
20px
;
}
&
.basic-user-info
{
&
>
img
{
width
:
60px
;
height
:
60px
;
}
}
}
\ No newline at end of file
src/components/index/PageTop.vue
View file @
8ce94856
...
...
@@ -34,6 +34,21 @@
<span
@
click=
"changeLangEvent()"
><i
:class=
"lang==='zh-CN'?'selectedLang':''"
>
中文 /
</i><i
:class=
"lang==='en'?'selectedLang':''"
>
En
</i></span>
</div>
<!--抽屉-->
<div
class=
"drawer"
>
<el-drawer
custom-class=
"userInfo-drawer"
:visible
.
sync=
"drawer"
:direction=
"direction"
:before-close=
"handleClose"
>
<div
class=
"basic-user-info"
>
<img
src=
"../../assets/img/index/headerDefault.png"
alt=
""
>
<p>
11111
</p>
<p><span
class=
"iconfont icon-vip"
></span></p>
</div>
</el-drawer>
</div>
</div>
</
template
>
...
...
@@ -68,7 +83,9 @@
}],
currentIndex
:
0
,
lang
:
navigator
.
language
,
userInfo
:
null
userInfo
:
null
,
drawer
:
false
,
direction
:
'rtl'
,
}
},
methods
:
{
...
...
@@ -124,13 +141,23 @@
if
(
this
.
userInfo
)
{
if
(
this
.
userInfo
.
locked
==
1
)
this
.
$router
.
push
(
"/completeInfoCmpt"
);
}
console
.
log
(
this
.
userInfo
);
},
handleLogout
(){
window
.
localStorage
.
clear
();
// this.drawer = true;
window
.
localStorage
.
removeItem
(
"userInfo"
);
if
(
navigator
.
language
==
"zh-CN"
)
this
.
$router
.
push
(
"/mobileLoginCmpt"
);
else
this
.
$router
.
push
(
'/emailLoginCmpt'
);
},
handleClose
(){
this
.
$confirm
(
this
.
$t
(
"drawerInfo.closeTitle"
))
.
then
(
_
=>
{
done
();
})
.
catch
(
_
=>
{});
}
},
...
...
src/components/login/emailLoginCmpt.vue
View file @
8ce94856
...
...
@@ -77,7 +77,7 @@
activeName
:
"first"
,
codehtml
:
"getCode"
,
lang
:
navigator
.
language
==
"zh-CN"
?
1
:
2
,
checked
:
false
,
checked
:
window
.
localStorage
.
getItem
(
"checked"
)
==
'true'
?
true
:
false
,
emailForm
:
{
email
:
""
,
password
:
""
,
...
...
@@ -194,6 +194,7 @@
//登录
handleLogin
(
type
,
formName
){
const
that
=
this
;
window
.
localStorage
.
setItem
(
"checked"
,
this
.
checked
);
if
(
this
.
flag
==
0
){
this
.
flag
++
;
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
...
...
src/components/login/mobileLoginCmpt.vue
View file @
8ce94856
...
...
@@ -78,7 +78,7 @@
activeName
:
"first"
,
codehtml
:
"getCode"
,
lang
:
navigator
.
language
==
"zh-CN"
?
1
:
2
,
checked
:
false
,
checked
:
window
.
localStorage
.
getItem
(
"checked"
)
==
'true'
?
true
:
false
,
loginForm
:
{
phone
:
""
,
password
:
""
...
...
@@ -140,6 +140,7 @@
//登录
handleLogin
(
type
,
formName
)
{
const
that
=
this
;
window
.
localStorage
.
setItem
(
"checked"
,
this
.
checked
);
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
that
.
flag
==
0
){
...
...
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