vue gets the picture list from the background, and then v-for traverses the rendering failure. The picture is not displayed. Ask for help
part of the code is as follows: no problem, no error data can be reported. The
img tag is wide and high and the path is entered directly in the browser url. You can view the picture
but do not display the picture and find that the network does not have a picture.
figure 2 is network
normal request should be like figure 3. If you ask for a picture again, network should have a request similar to figure 3.
figure 3 is my request to enter a picture link directly on URL
ask for help
<div :class="{imgItem:i.thumb_name!="" , item:i.thumb_name==""}" v-for="(i,index) in fileList" :key="index">
<span class="img" v-if="i.thumb_name!=""">
<span>
<img :src=""114.215.174.214:8080/borrow/img/"+i.thumb_name" alt="">
<i class="imgbaged">
{{i.typeName}}
</i>
</span>
</span>
</div>
<script>
export default {
data() {
return {
fileList: []
};
},
created(){
this.$axios(url, "post", JSON.stringify(data)).then(res => {
if (res.data.code != 200) {
this.$vux.toast.show({
type: "text",
text: ""
});
} else {
this.$nextTick(() => {
this.fileList = res.data.data;
});
console.log(this.fileList);
}
});
}
}
}
</script>