开发工具能收发数据,手机上“预览”却不能进行收发数据
- 需求的场景描述(希望解决的问题)
image.js
Page({ data: { list: [], loadingHidden: false }, onLoad: function (options) { // 页面初始化 options为页面跳转所带来的参数 //加载最新 this .requestData( 'CheckData' ); }, requestData: function (a) { var that = this ; wx.request({ url: 'https://www.bzesd.com/wx/index.php' , data: { type: a, tb: 'test' }, method: 'GET' , success: function (res) { that.setData({ list: that.data.list.concat(res.data.list), loadingHidden: true , }) } }) } }) |
< scroll scroll-y = "true" style = "height: 100%" > < block wx:for-items = "{{list}}" wx:key = "id" > < view class = "divLine" ></ view > < view class = "top" > < view class = "title-time" > < image class = "avator" src = "{{item.pic}}" mode = "aspectFit" ></ image > < text class = "title" >{{item.names}}</ text > < text class = "time" >{{item.contents}}</ text > </ view > </ view > </ block > < loading hidden = "{{loadingHidden}}" >正在加载...</ loading > </ scroll > |
这是开发工具上编译的成果
请求,接收都正常
但是在手机上,怎么就一直转圈圈呢?
- 希望提供的能力