Commit 117b3a22 by luyt

feat:分页添加

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