在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問答/HTML5  HTML/ 微信小程序中將數(shù)據(jù)push到數(shù)組中,數(shù)組去渲染圖片時(shí)報(bào)錯(cuò),搞了一天了,有沒有大佬

微信小程序中將數(shù)據(jù)push到數(shù)組中,數(shù)組去渲染圖片時(shí)報(bào)錯(cuò),搞了一天了,有沒有大佬

微信小程序中將數(shù)據(jù)push到數(shù)組中,數(shù)組去渲染圖片時(shí)報(bào)錯(cuò),搞了一天了,有沒有大佬;
添加前

clipboard.png
clipboard.png
添加后
clipboard.png
clipboard.png

有沒有大佬啊
wxml:
<scroll-view class="" scroll-x style="width: 580rpx;height:160rpx;float:left;overflow:hidden;white-space:nowrap;">

<!-- 更換圖片 -->
<image style='width:160rpx;height:160rpx;margin-left:10rpxl;float:right' catchtap='changeImage' src='{{i}}' wx:for="{{pictures}}" wx:for-item='i' wx:for-index='j' data-index='{{j}}'></image>
<!-- 添加圖片 -->
<image style='width:160rpx;height:160rpx;margin-left:10rpx;float:right;display:{{isShow?"inline-block":"none"}}' src='/image/icon/u1205.png' catchtap='addImage'></image> 

</scroll-view>
<!-- 商家圖片 -->
<image style='width:160rpx;height:160rpx;margin-left:10rpx' class='shopPic' src='/image/icon/d001.png'></image>

js
data: {

pictures: ['/image/icon/u1221.png', '/image/icon/u185.png']

},
// 添加圖片
addImage:function (){

var _that = this
wx.chooseImage({
  count:1,
  sizeType: ['original', 'compressed'],
  sourceType: ['album', 'camera'],
  success: function(res) {
    var tempFilePaths = _that.data.pictures.push(res.tempFilePaths[0])
    _that.setData({
      pictures: tempFilePaths
    })
  },
})

},
報(bào)錯(cuò)內(nèi)容
VM12431:2 Failed to load local image resource /pages/config-window/2
the server responded with a status of 404 (HTTP/1.1 404 Not Found)
Thu May 17 2018 11:31:02 GMT+0800 (中國標(biāo)準(zhǔn)時(shí)間) 渲染層網(wǎng)絡(luò)層錯(cuò)誤

回答
編輯回答
短嘆

pictures不應(yīng)該是數(shù)組嗎,里面有很多項(xiàng),你看看setData后是不是變成一項(xiàng)了

2018年4月3日 05:27
編輯回答
朕略萌

去“詳情” 把 “不校驗(yàn)合法域名、web-view(業(yè)務(wù)域名)、TLS 版本以及 HTTPS 證書” 這個(gè)勾選上

2017年8月15日 18:48
編輯回答
卟乖

圖片的路徑對嗎?

2017年2月6日 06:47