E企盈营销工具技术服务商 热线:4006-838-530

微信小程序for循环嵌套怎么取值

E企盈直播平台营销卖货系统

外层循环正常嵌套,内层循环嵌套的时候,把item.swiper_buy作为数组循环wx:for=”{{item.swiper_buy}}”,然后给item重新命名wx:for-item=”cell”,内部循环的时候,就是{{cell.属性}} block wx:for=”{{swiper_object}}” wx:key=”index”    swiper-item      view class=’swiper_in’        view class=’head_img’          image src=”{{item.head_img}}”/image          view class=’head_in’            view class=’card_name’嘻哈帮街舞.{{item.card_name}}/view            view class=”card_i”{{item.card_use}}/view            view class=’use_region'{{item.card_region}}/view          /view        /view        view class=’buy_list’          block wx:for=”{{item.swiper_buy}}” wx:for-item=”cell” wx:key=”index”            view class=”buy_item {{num==index?’current’:”}}”   data-index=”{{index}}” catchtap=’switchTab’              view class=’buy_price’                view class=’card_price’¥{{cell.buy_price}}/view                view class=’nk_species'{{cell.card_species}}/view              /view              view class=’buy_zs'{{cell.buy_send}}/view            /view          /block        /view      /view    /swiper-item    /block data: {    num: 0,    swiper_object:[      {        swiper_buy: [          {            buy_price: “1100”,            card_species: “年卡D”,            buy_send: “购买1课点”          },          {            buy_price: “2200”,            card_species: “年卡C”,            buy_send: “购买9课点”          },          {            buy_price: “3300”,            card_species: “年卡B”,            buy_send: “购买3课点”          }        ],        head_img:”../../images/head_img1.png”,        card_name:”次卡”,        card_use:”49/课点”,        card_region:”本课点全国通用”      },      {        swiper_buy: [          {            buy_price: “1400”,            card_species: “一年通”,            buy_send: “有效期内享受日课程课”          },          {            buy_price: “2500”,            card_species: “两年通”,            buy_send: “有效期内享受日课程课”          },          {            buy_price: “46000”,            card_species: “单店通”,            buy_send: “赠本企业续存期内”          }        ],        head_img: “../../images/head_img2.png”,        card_name: “少儿畅舞卡”,        card_use: “本地使用”,        card_region: “有效期内可以享受日常课”      },    ]  }

赞(0) 打赏
未经允许不得转载:E企盈小程序开发-热线:4006-838-530 » 微信小程序for循环嵌套怎么取值
分享到: 更多 (0)
E企盈小程序直播营销卖货系统
E企盈直播平台营销卖货系统

评论 抢沙发

E企盈小程序开发

联系我们联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏