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

外层循环正常嵌套,内层循环嵌套的时候,把item.swiper_buy作为数组循环wx:for="{{item.swiper_buy}}",然后给item重新命名wx:for-item="cell",内部循环的时候,就是{{cell.属性}}

 


   
     
       
         
         
            嘻哈帮街舞.{{item.card_name}}
            {{item.card_use}}
            {{item.card_region}}
         

       

       
         
           
             
                ¥{{cell.buy_price}}
                {{cell.card_species}}
             

              {{cell.buy_send}}
           

         

       

     

   

   

 

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: "有效期内可以享受日常课"

      },

    ]

  }

 

你可能感兴趣的:(微信小程序 for循环嵌套怎么取值)