[摘要]//wx:for循环选项<view class=function_container><view class=function_item bindtap=readData wx:f...
//wx:for循环选项
<view class='function_container'>
<view class='function_item' bindtap='readData' wx:for="{{functions}}" wx:for-index="idx" wx:for-item="function">
<image class='function_img' src='{{function.pic_url}}' mode='aspectFit' />
<view data-id="{{function.id}}" class='function_name'>{{function.name}}</view>
</view>
</view>
//js
page({
data:{
functions: [
{
"name": "库存",
"pic_url": '../image/half-star.png',
},
{
"name": "报表",
"pic_url": '../image/half-star.png'
},
{
"name": "商品管理",
"pic_url": '../image/half-star.png'
},
{
"name": "订货",
"pic_url": '../image/half-star.png'
},
{
"name": "飞机票",
"pic_url": '../image/half-star.png'
},
{
"name": "火车票",
"pic_url": '../image/half-star.png'
},
{
"name": "手机充值",
"pic_url": '../image/half-star.png'
},
{
"name": "水电煤",
"pic_url": '../image/half-star.png'
}
]
},
}
})
以上就是微信小程序中如何在wx:for里判断具体哪一个页面跳转的详细内容,更多请关注php中文网其它相关文章!
微信
分享
小程序是一种不需要下载安装即可使用的应用,它实现了应用“触手可及”的梦想,用户扫一扫或者搜一下即可打开应用。
关键词:微信小程序中如何在wx:for里判断具体哪一个页面跳转