收藏
回答

下拉刷新问题?

小程序下拉刷新的时候,数据加载完,但是头部的三个小圆点一直不消失一直在,使用了wx.stopPullDownRefresh()也没有效果,怎么解决求教

最后一次编辑于  08-14  (未经腾讯允许,不得转载)
邀请回答
复制链接收藏投诉关注问题回答

3 个回答

  • var 友原
    var 友原
    08-14

    是在哪里调用的

    08-14
    赞同
    回复 1
    • 追封绝月
      追封绝月
      08-14
      代码片段在下面
      08-14
      回复
  • ʚ青哥ɞ
    ʚ青哥ɞ
    08-14

    来个代码片段看看

    08-14
    赞同
    回复 1
    • 追封绝月
      追封绝月
      08-14
      下拉刷新的代码片段在下面
      08-14
      回复
  • 追封绝月
    追封绝月
    08-14

    /**

      * 页面相关事件处理函数--监听用户下拉动作

      */

    onPullDownRefresh: function() {

    let that = this

    let latitude = that.data.latitude

    let longitude = that.data.longitude

    that.setData({

    nomoreHide:true,

    noInfoHide:true,

    hidden: true,

    isOpen: true,

    height: 'auto',

    overflow: true,

    shopData: [],

    vipData: [],

    categoryArea: [{

    name: '所有区域',

    type: '03',

    code: ''

    }],

    })

    that.regionDic(that.data.city_code)

    that.getTaskAdvertisementInfo(that.data.city_code)

    that.getTotal(that.data.streetId)

    //没有选择任何区域进行下拉刷新,(code值为当前街道的区域编码)

    if (isBlank(that.data.code) && isBlank(that.data.streetCodeId)) {

    that.getTaskPage(longitude, latitude, that.data.paramter, that.data.mold, '01', that.data.streetId, that.data.ordercond || 'comprehensive', that.data.month, '02', 1, 10)

    that.getVipShopTaskPage(longitude, latitude, that.data.paramter, that.data.mold, '01',  that.data.streetId, that.data.ordercond || 'comprehensive', that.data.month, '02', 1, 100)

    }


    //选择了区域筛选中所有区域,(code值为当前市的区域编码)

    if (!isBlank(that.data.code) && that.data.code == that.data.countyCode) {

    that.getTaskPage(longitude, latitude, that.data.paramter, that.data.mold, '01', that.data.code, that.data.ordercond || 'comprehensive', that.data.month, '02', 1, 10)

    that.getVipShopTaskPage(longitude, latitude, that.data.paramter, that.data.mold, '01', that.data.code, that.data.ordercond || 'comprehensive', that.data.month, '02', 1, 100)

    }


    //选择了区域筛选,选择了市,选择了对应街道,(code值为当前街道的区域编码)

    if (!isBlank(that.data.streetCodeId)) {

    that.getTaskPage(longitude,latitude, that.data.paramter, that.data.mold, '01', that.data.streetCodeId, that.data.ordercond || 'comprehensive', that.data.month, '02', 1, 10)

    that.getVipShopTaskPage(longitude, latitude, that.data.paramter, that.data.mold, '01', that.data.streetCodeId, that.data.ordercond || 'comprehensive', that.data.month, '02', 1, 100)

    return

    }


    //用户重新定位之后

    if(that.data.streetEnter && that.data.streetEnter=='0808'){

    that.getTaskPage(longitude, latitude, that.data.paramter, that.data.mold, '01', that.data.streetId, that.data.ordercond || 'comprehensive', that.data.month, '02', 1, 10)

    that.getVipShopTaskPage(longitude, latitude, that.data.paramter, that.data.mold, '01', that.data.streetId, that.data.ordercond || 'comprehensive', that.data.month, '02', 1, 100)


    }

    wx.stopPullDownRefresh();

    },


    08-14
    赞同
    回复
问题标签