分享你我的心得.
共乘一片美好网络.

小程序运行报错:“Failed to load image xxx.png the server responded with a status of 404

错误原因:
由于这是因为初始化的时候,变量还没渲染进去导致的。

解决方法:
在src前面加个:
wx:if
或者直接写 /static/img/xx.png,比如:把图片放在根目录下的static文件下

例子:

<image wx:if=”{{item}}” src=”{{item}}” />

赞(1)
未经允许不得转载:小叶白龙博客 » 小程序运行报错:“Failed to load image xxx.png the server responded with a status of 404
分享到: 更多 (0)

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址