正在显示
6 个修改的文件
包含
64 行增加
和
15 行删除
1 | { | 1 | { |
2 | "pages": [ | 2 | "pages": [ |
3 | "pages/register/register", | 3 | "pages/register/register", |
4 | + "pages/index/index", | ||
5 | + | ||
4 | "pages/messagedetail/messagedetail", | 6 | "pages/messagedetail/messagedetail", |
5 | "pages/message/message", | 7 | "pages/message/message", |
6 | "pages/login/login", | 8 | "pages/login/login", |
7 | - "pages/index/index", | 9 | + |
8 | "pages/shop_cart/shop_cart", | 10 | "pages/shop_cart/shop_cart", |
9 | "pages/classify/classify", | 11 | "pages/classify/classify", |
10 | "pages/my/my", | 12 | "pages/my/my", |
@@ -59,6 +59,7 @@ Page({ | @@ -59,6 +59,7 @@ Page({ | ||
59 | } | 59 | } |
60 | app.post(url, data, "POST").then((r) => { | 60 | app.post(url, data, "POST").then((r) => { |
61 | console.log(r) | 61 | console.log(r) |
62 | + console.log(r.msg.residue_time) | ||
62 | that.setData({ | 63 | that.setData({ |
63 | xianshilist: r.msg.list, | 64 | xianshilist: r.msg.list, |
64 | endTime: r.msg.residue_time | 65 | endTime: r.msg.residue_time |
@@ -80,7 +81,8 @@ Page({ | @@ -80,7 +81,8 @@ Page({ | ||
80 | 81 | ||
81 | date_format(micro_second) { | 82 | date_format(micro_second) { |
82 | // 总秒数 | 83 | // 总秒数 |
83 | - var second = Math.floor(micro_second / 1000); | 84 | + var second = micro_second; |
85 | + // var second = Math.floor(micro_second / 1000); | ||
84 | // 天数 | 86 | // 天数 |
85 | var day = Math.floor(second / 3600 / 24); | 87 | var day = Math.floor(second / 3600 / 24); |
86 | // 小时 | 88 | // 小时 |
@@ -95,8 +97,8 @@ date_format(micro_second) { | @@ -95,8 +97,8 @@ date_format(micro_second) { | ||
95 | // 倒计时 | 97 | // 倒计时 |
96 | countDown() { | 98 | countDown() { |
97 | var that = this; | 99 | var that = this; |
98 | - | ||
99 | - var time = that.data.endTime/1000; | 100 | + console.log('999',that.data.endTime) |
101 | + var time = that.data.endTime; | ||
100 | var interval = setInterval(function () { | 102 | var interval = setInterval(function () { |
101 | // 秒数 | 103 | // 秒数 |
102 | let day = parseInt(time / (60 * 60 * 24)); | 104 | let day = parseInt(time / (60 * 60 * 24)); |
@@ -52,7 +52,7 @@ | @@ -52,7 +52,7 @@ | ||
52 | </view> | 52 | </view> |
53 | 53 | ||
54 | <!-- 物流信息 --> | 54 | <!-- 物流信息 --> |
55 | - <view class="wuliuinfo"> | 55 | + <view class="wuliuinfo" wx:if="{{kuaidi.length!=0}}"> |
56 | <view class="page-section page-section-spacing swiper"> | 56 | <view class="page-section page-section-spacing swiper"> |
57 | <swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" vertical="true" circular="true"> | 57 | <swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" vertical="true" circular="true"> |
58 | <block wx:for="{{kuaidi}}" wx:key="*this"> | 58 | <block wx:for="{{kuaidi}}" wx:key="*this"> |
@@ -20,9 +20,12 @@ Page({ | @@ -20,9 +20,12 @@ Page({ | ||
20 | * 生命周期函数--监听页面加载 | 20 | * 生命周期函数--监听页面加载 |
21 | */ | 21 | */ |
22 | onLoad: function (options) { | 22 | onLoad: function (options) { |
23 | - this.getxianshi() | 23 | + this.getxianshi(); |
24 | + this.getxianshik() | ||
24 | }, | 25 | }, |
25 | 26 | ||
27 | + | ||
28 | + | ||
26 | // 限时抢购 | 29 | // 限时抢购 |
27 | getxianshi() { | 30 | getxianshi() { |
28 | let that = this | 31 | let that = this |
@@ -35,8 +38,38 @@ Page({ | @@ -35,8 +38,38 @@ Page({ | ||
35 | app.post(url, data, "POST").then((r) => { | 38 | app.post(url, data, "POST").then((r) => { |
36 | console.log(r) | 39 | console.log(r) |
37 | that.setData({ | 40 | that.setData({ |
41 | + // xianshilist: that.data.xianshilist.concat(r.msg.list) , | ||
42 | + | ||
43 | + // status: r.msg.status, | ||
44 | + endTime: r.msg.residue_time, | ||
45 | + }) | ||
46 | + | ||
47 | + | ||
48 | + that.countDown() | ||
49 | + | ||
50 | + console.log(that.data.xianshilist) | ||
51 | + // that.setData({ | ||
52 | + // messagelist: that.data.messagelist.concat(r.msg) | ||
53 | + // }) | ||
54 | + | ||
55 | + // console.log(that.data.messagelist) | ||
56 | + | ||
57 | + }).catch((err) => { }) | ||
58 | + }, | ||
59 | + getxianshik() { | ||
60 | + let that = this | ||
61 | + let url = '/special/get_all'; | ||
62 | + let data = { | ||
63 | + page: that.data.page, | ||
64 | + pageNum: 10 | ||
65 | + | ||
66 | + } | ||
67 | + app.post(url, data, "POST").then((r) => { | ||
68 | + console.log(r) | ||
69 | + that.setData({ | ||
38 | xianshilist: that.data.xianshilist.concat(r.msg.list) , | 70 | xianshilist: that.data.xianshilist.concat(r.msg.list) , |
39 | - endTime: r.msg.residue_time | 71 | + // endTime: r.msg.residue_time, |
72 | + status: r.msg.status | ||
40 | }) | 73 | }) |
41 | 74 | ||
42 | 75 | ||
@@ -51,12 +84,20 @@ Page({ | @@ -51,12 +84,20 @@ Page({ | ||
51 | 84 | ||
52 | }).catch((err) => { }) | 85 | }).catch((err) => { }) |
53 | }, | 86 | }, |
87 | + | ||
88 | + | ||
89 | + look_more(e) { | ||
90 | + let id = e.currentTarget.dataset.id | ||
91 | + wx.navigateTo({ | ||
92 | + url: '/pages/shop_detail/shop_detail?id=' + id | ||
93 | + }) | ||
94 | + }, | ||
54 | // 倒计时 | 95 | // 倒计时 |
55 | countDown() { | 96 | countDown() { |
56 | console.log(788) | 97 | console.log(788) |
57 | var that = this; | 98 | var that = this; |
58 | 99 | ||
59 | - var time = that.data.endTime / 1000; | 100 | + var time = that.data.endTime; |
60 | var interval = setInterval(function () { | 101 | var interval = setInterval(function () { |
61 | // 秒数 | 102 | // 秒数 |
62 | let day = parseInt(time / (60 * 60 * 24)); | 103 | let day = parseInt(time / (60 * 60 * 24)); |
@@ -126,7 +167,7 @@ Page({ | @@ -126,7 +167,7 @@ Page({ | ||
126 | this.setData({ | 167 | this.setData({ |
127 | page:newpage | 168 | page:newpage |
128 | }) | 169 | }) |
129 | - this.getxianshi() | 170 | + this.getxianshik() |
130 | }, | 171 | }, |
131 | 172 | ||
132 | /** | 173 | /** |
@@ -33,17 +33,17 @@ | @@ -33,17 +33,17 @@ | ||
33 | <view class="saleprice">¥288</view> | 33 | <view class="saleprice">¥288</view> |
34 | <!-- <view class="yuansaleprice">¥{{}}</view> --> | 34 | <!-- <view class="yuansaleprice">¥{{}}</view> --> |
35 | </view> | 35 | </view> |
36 | - <view class="buynow buyactive" wx:if="{{item.status==1}}">未开始</view> | ||
37 | - <view class="buynow buyactive" wx:if="{{item.status==2}}">已结束</view> | ||
38 | - <view class="buynow" wx:if="{{item.status==3}}">进行中</view> | ||
39 | - | 36 | + <view class="buynow buyactive" wx:if="{{status==1}}">未开始</view> |
37 | + <view class="buynow buyactive" wx:if="{{status==2}}">已结束</view> | ||
38 | + <view class="buynow" wx:if="{{status==3&&item.sold!=0}}" data-id="{{item.id}}" bindtap="{{item.sold==0?'':'look_more'}}">立即抢购</view> | ||
39 | + <view class="buynow" wx:if="{{status==3&&item.sold==0}}">已抢光</view> | ||
40 | </view> | 40 | </view> |
41 | 41 | ||
42 | <view class="miaojindu flextwo"> | 42 | <view class="miaojindu flextwo"> |
43 | <view class="miaojinduleft"> | 43 | <view class="miaojinduleft"> |
44 | - <view class="miaojinnei"></view> | 44 | + <view class="miaojinnei" style="width:{{item.rob}}%"></view> |
45 | </view> | 45 | </view> |
46 | - <view class="miaojinduright">已抢60%</view> | 46 | + <view class="miaojinduright">已抢{{item.rob}}%</view> |
47 | </view> | 47 | </view> |
48 | 48 | ||
49 | 49 |
@@ -92,6 +92,7 @@ | @@ -92,6 +92,7 @@ | ||
92 | height:20rpx; | 92 | height:20rpx; |
93 | border-radius:18rpx; | 93 | border-radius:18rpx; |
94 | border:2rpx solid rgba(239,227,205,1); | 94 | border:2rpx solid rgba(239,227,205,1); |
95 | + margin-right:20rpx; | ||
95 | 96 | ||
96 | } | 97 | } |
97 | .miaojinnei{ | 98 | .miaojinnei{ |
@@ -131,3 +132,6 @@ image{ | @@ -131,3 +132,6 @@ image{ | ||
131 | .buyactive{ | 132 | .buyactive{ |
132 | background: rgba(156, 156, 156, 1) | 133 | background: rgba(156, 156, 156, 1) |
133 | } | 134 | } |
135 | +.miaogood{ | ||
136 | + margin-top:20rpx; | ||
137 | +} |
-
请 注册 或 登录 后发表评论