cisum
 1   // 拉取数据
 2   fetchData: function() {
 3     wx.request({
 4       url: \'http://v.juhe.cn/toutiao/index\',
 5       data: {
 6         type: \'\',
 7         key: \'482e213ca7520ff1a8ccbb262c90320a\'
 8       },
 9       header: {
10         \'contentType\': \'application/json\'
11       },
12       success: function(res) {
13         console.log(res.data)
14       }
15     });
16   },
17 
18   // 下拉刷新
19   onPullDownRefresh: function() {
20     console.log(\'onPullDownRefresh\', \'下拉刷新....\');
21     this.fetchData();
22     wx.stopPullDownRefresh;
23   },

 

即重新调用请求数据.... 建议逻辑分开写

分类:

技术点:

相关文章:

  • 2022-01-07
  • 2022-01-07
  • 2022-01-07
  • 2021-10-25
  • 2021-12-11
  • 2022-01-20
  • 2022-02-20
  • 2021-11-15
猜你喜欢
  • 2021-09-28
  • 2022-01-07
  • 2022-01-07
  • 2021-12-10
相关资源
相似解决方案