下拉刷新问题?
发布于 6 年前 作者 hren 12790 次浏览 来自 官方Issues

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

3 回复

/**

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

  */

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();

},

来个代码片段看看

是在哪里调用的

回到顶部