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
ba34d881
Commit
ba34d881
authored
Jan 14, 2020
by
Junling Bu
Browse files
fix[litemall-vue]: #337
parent
ecb2cbe9
Changes
1
Hide whitespace changes
Inline
Side-by-side
litemall-vue/src/views/user/user-information-set/set-nickname/index.vue
View file @
ba34d881
<
template
>
<div
class=
"set_nickname"
>
<van-cell-group>
<van-field
v-model=
"nickName"
label=
"昵称"
/>
<van-field
v-model=
"nickName"
label=
"昵称"
/>
</van-cell-group>
<div
class=
"bottom_btn"
>
...
...
@@ -10,7 +10,6 @@
</div>
</
template
>
<
script
>
import
{
authProfile
}
from
'
@/api/api
'
;
import
{
Field
}
from
'
vant
'
;
...
...
@@ -31,16 +30,12 @@ export default {
this
.
nickName
=
localStorage
.
getItem
(
'
nickName
'
)
||
''
;
},
saveNick
()
{
if
(
true
)
{
authProfile
({
nickName
:
this
.
nickName
})
.
then
(
res
=>
{
localStorage
.
setItem
(
'
nickName
'
,
res
.
data
.
data
.
nickName
);
return
this
.
$dialog
.
alert
({
message
:
'
保存成功
'
});
})
.
then
(()
=>
{
this
.
$router
.
go
(
-
1
);
});
}
authProfile
({
nickname
:
this
.
nickName
}).
then
(
res
=>
{
localStorage
.
setItem
(
'
nickName
'
,
this
.
nickName
);
this
.
$dialog
.
alert
({
message
:
'
保存成功
'
}).
then
(()
=>
{
this
.
$router
.
go
(
-
1
);
});
});
}
},
...
...
@@ -50,7 +45,6 @@ export default {
};
</
script
>
<
style
scoped
>
.bottom_btn
{
padding
:
30px
15px
0
15px
;
...
...
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