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
9c2b654a
Commit
9c2b654a
authored
Jan 09, 2020
by
谢中龙
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '711_prod' into '711_dev_7.5.0'
711 prod See merge request
!178
parents
196d7cd6
64423d8b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
35 deletions
+25
-35
coupons.js
src/pages/coupons/coupons.js
+24
-33
coupons.wxml
src/pages/coupons/coupons.wxml
+1
-2
No files found.
src/pages/coupons/coupons.js
View file @
9c2b654a
...
...
@@ -158,43 +158,33 @@ wxService.page({
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
:
function
()
{},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
:
function
()
{
// 可使用 0 or 已失效 1
const
{
currentTab
,
pageNo
,
pageSize
,
totalPages
,
invalidPageNo
,
invalidTotalPages
}
=
this
.
data
if
(
currentTab
==
0
)
{
if
(
pageNo
<
totalPages
)
{
this
.
setData
({
pageNo
:
pageNo
+
1
,
})
// status 1
this
.
getCouponList
(
this
.
data
.
pageNo
,
pageSize
,
1
)
}
else
{
this
.
setData
({
noMoreCoupon
:
true
})
}
//scoll view 触到底部
onBottom
()
{
const
{
currentTab
,
pageNo
,
pageSize
,
totalPages
,
invalidPageNo
,
invalidTotalPages
}
=
this
.
data
if
(
currentTab
==
0
)
{
if
(
pageNo
<
totalPages
)
{
this
.
setData
({
pageNo
:
pageNo
+
1
,
})
// status 1
this
.
getCouponList
(
this
.
data
.
pageNo
,
pageSize
,
1
)
}
else
{
this
.
setData
({
noMoreCoupon
:
true
})
}
}
else
{
// if ( invalidPageNo < invalidTotalPages) {
// this.setData({
// invalidPageNo: invalidPageNo + 1,
// })
// // status 0
// this.getCouponList(this.data.invalidPageNo, pageSize, 0)
// } else {
// this.setData({
// noMoreCouponInvalid: true
// })
// }
this
.
setData
({
noMoreCouponInvalid
:
true
})
}
},
onPullDownRefresh
:
function
()
{},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
:
function
()
{
},
})
\ No newline at end of file
src/pages/coupons/coupons.wxml
View file @
9c2b654a
...
...
@@ -7,7 +7,7 @@
<!--bindchange="swiperTab"-->
<swiper current="{{currentTab}}" duration="300" bindchange="swiperTab">
<swiper-item>
<scroll-view scroll-y wx:if="{{couponList.length}}">
<scroll-view scroll-y wx:if="{{couponList.length}}"
bindscrolltolower="onBottom"
>
<view class='coupon-wrap'>
<view
class='coupon-list'
...
...
@@ -31,7 +31,6 @@
</view>
</view>
</view>
<no-more wx:if="{{noMoreCoupon}}" />
</scroll-view>
<view class='empty-wrap' wx:if="{{!couponList.length}}">
...
...
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