diff --git a/assets/images/shixiao.png b/assets/images/shixiao.png new file mode 100644 index 0000000..02cefda Binary files /dev/null and b/assets/images/shixiao.png differ diff --git a/pages/cardorder/index/index.js b/pages/cardorder/index/index.js index ca89b08..41ad740 100644 --- a/pages/cardorder/index/index.js +++ b/pages/cardorder/index/index.js @@ -25,23 +25,23 @@ Page({ loading: true, //"上拉加载"的变量,默认false,隐藏 content: "", mystatus: '', - showPage:false + showPage: false }, onLoad() { this.getList(4, 1); }, - onShow: function () { + onShow: function() { let that = this; wx.setStorage({ key: 'couponNum', data: "couponNum1", }) wx.hideTabBarRedDot({ - index:2 + index: 2 }) }, // 扫一扫去支付 - gotoPay:function(e){ + gotoPay: function(e) { let that = this; wx.scanCode({ success: (res) => { @@ -55,14 +55,14 @@ Page({ }) }, // 跳转到详情 - gotoConsumeDetail:function(e){ + gotoConsumeDetail: function(e) { console.log(e.currentTarget.dataset.id) wx.navigateTo({ url: `/pages/ConsumeDetail/ConsumeDetail?cardId=${e.currentTarget.dataset.id}`, }) }, //点击跳转到券详情页面 - gotouse: function (e) { + gotouse: function(e) { if (this.data.mystatus == '' || this.data.mystatus == 'undefined') { var mystatus = e.currentTarget.dataset.couponorderstatus; } else { @@ -73,6 +73,11 @@ Page({ e.currentTarget.dataset.quancode}&couponorderstatus=${mystatus}` }); }, + gotoBuy:function(){ + wx.navigateTo({ + url: '/pages/discountCardList/discountCardList', + }) + }, getList(key, pageNum) { var that = this; console.log(key) @@ -81,14 +86,14 @@ Page({ loading: true, content: "小主,我在玩命加载中...", }); - if(key==4){ + if (key == 4) { var data = { pageNum: pageNum, pageSize: 6, couponType: "7", couponOrderStatus: 4 } - }else if(key=='5,6,7'){ + } else if (key == '5,6,7') { var data = { pageNum: pageNum, pageSize: 6, @@ -97,61 +102,65 @@ Page({ } } Http.get({ - url: config.api.cardorderList, - data:data - }) - .then(res => { - if(res.code == 200){ - that.setData({ - showPage:true - }) - } - res.data.list.map(file => { - file.expiredTime = util.fmtDate(file.expiredTime); - if (file.remainingAmount > 0 && 500 >= file.remainingAmount){ - file.background = '#7184E2' + url: config.api.cardorderList, + data: data + }) + .then(res => { + if (res.code == 200) { + that.setData({ + showPage: true + }) } - else if (file.remainingAmount > 500 && 5000 >= file.remainingAmount) { - file.background = '#63AAE6' + res.data.list.map(file => { + file.expiredTime = util.fmtDate(file.expiredTime); + if (file.couponOrderStatus == 5 || file.couponOrderStatus == 6 || file.couponOrderStatus == 7) { + file.background = 'rgba(179,180,181,1)'; + file.showImg = true; + } else if (file.couponOrderStatus == 4) { + if (file.remainingAmount > 0 && 500 >= file.remainingAmount) { + file.background = '#7184E2' + } else if (file.remainingAmount > 500 && 5000 >= file.remainingAmount) { + file.background = '#63AAE6' + } else if (file.remainingAmount > 5000) { + file.background = '#E2A471' + } + } + + }); + setTimeout(function() { + that.setData({ + loading: false + }); + }, 1400); + if (pageNum >= res.data.pages) { + that.setData({ + allow_load: false + }); } - else if (file.remainingAmount > 5000) { - file.background = '#E2A471' + if (pageNum == 1) { + that.setData({ + list: [] + }) } - }); - setTimeout(function () { + var tmpArr = that.data.list; + tmpArr.push.apply(tmpArr, res.data.list); that.setData({ - loading: false - }); - }, 1400); - if (pageNum >= res.data.pages) { - that.setData({ - allow_load: false - }); - } - if (pageNum == 1) { - that.setData({ - list: [] + list: tmpArr }) - } - var tmpArr = that.data.list; - tmpArr.push.apply(tmpArr, res.data.list); - that.setData({ - list: tmpArr }) - }) - .catch(err => { - wx.showModal({ - title: '提示', - content: err.errMsg, - showCancel:false + .catch(err => { + wx.showModal({ + title: '提示', + content: err.errMsg, + showCancel: false + }) }) - }) } else { that.setData({ loading: true, content: "——— 再拉裤子就掉了啦 ———" }); - setTimeout(function () { + setTimeout(function() { that.setData({ loading: false }); @@ -165,11 +174,11 @@ Page({ list: [], allow_load: true, current_scroll: detail.key, - page:1, + page: 1, }); this.getList(detail.key, 1); }, - onReachBottom: function () { + onReachBottom: function() { var that = this; that.data.page++; that.setData({ diff --git a/pages/cardorder/index/index.wxml b/pages/cardorder/index/index.wxml index dcdaed5..46fb7b0 100644 --- a/pages/cardorder/index/index.wxml +++ b/pages/cardorder/index/index.wxml @@ -28,10 +28,17 @@ 扫一扫付款 - 已失效 + + 已过期 + 余额不足 + 已线下退款 + + + + + - diff --git a/pages/cardorder/index/index.wxss b/pages/cardorder/index/index.wxss index 806237e..6e3ec9c 100644 --- a/pages/cardorder/index/index.wxss +++ b/pages/cardorder/index/index.wxss @@ -25,6 +25,7 @@ } .mms { + position: relative; width: 690rpx; background: #fff; padding: 36rpx 0 0; @@ -35,7 +36,7 @@ .expiretime { display: block; - width: 100%!important; + width: 100% !important; text-align: left; text-indent: 1em; height: 40rpx; @@ -44,14 +45,17 @@ color: #333; letter-spacing: 0; } -.expiretime .fr{ + +.expiretime .fr { margin-right: 20rpx; } -.money{ + +.money { margin-left: 10rpx; font-size: 30rpx; font-weight: bold; } + .liness { display: block; width: 100%; @@ -108,7 +112,6 @@ width: 400rpx; } - .btns { height: 80rpx; line-height: 80rpx; @@ -116,12 +119,12 @@ color: #fff; font-size: 28rpx; margin-top: 46rpx; - border-top:1px solid #e6e6e6; + border-top: 1px solid #e6e6e6; } .active { color: #fff; - opacity: .6; + opacity: 0.6; } .txt1 { @@ -196,7 +199,39 @@ text-align: center; line-height: 32px; } -.title .fr{ + +.title .fr { width: 30rpx; margin-right: 10rpx; -} \ No newline at end of file +} + +.imgicon { + position: absolute; + width: 140rpx; + height: 100rpx; + z-index: 100; + right: 191rpx; + top: 0; +} + +.imgicon image { + width: 100%; +} + +.buyagain { + width: 162rpx; + height: 57rpx; + background: rgba(255, 255, 255, 1); + border-radius: 10rpx; + font-size: 24rpx; + color: rgba(51, 51, 51, 1); + margin-right: 25rpx; + margin-top: 11rpx; +} + +.txtstatus { + height: 80rpx; + font-size: 24rpx; + color: rgba(255, 53, 53, 1); + margin-left: 30rpx; +} diff --git a/pages/rushToBuy/index.wxml b/pages/rushToBuy/index.wxml index 18e96a6..5891c6e 100644 --- a/pages/rushToBuy/index.wxml +++ b/pages/rushToBuy/index.wxml @@ -1,6 +1,6 @@ - + @@ -36,6 +36,11 @@ + + + 请您敬请期待 + 我们正在筹备一大堆优惠活动 + {{content}} diff --git a/pages/rushToBuy/index.wxss b/pages/rushToBuy/index.wxss index 2ab5aa0..5927084 100644 --- a/pages/rushToBuy/index.wxss +++ b/pages/rushToBuy/index.wxss @@ -1,11 +1,13 @@ -.flashSale,page{ +.flashSale, page { width: 100%; background: #f5f5f5; padding-bottom: 30rpx; } -.flashSale > view:nth-of-type(1){ + +.flashSale > view:nth-of-type(1) { margin-top: 0!important; } + .loading { text-align: center; height: 80rpx; @@ -13,6 +15,7 @@ font-size: 26rpx; color: #999; } + .loading image { width: 60rpx; height: 60rpx; @@ -110,7 +113,7 @@ } .realRemainingTime { - color: #FF4949; + color: #ff4949; font-size: 28rpx; } @@ -175,9 +178,35 @@ color: #ff4949; border: 2rpx solid #ff4949; } -progress{ + +progress { display: inline-block; width: 200rpx; - border-radius:60rpx; + border-radius: 60rpx; overflow: hidden; -} \ No newline at end of file +} +.expect{ + margin-top: 60rpx; +} +.expect text{ + display: block; + text-align: center; +} +.expect text:nth-of-type(1) { + margin-top: 91rpx; + font-size: 36rpx; + color: rgba(51, 51, 51, 1); +} + +.expect text:nth-of-type(2) { + font-size: 28rpx; + color: rgba(136, 136, 136, 1); +} + +.expect image { + display: block; + width: 247rpx; + height: 230rpx; + margin: 0 auto; +} + diff --git a/pages/scanPay/scanPay.js b/pages/scanPay/scanPay.js index 02bbc5b..c95fa62 100644 --- a/pages/scanPay/scanPay.js +++ b/pages/scanPay/scanPay.js @@ -60,7 +60,7 @@ Page({ startAuth() { let that = this; // 卡余额充足的时候,才可以付钱 - if (that.data.inputValue != "" && that.data.remainingAmount > that.data.inputValue) { + if (that.data.inputValue != "" && that.data.remainingAmount >= that.data.inputValue) { const startSoterAuthentication = () => { wx.startSoterAuthentication({ requestAuthModes: [AUTH_MODE], diff --git a/pages/scanPay/scanPay.wxss b/pages/scanPay/scanPay.wxss index e2bb86b..e24023d 100644 --- a/pages/scanPay/scanPay.wxss +++ b/pages/scanPay/scanPay.wxss @@ -44,7 +44,7 @@ font-weight:bold; color:rgba(51,51,51,1); display: inline-block!important; - width: 300rpx; + width: 580rpx; height: 60rpx; margin-top: 20rpx; line-height: 60rpx;