<view class="container-count" style="background-image: url('mage/login/bg.png');background-size:cover;"></view>
把图片转成base64
完事
this.setData({
bgImg: "data:image/png;base64," + wx.getFileSystemManager().readFileSync("/image/login/bg.png","base64")
})
<view class="container-count" style="background-image: url({{bgImg}});background-size:cover;"></view>