About how to get the data returned by the backend when uploading element el-upload.

if you want to upload an avatar, use the el-upload method of element and enter the port address to upload successfully. How do you accept the value returned by the backend?

<el-form-item label="">
   <el-upload
     class="avatar-uploader"
     action="http://192.168.1.47:9997/api/account/Upload"
     :show-file-list="false"
     :on-success="handleAvatarSuccess"
     :before-upload="beforeAvatarUpload">
     <img v-if="imageUrl" :src="imageUrl" class="avatar">
     <i v-else class="el-icon-plus avatar-uploader-icon"></i>
   </el-upload>
 </el-form-item>

the backend returned a value

clipboard.png

how do I get this value? I"d better have a code hint. I have front-end scum. Thank you, boss

.

on-success is the hook when the file is uploaded successfully. You can get the data returned from the backend in this hook.

...
:on-success="handleAvatarSuccess"
...
methods: {
    handleAvatarSuccess(response, file, fileList) {
        //response
    }
}

   handleAvatarSuccess(res, file) {
       //res
   },
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b30305-2aa3a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b30305-2aa3a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?