Commit fdd555d7 by luyt

fix:重置函数添加

1 parent 49d545b1
...@@ -526,6 +526,20 @@ Page({ ...@@ -526,6 +526,20 @@ Page({
} }
this.getTagApi(params) this.getTagApi(params)
}, },
//看线索重置
resetCluelist(){
let { typeList } = this.data
typeList.forEach(item => {
item.selectIndex = 2
})
this.setData({
typeList
})
//重置数据
this.clearclueData()
this.getPageApi()
},
filterTypeFn(e) { filterTypeFn(e) {
let { typeList } = this.data let { typeList } = this.data
...@@ -540,15 +554,16 @@ Page({ ...@@ -540,15 +554,16 @@ Page({
// console.log('index: ', index) // console.log('index: ', index)
// 重置筛选 // 重置筛选
if (index == 3) { if (index == 3) {
typeList.forEach(item => { // typeList.forEach(item => {
item.selectIndex = 2 // item.selectIndex = 2
}) // })
this.setData({ // this.setData({
typeList // typeList
}) // })
//重置数据 // //重置数据
this.clearclueData() // this.clearclueData()
return this.getPageApi() // return this.getPageApi()
return this.resetCluelist()
} }
let itemList = Object.values(typeList[index]).slice(0, 2) let itemList = Object.values(typeList[index]).slice(0, 2)
...@@ -767,10 +782,8 @@ Page({ ...@@ -767,10 +782,8 @@ Page({
*/ */
onPullDownRefresh: function () { onPullDownRefresh: function () {
// console.log('onPullDownRefresh: '); // console.log('onPullDownRefresh: ');
let {clueParams} = this.data // let {clueParams} = this.data
this.clearclueData() this.resetCluelist()
this.getClueInit(clueParams)
// this.onLoad() // this.onLoad()
wx.pro.showToast({ wx.pro.showToast({
title: '刷新成功', title: '刷新成功',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!