码迷,mamicode.com
首页 > 编程语言 > 详细

二次遍历数组-

时间:2020-01-11 11:27:51      阅读:96      评论:0      收藏:0      [点我收藏+]

标签:cell   key   建设   enter   data   block   class   lse   tap   

// 区域 0 未选中当前地区 1:未选中
jgArea: [{
id: "001",
areaName: "顺庆",
active: "true",
banks: [{
bankname: "建设银行",
accountname: "多少是多少",
account: "324",
cun: "存入网点1",
zhi: "支出网点1",
},
{
bankname: "建设银行",
accountname: "多少是多少",
account: "324",
cun: "存入网点2",
zhi: "支出网点2",

},
{
bankname: "农业银行",
accountname: "多少是多少",
account: "324",
cun: "存入网点3",
zhi: "支出网点3",

}
]
},
{
id: "002",
areaName: "嘉琳",
active: "false",
banks: [{
bankname: "建设银行",
accountname: "多少是多少",
account: "324",
cun: "存入网点1",
zhi: "支出网点1",

}, {
bankname: "建设银行",
accountname: "多少是多少",
account: "324",
cun: "存入网点2",
zhi: "支出网点2",

}, {
bankname: "农业银行",
accountname: "多少是多少",
account: "324",
cun: "存入网点3",
zhi: "支出网点3",

}]
},
{
id: "003",
areaName: "高坪",
active: "false",
banks: [{
bankname: "建设银行",
accountname: "多少是多少",
account: "324",
cun: "存入网点1",
zhi: "支出网点1",

}, {
bankname: "建设银行",
accountname: "多少是多少",
account: "324",
cun: "存入网点2",
zhi: "支出网点2",

}]
}
]

<block wx:for="{{jgArea}}" wx:key="{{jgArea.bank}}" wx:for-item="itemName">
<view data-item="{{itemName}}">
<view class="title">
<view class="left">{{itemName.areaName}}</view>
</view>
<block data-item="{{itemName}}" wx:for="{{itemName.banks}}" wx:for-item="item" wx:key="{{itemName.banks.account}}">
<view class="weui-cell " data-item="{{item}}" bindtap="toDetail">
<view class="weui-cell__bd">{{item.bankname}}</view>
<view class="weui-cell__ft">
<i-icon type="enter" size="28" />
</view>
</view>
</block>
</view>
</block>

二次遍历数组-

标签:cell   key   建设   enter   data   block   class   lse   tap   

原文地址:https://www.cnblogs.com/wen-/p/12179286.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!