小程序 如何遍历数组中的数组?里面的数组是图片路径?
发布于 3 年前 作者 guiying85 14263 次浏览 来自 问答
0:{
bookNum17
picUrls: Array(3)
0"http://bookcover.yuewen.com/qdbimg/349573/1019664125/150"
1"http://bookcover.yuewen.com/qdbimg/349573/1979049/150"
2"http://bookcover.yuewen.com/qdbimg/349573/1024868626/150"
length: 3
tagId: 1
tagName: "仙侠"}
1: {tagId2, tagName: "历史", bookNum: 7, picUrls: Array(3)}
2: {tagId3, tagName: "科幻", bookNum: 14, picUrls: Array(3)}
3: {tagId4, tagName: "都市", bookNum: 13, picUrls: Array(3)}
4: {tagId5, tagName: "玄幻", bookNum: 22, picUrls: Array(3)}
5: {tagId6, tagName: "轻小说", bookNum: 16, picUrls: Array(3)}
6: {tagId7, tagName: "悬疑", bookNum: 4, picUrls: Array(3)}
7: {tagId8, tagName: "游戏", bookNum: 6, picUrls: Array(3)}
8: {tagId9, tagName: "奇幻", bookNum: 1, picUrls: Array(3)}
这是我写的一层可以出来,二层出不来
<view class="typeBookItem" wx:for="{{bookSearchCategory}}" wx:for-item="item" wx:key="tagId">
  <view class="typeBookTitle">{{item.tagName}}</view>
  <view class="typeBookCount">{{item.bookNum}}</view>
  <view class="typeBookImgs" wx:for="{{item.picUrls}}" wx:for-item="abc" wx:key="index">
    <image src="{{abc}}"></image>
  </view>
</view>
2 回复

具体是指?我这边正常

嵌套循环?

回到顶部