F 前端 修复个人信息页console控制台报错问题

pull/11/head
雷二猛 2018-03-09 00:07:17 +08:00
parent 016d0cab8c
commit e4638a3cc8
2 changed files with 4 additions and 4 deletions

View File

@ -42,7 +42,7 @@
getPersonInfo(user_id) {
this.$http.get(`/api/account/users/${user_id}`).then((response) => {
this.personInfo = response.result;
}, (response) => this.$layer_message(response.result)).finally()
}, (response) => this.$layer_message(response.result))
},
getPerson(){
let user_id = localStorage.getItem('user_id');

View File

@ -136,7 +136,7 @@
getPersonInfo(user_id) {
this.$http.get(`/api/account/users/${user_id}`).then((response) => {
this.personInfo = response.result;
}, (response) => this.$layer_message(response.result)).finally()
}, (response) => this.$layer_message(response.result))
},
//
cancelPerson: function () {
@ -149,14 +149,14 @@
modifyPwd: function () {
this.$http.post(`/api/account/users/modifypwd`, this.pwdInfo).then(response => {
this.$layer_message('修改成功', 'success');
}, response => this.$layer_message(response.result)).finally();
}, response => this.$layer_message(response.result));
},
modifyPerson: function () {
console.log(this.personInfo);
this.$http.put(`/api/account/users/${this.personInfo.id}`, this.personInfo).then(response => {
this.$layer_message('保存成功', 'success');
localStorage.setItem('nickname', response.result['nickname']);
}, response => this.$layer_message(response.result)).finally();
}, response => this.$layer_message(response.result));
},
getPerson(){
let user_id = localStorage.getItem('user_id');