默认提交
Showing
8 changed files
with
274 additions
and
12 deletions
... | @@ -12,7 +12,6 @@ | ... | @@ -12,7 +12,6 @@ |
12 | "pages/seckill-mine/seckill-mine", | 12 | "pages/seckill-mine/seckill-mine", |
13 | "pages/seckill-detail/seckill-detail", | 13 | "pages/seckill-detail/seckill-detail", |
14 | 14 | ||
15 | |||
16 | "pages/user-center/user-center", | 15 | "pages/user-center/user-center", |
17 | "pages/scan-result/scan-result", | 16 | "pages/scan-result/scan-result", |
18 | "pages/gift-shop/gift-shop", | 17 | "pages/gift-shop/gift-shop", | ... | ... |
... | @@ -11,7 +11,7 @@ | ... | @@ -11,7 +11,7 @@ |
11 | </swiper> | 11 | </swiper> |
12 | </view> | 12 | </view> |
13 | <scroll-view scroll-y="{{true}}" class="desc"> | 13 | <scroll-view scroll-y="{{true}}" class="desc"> |
14 | <text class="t1">产品特点:</text> | 14 | <!-- <text class="t1">产品特点:</text> --> |
15 | <text class="t2"> | 15 | <text class="t2"> |
16 | {{productInfo.productInfo}} | 16 | {{productInfo.productInfo}} |
17 | </text> | 17 | </text> | ... | ... |
... | @@ -4,6 +4,8 @@ | ... | @@ -4,6 +4,8 @@ |
4 | $contentWidth:690px; | 4 | $contentWidth:690px; |
5 | 5 | ||
6 | .page { | 6 | .page { |
7 | padding-bottom: $pageBottom; | ||
8 | |||
7 | .bgc { | 9 | .bgc { |
8 | background-color: #f8f8f8; | 10 | background-color: #f8f8f8; |
9 | } | 11 | } |
... | @@ -54,20 +56,32 @@ $contentWidth:690px; | ... | @@ -54,20 +56,32 @@ $contentWidth:690px; |
54 | } | 56 | } |
55 | } | 57 | } |
56 | 58 | ||
57 | |||
58 | .cont { | 59 | .cont { |
59 | position: relative; | 60 | position: relative; |
60 | height: 100%; | 61 | height: 100%; |
61 | flex: 1; | 62 | flex: 1; |
62 | // padding-right: 8px; | 63 | // padding-right: 8px; |
63 | @extend .bb; | 64 | @extend .bb; |
65 | align-self: flex-start; | ||
66 | height: 160px; | ||
64 | 67 | ||
65 | .t1 { | 68 | .up {} |
66 | align-self: center; | 69 | |
70 | .down { | ||
71 | position: absolute; | ||
72 | bottom: 0; | ||
73 | } | ||
74 | |||
75 | .tt { | ||
67 | padding: 4px 0; | 76 | padding: 4px 0; |
68 | width: 100%; | 77 | width: 100%; |
69 | } | 78 | } |
70 | 79 | ||
80 | .t1 { | ||
81 | @include ellipsis(1); | ||
82 | font-size: 32px; | ||
83 | } | ||
84 | |||
71 | .t2 { | 85 | .t2 { |
72 | margin-top: 8px; | 86 | margin-top: 8px; |
73 | // font-size: 24px; | 87 | // font-size: 24px; | ... | ... |
... | @@ -15,9 +15,13 @@ | ... | @@ -15,9 +15,13 @@ |
15 | <image class="image" mode="aspectFill" src="{{item.auctionImage && item.auctionImage[0] || ''}}" /> | 15 | <image class="image" mode="aspectFill" src="{{item.auctionImage && item.auctionImage[0] || ''}}" /> |
16 | </view> | 16 | </view> |
17 | <view class="cont"> | 17 | <view class="cont"> |
18 | <view class="t1">{{item.auctionName}}</view> | 18 | <view class="up"> |
19 | <view class="t1 t2 t3">活动区域:{{item.district}}</view> | 19 | <view class="tt t1">{{item.auctionName}}</view> |
20 | <view class="t1 t3">{{item.dateStr}}</view> | 20 | </view> |
21 | <view class="down"> | ||
22 | <view class="tt t2 t3">活动区域:{{item.district}}</view> | ||
23 | <view class="tt t3">{{item.dateStr}}</view> | ||
24 | </view> | ||
21 | </view> | 25 | </view> |
22 | <view bindtap="onDetailHandler" wx:if="{{item.status == 0}}" data-data="{{item}}" data-index="{{index}}" class="btn btn0"> | 26 | <view bindtap="onDetailHandler" wx:if="{{item.status == 0}}" data-data="{{item}}" data-index="{{index}}" class="btn btn0"> |
23 | 未开始 | 27 | 未开始 | ... | ... |
1 | import { | 1 | import { |
2 | getBindtapData | 2 | getBindtapData |
3 | } from '../../utils/util'; | 3 | } from '../../utils/util'; |
4 | let Date = require('../../utils/date.js'); | ||
4 | 5 | ||
5 | let app = getApp(); | 6 | let app = getApp(); |
6 | Page({ | 7 | Page({ |
7 | data: {}, | 8 | data: { |
9 | authorizeVisible: false, | ||
10 | isInit: false, | ||
11 | total: 0, | ||
12 | page: 1, | ||
13 | size: 10, | ||
14 | dataList: [], | ||
15 | }, | ||
8 | onShareAppMessage() {}, | 16 | onShareAppMessage() {}, |
9 | showAuth() { | 17 | showAuth() { |
10 | this.setData({ | 18 | this.setData({ |
11 | authorizeVisible: true | 19 | authorizeVisible: true |
12 | }) | 20 | }) |
13 | }, | 21 | }, |
14 | onLoad(options) {}, | 22 | onShow() { |
23 | |||
24 | }, | ||
25 | onLoad(options) { | ||
26 | this.resetPage(); | ||
27 | this.initData(); | ||
28 | }, | ||
29 | initData() { | ||
30 | this.querySeckillList(); | ||
31 | }, | ||
32 | |||
33 | // 到达底部 | ||
34 | onReachBottom() { | ||
35 | if (this.data.dataList.length < this.data.total) { | ||
36 | this.setData({ | ||
37 | page: this.data.page + 1 | ||
38 | }); | ||
39 | this.querySeckillList(); | ||
40 | } | ||
41 | }, | ||
42 | |||
43 | // 重置页面列表 点击搜索条件时需要 | ||
44 | resetPage() { | ||
45 | this.setData({ | ||
46 | page: 1, | ||
47 | dataList: [] | ||
48 | }) | ||
49 | }, | ||
50 | |||
51 | /** | ||
52 | * 显示我的拍卖页 | ||
53 | */ | ||
54 | onShowSeckillMineHandler() { | ||
55 | app.router.push({ | ||
56 | path: "seckillMine" | ||
57 | }) | ||
58 | }, | ||
59 | |||
60 | /** | ||
61 | * 详情页面 | ||
62 | */ | ||
63 | onDetailHandler(evt) { | ||
64 | let curData = getBindtapData(evt); | ||
65 | console.log("curData:", curData); | ||
66 | if (curData.status == 0 || curData.status == 1) { | ||
67 | if (curData.isCanDetail == 1) { | ||
68 | app.router.push({ | ||
69 | path: "seckillDetail", | ||
70 | query: { | ||
71 | code: curData.seckillCode, | ||
72 | } | ||
73 | }) | ||
74 | } else { | ||
75 | wx.showModal({ | ||
76 | content: curData.reason || "您未达到进入条件", | ||
77 | showCancel: false, | ||
78 | success(res) {} | ||
79 | }) | ||
80 | } | ||
81 | } | ||
82 | }, | ||
83 | |||
84 | // 秒杀列表 | ||
85 | querySeckillList() { | ||
86 | return new Promise((resolve, reject) => { | ||
87 | app.post({ | ||
88 | url: app.api.seckillList, | ||
89 | data: { | ||
90 | page: this.data.page, | ||
91 | size: this.data.size, | ||
92 | } | ||
93 | }).then((result) => { | ||
94 | let dataList = result.list; | ||
95 | dataList.forEach(element => { | ||
96 | element.dateStr = new Date(element.startTime).toString("yyyy.MM.dd hh:mm") + " - " + new Date(element.endTime).toString("yyyy.MM.dd hh:mm"); | ||
97 | }); | ||
98 | dataList = this.data.dataList.concat(dataList); | ||
99 | this.setData({ | ||
100 | dataList: dataList, | ||
101 | total: result.total, | ||
102 | isInit: true, | ||
103 | }) | ||
104 | resolve(); | ||
105 | }) | ||
106 | }) | ||
107 | }, | ||
108 | |||
15 | // 隐藏蒙层 | 109 | // 隐藏蒙层 |
16 | hideMask() { | 110 | hideMask() { |
17 | this.setData({ | 111 | this.setData({ | ... | ... |
1 | @import '../../assets/scss/mixins'; | ||
2 | @import '../../assets/scss/utils'; | ||
3 | |||
4 | $contentWidth:690px; | ||
5 | |||
6 | .page { | ||
7 | padding-bottom: $pageBottom; | ||
8 | |||
9 | .bgc { | ||
10 | background-color: #f8f8f8; | ||
11 | } | ||
12 | |||
13 | .bg {} | ||
14 | |||
15 | .main { | ||
16 | .top-space { | ||
17 | height: 0px; | ||
18 | } | ||
19 | |||
20 | .content { | ||
21 | position: relative; | ||
22 | |||
23 | // 我的按钮 | ||
24 | .my-btn { | ||
25 | display: flex; | ||
26 | justify-content: flex-end; | ||
27 | |||
28 | .btn { | ||
29 | @include cb2(180px, 48px, 28px); | ||
30 | margin: 24px 24px 0 0; | ||
31 | } | ||
32 | } | ||
33 | |||
34 | // list | ||
35 | .list { | ||
36 | width: $contentWidth; | ||
37 | margin: 24px auto 0; | ||
38 | |||
39 | &-item { | ||
40 | @extend .bb; | ||
41 | padding: 30px 0; | ||
42 | display: flex; | ||
43 | justify-content: space-between; | ||
44 | align-items: center; | ||
45 | |||
46 | .prize { | ||
47 | margin: 0 20px; | ||
48 | |||
49 | border: solid 1PX #F0F0F0; | ||
50 | border-radius: 8px; | ||
51 | padding: 12px; | ||
52 | |||
53 | .image { | ||
54 | width: 120px; | ||
55 | height: 120px; | ||
56 | } | ||
57 | } | ||
58 | |||
59 | .cont { | ||
60 | position: relative; | ||
61 | height: 100%; | ||
62 | flex: 1; | ||
63 | // padding-right: 8px; | ||
64 | @extend .bb; | ||
65 | align-self: flex-start; | ||
66 | height: 160px; | ||
67 | |||
68 | .up {} | ||
69 | |||
70 | .down { | ||
71 | position: absolute; | ||
72 | bottom: 0; | ||
73 | } | ||
74 | |||
75 | .tt { | ||
76 | padding: 4px 0; | ||
77 | width: 100%; | ||
78 | } | ||
79 | |||
80 | .t1 { | ||
81 | @include ellipsis(1); | ||
82 | font-size: 32px; | ||
83 | } | ||
84 | |||
85 | .t2 { | ||
86 | margin-top: 8px; | ||
87 | // font-size: 24px; | ||
88 | // color: #999999; | ||
89 | } | ||
90 | |||
91 | .t3 { | ||
92 | font-size: 20px; | ||
93 | color: #999999; | ||
94 | // color: #3680EB; | ||
95 | } | ||
96 | } | ||
97 | |||
98 | .btn { | ||
99 | @include cb(120px, 48px, 24px); | ||
100 | margin: 0 16px 0 0; | ||
101 | align-self: flex-start; | ||
102 | } | ||
103 | |||
104 | .btn0 { | ||
105 | background-color: #fe9b28; | ||
106 | } | ||
107 | |||
108 | .btn1 { | ||
109 | background-color: #079815; | ||
110 | } | ||
111 | |||
112 | .btn2 { | ||
113 | background-color: #999999; | ||
114 | } | ||
115 | } | ||
116 | } | ||
117 | |||
118 | } | ||
119 | } | ||
120 | } | ... | ... |
... | @@ -4,7 +4,38 @@ | ... | @@ -4,7 +4,38 @@ |
4 | <!-- <view class="app__top-shadow"></view> --> | 4 | <!-- <view class="app__top-shadow"></view> --> |
5 | <view class="app__content main"> | 5 | <view class="app__content main"> |
6 | <view class="top-space"></view> | 6 | <view class="top-space"></view> |
7 | <view class="content"></view> | 7 | <view class="content"> |
8 | <!-- 我的拍卖按钮 --> | ||
9 | <view class="my-btn"> | ||
10 | <view bindtap="onShowSeckillMineHandler" class="btn">我的秒杀</view> | ||
11 | </view> | ||
12 | <view class="list"> | ||
13 | <view wx:for="{{dataList}}" wx:key="{{index}}" class="border list-item"> | ||
14 | <view class="prize"> | ||
15 | <image class="image" mode="aspectFill" src="{{item.seckillImages && item.seckillImages[0] || ''}}" /> | ||
16 | </view> | ||
17 | <view class="cont"> | ||
18 | <view class="up"> | ||
19 | <view class="tt t1">{{item.seckillName}}</view> | ||
20 | </view> | ||
21 | <view class="down"> | ||
22 | <view class="tt t2 t3">活动区域:{{item.district}}</view> | ||
23 | <view class="tt t3">{{item.dateStr}}</view> | ||
24 | </view> | ||
25 | </view> | ||
26 | <view bindtap="onDetailHandler" wx:if="{{item.status == 0}}" data-data="{{item}}" data-index="{{index}}" class="btn btn0"> | ||
27 | 未开始 | ||
28 | </view> | ||
29 | <view bindtap="onDetailHandler" wx:if="{{item.status == 1}}" data-data="{{item}}" data-index="{{index}}" class="btn btn1"> | ||
30 | 进行中 | ||
31 | </view> | ||
32 | <view bindtap="onDetailHandler" wx:if="{{item.status == 2}}" data-data="{{item}}" data-index="{{index}}" class="btn btn2"> | ||
33 | 已结束 | ||
34 | </view> | ||
35 | </view> | ||
36 | </view> | ||
37 | </view> | ||
38 | <empty-tips-light inner-text="当前未有拍卖活动,敬请期待" wx:if="{{dataList.length <= 0 && isInit}}"></empty-tips-light> | ||
8 | </view> | 39 | </view> |
9 | </view> | 40 | </view> |
10 | <van-popup show="{{ authorizeVisible }}"> | 41 | <van-popup show="{{ authorizeVisible }}"> | ... | ... |
-
Please register or sign in to post a comment