小程式圖片不顯示問題解決
弄了2個小時,http和https的圖片就是不顯示,但是相對路徑的圖片就顯示。
最後查出問題是因為:
image標籤被text包裹了,text標籤只能用來顯示文字,你把text標籤去掉應該就好了。
<text><imagesrc="{{item.headimg}}"mode="scaleToFill"lazy-load="false"></image></text>
改成
<imagesrc="{{item.headimg}}"mode="scaleToFill"lazy-load="false"></image>