Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
7
7-Eleven
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
高淑倩
7-Eleven
Commits
2996062b
Commit
2996062b
authored
Oct 22, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
销售任务&&招募任务
parent
52c53bdc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
8 deletions
+50
-8
project.config.json
src/project.config.json
+2
-2
kpi.js
src/shoppingGuid/page/pages/kpi/kpi.js
+48
-6
No files found.
src/project.config.json
View file @
2996062b
...
...
@@ -39,7 +39,7 @@
"list"
:
[]
},
"miniprogram"
:
{
"current"
:
5
5
,
"current"
:
5
0
,
"list"
:
[
{
"id"
:
-1
,
...
...
@@ -375,7 +375,7 @@
"scene"
:
null
},
{
"id"
:
-1
,
"id"
:
50
,
"name"
:
"kpi"
,
"pathName"
:
"pages/shopping/kpi/kpi"
,
"query"
:
""
,
...
...
src/shoppingGuid/page/pages/kpi/kpi.js
View file @
2996062b
// shoppingGuid/page/pages/kpi/kpi.js
const
app
=
getApp
()
const
wxService
=
require
(
'../../../../utils/wxService'
)
wxService
.
page
({
...
...
@@ -13,7 +14,9 @@ wxService.page({
// { name: '维护任务', type: 4, isActive: false }
],
current
:
1
,
list
:
[{
id
:
1
,},{
id
:
2
},{
id
:
3
},{
id
:
4
},{
id
:
5
},{
id
:
6
},{
id
:
7
},{
id
:
8
}]
list
:
[{
id
:
1
,},{
id
:
2
},{
id
:
3
},{
id
:
4
},{
id
:
5
},{
id
:
6
},{
id
:
7
},{
id
:
8
}],
pageSize
:
10
,
pageNo
:
1
},
/**
...
...
@@ -28,9 +31,33 @@ wxService.page({
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{
const
{
pageSize
,
pageNo
,
current
}
=
this
.
data
this
.
getTaskPage
(
pageSize
,
pageNo
,
current
)
},
getTaskPage
(
pageSize
,
pageNo
,
current
)
{
// 1 销售任务 2 招募任务
wx
.
showLoading
({
title
:
'加载中'
})
const
query
=
{
type
:
current
,
brandId
:
app
.
globalData
.
brandId
,
pageSize
,
pageNo
,
}
wxService
.
post
(
`/marketing/shoppingguide/task/page`
,
query
).
then
(
res
=>
{
if
(
res
)
{
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
)
{
wx
.
hideLoading
()
// pageNo == 1? [...data.content]: [...this.data.couponList,...data.content],
// this.setData({
// cartList:
// })
}
}
})
},
// 点击事件
//分类点击
onTopBarTap
(
e
){
...
...
@@ -44,8 +71,17 @@ wxService.page({
this
.
data
.
current
=
this
.
data
.
navBar
[
index
].
type
;
this
.
setData
({
pageNo
:
1
,
navBar
:
this
.
data
.
navBar
,
current
:
this
.
data
.
current
},()
=>
{
if
(
wx
.
pageScrollTo
)
{
wx
.
pageScrollTo
({
scrollTop
:
0
})
}
const
{
pageSize
,
pageNo
,
current
}
=
this
.
data
this
.
getTaskPage
(
pageSize
,
pageNo
,
current
)
});
},
//销售任务item点击事件
...
...
@@ -79,7 +115,12 @@ wxService.page({
* 页面上拉触底事件的处理函数
*/
onReachBottom
:
function
()
{
},
console
.
log
(
'-------------'
)
this
.
setData
({
pageNo
:
this
.
data
.
pageNo
+
1
,
},()
=>
{
const
{
pageSize
,
pageNo
,
current
}
=
this
.
data
this
.
getTaskPage
(
pageSize
,
pageNo
,
current
)
})
}
})
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment