|
@@ -318,13 +318,22 @@ export default {
|
|
}
|
|
}
|
|
formData.append('file', param.file)
|
|
formData.append('file', param.file)
|
|
Http.upload(Apis.FILE.UPLOAD_IMAGE.replace('{userId}', this.user.userVO.id), formData, config).then((res) => {
|
|
Http.upload(Apis.FILE.UPLOAD_IMAGE.replace('{userId}', this.user.userVO.id), formData, config).then((res) => {
|
|
- console.log('上传成功')
|
|
|
|
|
|
+ this.hideLoading()
|
|
this.authentication.agencyPhoto = res.data
|
|
this.authentication.agencyPhoto = res.data
|
|
console.log(res.data)
|
|
console.log(res.data)
|
|
notify('success', '上传成功')
|
|
notify('success', '上传成功')
|
|
this.$refs['authentication'].validateField('agencyPhoto');
|
|
this.$refs['authentication'].validateField('agencyPhoto');
|
|
}).catch(error => {
|
|
}).catch(error => {
|
|
- notify('error', error.data)
|
|
|
|
|
|
+ this.hideLoading()
|
|
|
|
+ try {
|
|
|
|
+ if (error.response.status === 413){
|
|
|
|
+ notify('error', '文件过大,请选择小于20M的图片')
|
|
|
|
+ }else if (error.response.status === 500){
|
|
|
|
+ notify('error', '上传文件发生错误,请稍后重试')
|
|
|
|
+ }
|
|
|
|
+ }catch (e) {
|
|
|
|
+ notify('error', error.data)
|
|
|
|
+ }
|
|
})
|
|
})
|
|
},
|
|
},
|
|
//设置服务类型
|
|
//设置服务类型
|