给元素设置背景图,地址从data数据里拿,为什么会报错找不到图片呢?
- 需求的场景描述(希望解决的问题) [代码]<[代码][代码]view[代码] [代码]wx:for[代码][代码]=[代码][代码]'{{name_tel}}'[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]label[代码] [代码]for[代码][代码]=[代码][代码]'{{item.id}}'[代码] [代码]style[代码][代码]=[代码][代码]"background-image:url({{item.imgUrl}})"[代码][代码]></[代码][代码]label[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]input[代码] [代码]id[代码][代码]=[代码][代码]'{{item.id}}'[代码] [代码]type[代码][代码]=[代码][代码]'text'[代码] [代码]placeholder[代码][代码]=[代码][代码]'{{item.placeholder}}'[代码][代码]></[代码][代码]input[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]view[代码][代码]>[代码]- 希望提供的能力 这里label的背景图地址找不到,报错为: Failed to load local image resource /pages/index/images/smapp_name.png the server responded with a status of 404 (HTTP/1.1 404 Not Found)