|
|
@@ -17,8 +17,9 @@
|
|
|
round
|
|
|
:color="`linear-gradient(to right, ${$colors.prim}, ${$colors.warn})`"
|
|
|
@click="save"
|
|
|
- >保存</van-button
|
|
|
>
|
|
|
+ 保存
|
|
|
+ </van-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="change" v-else-if="type === 'intro'">
|
|
|
@@ -39,8 +40,9 @@
|
|
|
round
|
|
|
:color="`linear-gradient(to right, ${$colors.prim}, ${$colors.warn})`"
|
|
|
@click="save"
|
|
|
- >保存</van-button
|
|
|
>
|
|
|
+ 保存
|
|
|
+ </van-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="change" v-else-if="type === 'school'">
|
|
|
@@ -61,8 +63,9 @@
|
|
|
round
|
|
|
:color="`linear-gradient(to right, ${$colors.prim}, ${$colors.warn})`"
|
|
|
@click="save"
|
|
|
- >保存</van-button
|
|
|
>
|
|
|
+ 保存
|
|
|
+ </van-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="change" v-else-if="type === 'occupation'">
|
|
|
@@ -83,8 +86,9 @@
|
|
|
round
|
|
|
:color="`linear-gradient(to right, ${$colors.prim}, ${$colors.warn})`"
|
|
|
@click="save"
|
|
|
- >保存</van-button
|
|
|
>
|
|
|
+ 保存
|
|
|
+ </van-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="change" v-else-if="type === 'company'">
|
|
|
@@ -105,8 +109,9 @@
|
|
|
round
|
|
|
:color="`linear-gradient(to right, ${$colors.prim}, ${$colors.warn})`"
|
|
|
@click="save"
|
|
|
- >保存</van-button
|
|
|
>
|
|
|
+ 保存
|
|
|
+ </van-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="change" v-else-if="type === 'mailbox'">
|
|
|
@@ -127,8 +132,9 @@
|
|
|
round
|
|
|
:color="`linear-gradient(to right, ${$colors.prim}, ${$colors.warn})`"
|
|
|
@click="save"
|
|
|
- >保存</van-button
|
|
|
>
|
|
|
+ 保存
|
|
|
+ </van-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
@@ -159,18 +165,13 @@ export default {
|
|
|
methods: {
|
|
|
getInformation() {
|
|
|
this.$http.get('/userDetail/get/' + this.userInfo.id).then(res => {
|
|
|
- this.info.autograph = res.autograph;
|
|
|
- this.info.school = res.school;
|
|
|
- this.info.occupation = res.occupation;
|
|
|
- this.info.company = res.company;
|
|
|
- this.info.mail = res.mail;
|
|
|
+ this.info = res;
|
|
|
});
|
|
|
},
|
|
|
save() {
|
|
|
let data = {
|
|
|
- userId: this.userInfo.id,
|
|
|
- nickname: this.message,
|
|
|
- ...this.info
|
|
|
+ ...this.info,
|
|
|
+ nickname: this.message
|
|
|
};
|
|
|
this.$http.post('/userDetail/save', data, { body: 'json' }).then(() => {
|
|
|
this.$toast.success('更新成功');
|