Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Litemall
Commits
cc2fb64a
Commit
cc2fb64a
authored
Jul 11, 2019
by
Junling Bu
Browse files
chore[litemall-vue]: 退出按钮移到用户配置页面
parent
b785a6ff
Changes
3
Hide whitespace changes
Inline
Side-by-side
litemall-vue/src/views/user/tabbar-user-header.vue
View file @
cc2fb64a
...
...
@@ -41,7 +41,7 @@ export default {
'
nickName
'
,
'
avatar
'
);
this
.
avatar
=
avatar_default
;
this
.
avatar
=
infoData
.
avatar
||
avatar_default
;
this
.
nickName
=
infoData
.
nickName
||
'
昵称
'
;
},
toSetting
()
{
...
...
@@ -53,17 +53,15 @@ export default {
<
style
lang=
"scss"
scoped
>
.user_header
{
position
:
relative
;
background-repeat
:
no-repeat
;
background-size
:
cover
;
height
:
130px
;
box-sizing
:
border-box
;
text-align
:
center
;
color
:
#fff
;
padding-top
:
30px
;
}
i
.user_set
{
.user_set
{
position
:
absolute
;
top
:
10px
;
right
:
10px
;
...
...
litemall-vue/src/views/user/tabbar-user.vue
View file @
cc2fb64a
...
...
@@ -4,7 +4,6 @@
<order-group/>
<coupon-group/>
<user-module/>
<van-button
size=
"large"
class=
"tabbar-user__quit"
v-if=
"isLogin"
@
click=
"quit"
>
退出当前账户
</van-button>
</div>
</
template
>
...
...
@@ -14,9 +13,6 @@ import orderGroup from './tabbar-user-order';
import
couponGroup
from
'
./tabbar-user-coupon
'
;
import
userModule
from
'
./tabbar-user-module
'
;
import
{
removeLocalStorage
}
from
'
@/utils/local-storage
'
;
import
{
authLogout
}
from
'
@/api/api
'
;
export
default
{
data
()
{
return
{
...
...
@@ -29,10 +25,6 @@ export default {
},
methods
:
{
quit
()
{
authLogout
();
this
.
$router
.
push
({
name
:
'
login
'
});
},
getLoginStatus
()
{
this
.
isLogin
=
!!
localStorage
.
getItem
(
'
Authorization
'
);
...
...
litemall-vue/src/views/user/user-information-set/index.vue
View file @
cc2fb64a
...
...
@@ -19,7 +19,9 @@
<van-cell
title=
"密码设置"
to=
"/user/information/setPassword"
isLink
/>
<van-cell
title=
"手机号"
to=
"/user/information/setMobile"
:value=
"mobile"
isLink
></van-cell>
</van-cell-group>
<van-button
class=
"bottom_btn"
@
click=
"loginOut"
type=
"primary"
bottomAction
>
退出登录
</van-button>
<van-button
size=
"large"
class=
"user_quit"
@
click=
"loginOut"
>
退出当前账户
</van-button>
<van-popup
v-model=
"showSex"
position=
"bottom"
>
<van-picker
showToolbar
...
...
@@ -82,8 +84,13 @@ export default {
})
},
loginOut
()
{
authLogout
();
this
.
$router
.
push
({
name
:
'
home
'
});
authLogout
().
then
(
res
=>
{
removeLocalStorage
(
'
Authorization
'
)
removeLocalStorage
(
'
avatar
'
)
removeLocalStorage
(
'
nickName
'
)
this
.
$router
.
push
({
name
:
'
home
'
});
});
}
},
...
...
@@ -117,5 +124,8 @@ export default {
color
:
$border-color
;
}
}
.user_quit
{
margin-top
:
20px
;
}
}
</
style
>
Write
Preview
Supports
Markdown
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