|
|
@@ -431,14 +431,17 @@ export default {
|
|
|
...this.info,
|
|
|
pic: img
|
|
|
};
|
|
|
- this.$http.post('/userDetail/save', data, { body: 'json' }).then(() => {
|
|
|
- this.$toast.clear();
|
|
|
- this.$toast.success('更新成功');
|
|
|
- this.getInformation();
|
|
|
- });
|
|
|
- this.updateUser({ avatar: img, useCollectionPic: false }).then(res => {
|
|
|
- this.$toast.clear();
|
|
|
- });
|
|
|
+ this.updateUser({ avatar: img, useCollectionPic: false })
|
|
|
+ .then(res => {
|
|
|
+ this.$http.post('/userDetail/save', data, { body: 'json' }).then(() => {
|
|
|
+ this.$toast.clear();
|
|
|
+ this.$toast.success('更新成功');
|
|
|
+ this.getInformation();
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(e => {
|
|
|
+ this.$toast(e.error);
|
|
|
+ });
|
|
|
});
|
|
|
},
|
|
|
afterRead2(e) {
|
|
|
@@ -452,14 +455,17 @@ export default {
|
|
|
...this.info,
|
|
|
bgpic: img
|
|
|
};
|
|
|
- this.$http.post('/userDetail/save', data, { body: 'json' }).then(() => {
|
|
|
- this.$toast.clear();
|
|
|
- this.$toast.success('更新成功');
|
|
|
- this.getInformation();
|
|
|
- });
|
|
|
- this.updateUser({ bg: img }).then(res => {
|
|
|
- this.$toast.clear();
|
|
|
- });
|
|
|
+ this.updateUser({ bg: img })
|
|
|
+ .then(res => {
|
|
|
+ this.$http.post('/userDetail/save', data, { body: 'json' }).then(() => {
|
|
|
+ this.$toast.clear();
|
|
|
+ this.$toast.success('更新成功');
|
|
|
+ this.getInformation();
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(e => {
|
|
|
+ this.$toast(e.error);
|
|
|
+ });
|
|
|
});
|
|
|
},
|
|
|
showConsoleEve() {
|