Commit 117b3a22 by luyt

feat:分页添加

1 parent 85b4276d
......@@ -525,6 +525,7 @@ Page({
this.getTagApi(params)
},
filterTypeFn(e) {
let { typeList } = this.data
let index = e.currentTarget.dataset.index
// console.log('index: ', index);
......@@ -543,6 +544,8 @@ Page({
this.setData({
typeList
})
//重置数据
this.clearclueData()
return this.getPageApi()
}
......@@ -552,6 +555,9 @@ Page({
wx.pro.showActionSheet({
itemList,
success(res) {
//重置数据
_this.clearclueData()
// 选中全部
let selectIndex = res.tapIndex
// console.log('selectIndex: ', selectIndex);
......@@ -593,8 +599,7 @@ Page({
// break
// }
// 清空数据
_this.setData({ typeList ,clueParams:params,clueList:[]})
_this.setData({ typeList ,clueParams:params})
_this.getPageApi(params)
},
fail(res) {
......@@ -602,6 +607,16 @@ Page({
}
})
},
//重置数据
clearclueData(){
this.setData({
clueList:[],
clueCurrentPage:1,
// hasPhone: '',
// starTag: '',
// clueSource: '',
})
},
// 打电话
phoneCallFn(e) {
let { phone } = e.currentTarget.dataset
......@@ -738,7 +753,11 @@ Page({
*/
onPullDownRefresh: function () {
// console.log('onPullDownRefresh: ');
this.onLoad()
let {clueParams} = this.data
this.clearclueData()
this.getClueInit(clueParams)
// this.onLoad()
wx.pro.showToast({
title: '刷新成功',
icon: 'loading',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!