zoukankan      html  css  js  c++  java
  • 微信小程序

     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   },

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

  • 相关阅读:
    再逛开心网
    WAPM
    win2003安装flash cs4
    [AS3][物体的运动]
    转sql产生百万记录
    KeyedList
    timer 焦点
    sql优化
    灰色
    参数
  • 原文地址:https://www.cnblogs.com/cisum/p/9497698.html
Copyright © 2011-2022 走看看