Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
business-assistant
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 58704443
authored
Oct 30, 2022
by
luyt
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix:处理分页逻辑
1 parent
fdd555d7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
41 deletions
pages/tab/index/index.js
pages/tab/index/index.js
View file @
5870444
...
@@ -533,7 +533,8 @@ Page({
...
@@ -533,7 +533,8 @@ Page({
item
.
selectIndex
=
2
item
.
selectIndex
=
2
})
})
this
.
setData
({
this
.
setData
({
typeList
typeList
,
clueParams
:{}
})
})
//重置数据
//重置数据
this
.
clearclueData
()
this
.
clearclueData
()
...
@@ -544,25 +545,8 @@ Page({
...
@@ -544,25 +545,8 @@ Page({
let
{
typeList
}
=
this
.
data
let
{
typeList
}
=
this
.
data
let
index
=
e
.
currentTarget
.
dataset
.
index
let
index
=
e
.
currentTarget
.
dataset
.
index
// console.log('index: ', index);
// let itemList = []
// let params = {
// clueSource: '',
// hasPhone: '',
// starTag: ''
// }
// console.log('index: ', index)
// 重置筛选
// 重置筛选
if
(
index
==
3
)
{
if
(
index
==
3
)
{
// typeList.forEach(item => {
// item.selectIndex = 2
// })
// this.setData({
// typeList
// })
// //重置数据
// this.clearclueData()
// return this.getPageApi()
return
this
.
resetCluelist
()
return
this
.
resetCluelist
()
}
}
...
@@ -582,10 +566,7 @@ Page({
...
@@ -582,10 +566,7 @@ Page({
let
params
=
typeList
.
reduce
((
obj
,
item
,
index
)
=>
{
let
params
=
typeList
.
reduce
((
obj
,
item
,
index
)
=>
{
console
.
log
(
' item: '
,
item
)
console
.
log
(
' item: '
,
item
)
if
(
item
[
'key'
])
{
if
(
item
[
'key'
])
{
// selectIndex = index == 2 ? selectIndex + 1 : selectIndex
// console.log('selectIndex: ', selectIndex);
let
itemIndx
=
item
.
selectIndex
let
itemIndx
=
item
.
selectIndex
// console.log('itemIndx: ', itemIndx);
// key: 'clueSource'
// key: 'clueSource'
if
(
item
[
'key'
]
==
'clueSource'
)
{
if
(
item
[
'key'
]
==
'clueSource'
)
{
// itemIndx += 1
// itemIndx += 1
...
@@ -597,24 +578,6 @@ Page({
...
@@ -597,24 +578,6 @@ Page({
return
obj
return
obj
},
{})
},
{})
console
.
log
(
params
)
console
.
log
(
params
)
// let num
// if (index == 2) {
// num = res.tapIndex + 1
// } else {
// num = res.tapIndex
// }
// switch (index) {
// case 0:
// params.hasPhone = num
// break
// case 1:
// params.starTag = num
// break
// case 2:
// params.clueSource = num
// break
// }
// 清空数据
// 清空数据
_this
.
setData
({
typeList
,
clueParams
:
params
})
_this
.
setData
({
typeList
,
clueParams
:
params
})
_this
.
getPageApi
(
params
)
_this
.
getPageApi
(
params
)
...
@@ -782,8 +745,9 @@ Page({
...
@@ -782,8 +745,9 @@ Page({
*/
*/
onPullDownRefresh
:
function
()
{
onPullDownRefresh
:
function
()
{
// console.log('onPullDownRefresh: ');
// console.log('onPullDownRefresh: ');
// let {clueParams} = this.data
let
{
clueParams
}
=
this
.
data
this
.
resetCluelist
()
this
.
getClueInit
(
clueParams
)
// this.resetCluelist()
// this.onLoad()
// this.onLoad()
wx
.
pro
.
showToast
({
wx
.
pro
.
showToast
({
title
:
'刷新成功'
,
title
:
'刷新成功'
,
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment