|
|
@@ -1,7 +1,7 @@
|
|
|
<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;
|