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
50bea767
Commit
50bea767
authored
Jun 05, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify: 优惠券列表切换问题
parent
b7cefa1a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
6 deletions
+16
-6
coupons.js
src/pages/coupons/coupons.js
+15
-5
coupons.wxml
src/pages/coupons/coupons.wxml
+1
-1
No files found.
src/pages/coupons/coupons.js
View file @
50bea767
...
@@ -47,8 +47,8 @@ wxService.page({
...
@@ -47,8 +47,8 @@ wxService.page({
}
else
{
}
else
{
this
.
setData
({
this
.
setData
({
currentTab
:
current
,
currentTab
:
current
,
couponList
:
[],
// 清空数据
//
couponList: [], // 清空数据
invalidCouponList
:
[],
//
invalidCouponList: [],
})
})
}
}
...
@@ -85,12 +85,24 @@ wxService.page({
...
@@ -85,12 +85,24 @@ wxService.page({
params
=
{
params
=
{
status
:
1
status
:
1
}
}
if
(
pageNo
==
1
){
this
.
setData
({
pageNo
:
1
,
couponList
:
[],
// 清空数据
})
}
}
else
{
}
else
{
params
=
{
params
=
{
statusNot
:
1
statusNot
:
1
}
}
if
(
pageNo
==
1
){
this
.
setData
({
invalidCouponList
:
[],
invalidPageNo
:
1
})
}
}
}
wxService
.
post
(
`/coupon/coupon/listWithMember4Mina?number=
${
pageNo
}
&size=
${
pageSize
}
`
,
params
).
then
(
res
=>
{
wxService
.
post
(
`/coupon/coupon/listWithMember4Mina?number=
${
pageNo
}
&size=
${
pageSize
}
`
,
params
).
then
(
res
=>
{
const
{
result
,
data
}
=
res
.
data
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
){
if
(
result
==
0
){
...
@@ -116,7 +128,6 @@ wxService.page({
...
@@ -116,7 +128,6 @@ wxService.page({
invalidTotalElements
:
data
.
totalElements
invalidTotalElements
:
data
.
totalElements
})
})
}
}
}
}
}).
finally
(()
=>
{
}).
finally
(()
=>
{
...
@@ -133,7 +144,6 @@ wxService.page({
...
@@ -133,7 +144,6 @@ wxService.page({
onReachBottom
:
function
()
{
onReachBottom
:
function
()
{
// 可使用 0 or 已失效 1
// 可使用 0 or 已失效 1
const
{
currentTab
,
pageNo
,
pageSize
,
totalPages
,
invalidPageNo
,
invalidTotalPages
}
=
this
.
data
const
{
currentTab
,
pageNo
,
pageSize
,
totalPages
,
invalidPageNo
,
invalidTotalPages
}
=
this
.
data
console
.
log
(
'2222'
,
currentTab
)
if
(
currentTab
==
0
)
{
if
(
currentTab
==
0
)
{
if
(
pageNo
<
totalPages
)
{
if
(
pageNo
<
totalPages
)
{
this
.
setData
({
this
.
setData
({
...
...
src/pages/coupons/coupons.wxml
View file @
50bea767
...
@@ -57,7 +57,7 @@
...
@@ -57,7 +57,7 @@
<image src='/assets/imgs/qr-code.png' />
<image src='/assets/imgs/qr-code.png' />
</view>
</view>
<view class='coupon-info'>
<view class='coupon-info'>
<view class='coupon-name fs-28'>{{item.t
ypeDesc
}}</view>
<view class='coupon-name fs-28'>{{item.t
itle
}}</view>
<view class='coupon-time fs-24'>{{item.startTime}} 至 {{item.endTime}}</view>
<view class='coupon-time fs-24'>{{item.startTime}} 至 {{item.endTime}}</view>
<view class='coupon-desc fs-24'>{{item.notice}}</view>
<view class='coupon-desc fs-24'>{{item.notice}}</view>
</view>
</view>
...
...
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