|
|
@@ -40,7 +40,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <el-dialog title="修改头像" v-model="show" width="780px">
|
|
|
+ <el-dialog title="修改头像" v-model="show" width="780px" @close="close">
|
|
|
<div>
|
|
|
<div>
|
|
|
<span
|
|
|
@@ -114,10 +114,9 @@ import { Cropper } from 'vue-advanced-cropper'
|
|
|
import 'vue-advanced-cropper/dist/style.css'
|
|
|
import api from '@/api/index.js'
|
|
|
import website from '@/config/website.js'
|
|
|
-import { getToken, removeToken } from '@/utils/auth.js'
|
|
|
+import { getToken } from '@/utils/auth.js'
|
|
|
import { Base64 } from 'js-base64'
|
|
|
import uploadOffice from '@/components/upload-office/index.vue'
|
|
|
-import router from '@/router/index.js'
|
|
|
|
|
|
export default {
|
|
|
components: {
|
|
|
@@ -248,9 +247,15 @@ export default {
|
|
|
const data = { id: this.user.info.userId, avatar }
|
|
|
this.$api.dash.updateAvatar(data).then(res => {
|
|
|
if (res.code === 200) {
|
|
|
- console.log(res)
|
|
|
+ this.$message.success(res.msg)
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg)
|
|
|
}
|
|
|
})
|
|
|
+ },
|
|
|
+ close() {
|
|
|
+ this.img = ''
|
|
|
+ this.previewImg = ''
|
|
|
}
|
|
|
}
|
|
|
}
|