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

fix[litemall-vue]: #337

parent ecb2cbe9
<template> <template>
<div class="set_nickname"> <div class="set_nickname">
<van-cell-group> <van-cell-group>
<van-field v-model="nickName" label="昵称"/> <van-field v-model="nickName" label="昵称" />
</van-cell-group> </van-cell-group>
<div class="bottom_btn"> <div class="bottom_btn">
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
</div> </div>
</template> </template>
<script> <script>
import { authProfile } from '@/api/api'; import { authProfile } from '@/api/api';
import { Field } from 'vant'; import { Field } from 'vant';
...@@ -31,16 +30,12 @@ export default { ...@@ -31,16 +30,12 @@ export default {
this.nickName = localStorage.getItem('nickName') || ''; this.nickName = localStorage.getItem('nickName') || '';
}, },
saveNick() { saveNick() {
if (true) { authProfile({ nickname: this.nickName }).then(res => {
authProfile({ nickName: this.nickName }) localStorage.setItem('nickName', this.nickName);
.then(res => { this.$dialog.alert({ message: '保存成功' }).then(() => {
localStorage.setItem('nickName', res.data.data.nickName); this.$router.go(-1);
return this.$dialog.alert({ message: '保存成功' }); });
}) });
.then(() => {
this.$router.go(-1);
});
}
} }
}, },
...@@ -50,7 +45,6 @@ export default { ...@@ -50,7 +45,6 @@ export default {
}; };
</script> </script>
<style scoped> <style scoped>
.bottom_btn { .bottom_btn {
padding: 30px 15px 0 15px; 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