From the returned data, there is the src address of img, <img :src="item.img_url" alt="">
, but the src address path will not be compiled by webpack , and still maintains the relative path status, eventually generating a 404 error.
How to solve it?
After you use
ajax
to get the array containing theseimg_url
, it will be processed immediatelySimilar to this