diff --git a/components/coupons/index.js b/components/coupons/index.js index fa71a9a..c40b1f7 100644 --- a/components/coupons/index.js +++ b/components/coupons/index.js @@ -8,7 +8,7 @@ Component({ data: { value: {}, type: Object - } + }, }, /** diff --git a/components/coupons/index.wxml b/components/coupons/index.wxml index 41a557e..9a3d9eb 100644 --- a/components/coupons/index.wxml +++ b/components/coupons/index.wxml @@ -1,3 +1,4 @@ + diff --git a/pages/index/coupons/index.js b/pages/index/coupons/index.js index 5ef4de8..b13d4c2 100644 --- a/pages/index/coupons/index.js +++ b/pages/index/coupons/index.js @@ -65,7 +65,6 @@ Component({ var that = this; app.couponListCallback = token => { Http.setToken(token); - // 券list获取 if (that.data.allow_load) { that.setData({ @@ -96,35 +95,44 @@ Component({ /** * 加载完成 */ + if (pageNum >= res.data.pages) { + if(res.data.pages == 0||res.data.pages == 1){ + that.setData({ + allow_load: true, + loading: false, + content: "" + }); + }else{ + that.setData({ + allow_load: false, + loading: true, + content: "——— 再拉裤子就掉了啦 ———" + }); + } + } + console.log(pageNum); + if (pageNum == 1) { that.setData({ - allow_load: false, - loading: true, - content: "——— 再拉裤子就掉了啦 ———" - }); - console.log("我已经加载完毕") + list: [], + }) } - console.log(pageNum); - if(pageNum ==1){ - that.setData({ - list: [] - }) - } - var tmpArr = that.data.list; - tmpArr.push.apply(tmpArr,res.data.list); - that.setData({ - list: tmpArr - }) - - console.log(tmpArr); + var tmpArr = that.data.list; + tmpArr.push.apply(tmpArr, res.data.list); + that.setData({ + list: tmpArr + }) + + console.log(tmpArr); }); setTimeout(function () { that.setData({ loading: false, }) }, 1400); - } else { + } + else { that.setData({ loading: true, content: "——— 再拉裤子就掉了啦 ———" @@ -164,7 +172,7 @@ Component({ app.businessListCallback(app.globalData.token); } that.setData({ - list:[] + list: [] }) that.getList(0, 1); } diff --git a/pages/index/coupons/index.wxml b/pages/index/coupons/index.wxml index 7eae47f..14666ad 100644 --- a/pages/index/coupons/index.wxml +++ b/pages/index/coupons/index.wxml @@ -2,6 +2,12 @@ - + + + + + 请您敬请期待 + 我们正在筹备一大波优惠活动 + {{content}} \ No newline at end of file diff --git a/pages/index/coupons/index.wxss b/pages/index/coupons/index.wxss index f55ce4e..4f80b8d 100644 --- a/pages/index/coupons/index.wxss +++ b/pages/index/coupons/index.wxss @@ -1,16 +1,45 @@ -.index-coupons{ - height:820rpx; +.index-coupons { + height: 820rpx; } -.loading{ - text-align: center; - height: 80rpx; - line-height: 80rpx; - font-size: 26rpx; - color: #999; + +.loading { + text-align: center; + height: 80rpx; + line-height: 80rpx; + font-size: 26rpx; + color: #999; +} + +.loading image { + width: 40rpx; + height: 40rpx; + vertical-align: middle; + margin-right: 10rpx; +} + +.dingdan { + margin-top: 33rpx; +} + +.dingdan text:nth-of-type(1) { + display: block; + font-size: 34rpx; + color: #333; + letter-spacing: 0; + text-align: center; +} + +.dingdan text:nth-of-type(2) { + display: block; + font-size: 28rpx; + color: #999; + letter-spacing: 0; + text-align: center; +} + +.dingdan image { + display: block; + width: 300rpx; + height: 300rpx; + margin: 0 auto 16rpx; } -.loading image{ - width: 40rpx; - height: 40rpx; - vertical-align: middle; - margin-right: 10rpx; -} \ No newline at end of file diff --git a/pages/user/index.wxml b/pages/user/index.wxml index 7e4866c..366643b 100644 --- a/pages/user/index.wxml +++ b/pages/user/index.wxml @@ -17,7 +17,7 @@ 我的订单 - 查看全部 + 查看全部 diff --git a/pages/user/index.wxss b/pages/user/index.wxss index 53344ae..9fe7c55 100644 --- a/pages/user/index.wxss +++ b/pages/user/index.wxss @@ -34,9 +34,9 @@ .couponnum { display: inline-block; position: absolute; - top: 20rpx; + top: 39rpx; bottom: 0; - left: 96rpx; + right: 26px; width: 16rpx; height: 16rpx; border-radius: 50%; @@ -127,6 +127,7 @@ .user-btns { background: #fff; margin-top: 65rpx; + padding: 0 30rpx; } .user-btns .user-btn { @@ -136,12 +137,15 @@ color: #333; letter-spacing: 1.16rpx; line-height: 88rpx; - border-bottom: 1rpx solid #eee; + border-bottom: 1rpx solid #efefef; } .user-btns .user-btn > view { flex: 1; - padding: 0 10px 0 32rpx; + padding: 0 10px 0 0; + font-size: 30rpx; + color: #333; + letter-spacing: 1.16rpx; } .user-btns .user-btn > view:last-child { @@ -151,9 +155,22 @@ text-align: right; } -.user-btns .user-btn > view:last-child .iconfont { - color: #a8a8a8; +.iconfont { + position: absolute; + right: 0; + top: 0; + bottom: 0; + width: 44rpx; + height: 44rpx; + line-height: 44rpx; + color: #c7c7cc; font-size: 44rpx; + margin: auto; +} + +.look { + display: inline-block; + padding-right: 25rpx; } .user-out-btn {