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
13836622
Commit
13836622
authored
Jan 09, 2020
by
谢中龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
去除打印
parent
1d8d2134
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
28 deletions
+32
-28
bottomTabs.js
src/component/bottomTabs/bottomTabs.js
+0
-2
coupons.js
src/pages/coupons/coupons.js
+21
-25
coupons.wxml
src/pages/coupons/coupons.wxml
+2
-1
coupons.wxss
src/pages/coupons/coupons.wxss
+9
-0
No files found.
src/component/bottomTabs/bottomTabs.js
View file @
13836622
...
@@ -28,8 +28,6 @@ Component({
...
@@ -28,8 +28,6 @@ Component({
baseImgUrl
:
app
.
globalData
.
imageUrl
baseImgUrl
:
app
.
globalData
.
imageUrl
})
})
const
{
tabBar
}
=
this
.
data
const
{
tabBar
}
=
this
.
data
console
.
log
(
this
.
data
.
currHomePageId
)
console
.
log
(
tabBar
)
let
currentTab
=
tabBar
.
images
let
currentTab
=
tabBar
.
images
currentTab
.
forEach
(
item
=>
{
currentTab
.
forEach
(
item
=>
{
// 存在 row 处理数据 8 商品 9 分类
// 存在 row 处理数据 8 商品 9 分类
...
...
src/pages/coupons/coupons.js
View file @
13836622
...
@@ -160,36 +160,31 @@ wxService.page({
...
@@ -160,36 +160,31 @@ wxService.page({
// console.log(this.data.currentTab)
// console.log(this.data.currentTab)
// wx.stopPullDownRefresh();
// wx.stopPullDownRefresh();
},
},
/**
//scoll view 触到底部
* 页面上拉触底事件的处理函数
onBottom
(){
*/
const
{
currentTab
,
pageNo
,
pageSize
,
totalPages
,
invalidPageNo
,
invalidTotalPages
}
=
this
.
data
onReachBottom
:
function
()
{
if
(
currentTab
==
0
)
{
// 可使用 0 or 已失效 1
if
(
pageNo
<
totalPages
)
{
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
({
this
.
setData
({
invalidPageNo
:
invalidP
ageNo
+
1
,
pageNo
:
p
ageNo
+
1
,
})
})
// status 0
// status 1
this
.
getCouponList
(
this
.
data
.
invalidPageNo
,
pageSize
,
0
)
this
.
getCouponList
(
this
.
data
.
pageNo
,
pageSize
,
1
)
}
else
{
}
else
{
this
.
setData
({
this
.
setData
({
noMoreCoupon
Invalid
:
true
noMoreCoupon
:
true
})
})
}
}
}
else
{
this
.
setData
({
noMoreCouponInvalid
:
true
})
}
}
},
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
:
function
()
{
},
})
})
\ No newline at end of file
src/pages/coupons/coupons.wxml
View file @
13836622
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
<!--bindchange="swiperTab"-->
<!--bindchange="swiperTab"-->
<swiper current="{{currentTab}}" duration="300" bindchange="swiperTab">
<swiper current="{{currentTab}}" duration="300" bindchange="swiperTab">
<swiper-item>
<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-wrap'>
<view
<view
class='coupon-list'
class='coupon-list'
...
@@ -73,6 +73,7 @@
...
@@ -73,6 +73,7 @@
<view class='coupon-code fs-24'>出示劵码</view>
<view class='coupon-code fs-24'>出示劵码</view>
</view>
</view>
</view>
</view>
<view class='no-more-exp'>--- 已失效优惠券最多显示10条 ---</view>
<no-more wx:if="{{noMoreCouponInvalid}}" />
<no-more wx:if="{{noMoreCouponInvalid}}" />
</scroll-view>
</scroll-view>
...
...
src/pages/coupons/coupons.wxss
View file @
13836622
...
@@ -40,6 +40,15 @@ scroll-view{
...
@@ -40,6 +40,15 @@ scroll-view{
font-size: 28rpx;
font-size: 28rpx;
}
}
.no-more-exp{
display: flex;
padding: 20rpx;
font-size: 24rpx;
color: #999999;
justify-content: center;
align-items: center;
}
/* 卡劵列表 */
/* 卡劵列表 */
.coupon-wrap{
.coupon-wrap{
padding: 20rpx;
padding: 20rpx;
...
...
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