Commit ba34d881 authored by Junling Bu's avatar Junling Bu
Browse files

fix[litemall-vue]: #337

parent ecb2cbe9
<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;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment