<block wx:for-items="{{result}}"><view style="width:100%; height: 50rpx"></view><!--index默认为下标,item为每项--><text>第{{index}}条数据 {{item.desc}}</text> <text>地址{{item.url}}</text></block>js
Page({ data:{// text:"这是一个页面"result: [] }, onLoad:function() { var that = this;wx.request({ url: "http://gank.io/api/data/Android/30/1", method: "GET", success:function(res) { that.setData({ result: res.data.results }) } }) }, listenerButton:function() { }})感谢阅读此文,希望能帮助到大家,谢谢大家对本站的支持!