mirror of https://github.com/openspug/spug
F 前端 修复个人信息页console控制台报错问题
parent
016d0cab8c
commit
e4638a3cc8
|
@ -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');
|
||||||
|
|
|
@ -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');
|
||||||
|
|
Loading…
Reference in New Issue