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

View File

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