图片重复加载
发布于 4 年前 作者 qianxia 5311 次浏览 来自 官方Issues

本人用微信原生开发,

js文件中有host代表服务器地址,photo代表图片具体地址;

wxml文件中使用以下代码进行图片加载

<image src=’{{host}}{{photo}}’ class=“photo”></image>

出现的现象控制台输出:VM3540:1 Failed to load image {{host}}

the server responded with a status of 404 (HTTP/1.1 404 Not Found) From server "{{host}} IP地址"但是图片正常显示;

个人推测问题在于 开发工具对图片加载了两次,一次加载{{host}},一次加载{{host}}{{photo}}

1 回复

控制台还有这样输出的?

VM3540:1 Failed to load image {{host}}the server responded with a status of 404 (HTTP/1.1 404 Not Found)  From server “{{host}} IP地址

回到顶部