| @@ -146,11 +146,11 @@ Page({ | |||
| var data = { | |||
| couponChannelId: "" + that.data.couponChannelId, | |||
| couponId: "" + that.data.couponId | |||
| } | |||
| if (that.data.couponChannelId == null) { | |||
| }; | |||
| if (that.data.couponChannelId == null) { | |||
| data = { | |||
| couponId: "" + that.data.couponId | |||
| } | |||
| }; | |||
| } | |||
| /** | |||
| * orderSave 下单 | |||
| @@ -16,7 +16,7 @@ | |||
| <text>有效期至:</text> | |||
| <text>{{expiredTime}}</text> | |||
| </view> | |||
| <view class="pane2" wx:if="{{data.couponOrderStatus==1}}"> | |||
| <!-- <view class="pane2" wx:if="{{data.couponOrderStatus==1}}"> | |||
| <image src="./../../../assets/img/shiyong.jpg" mode="widthFix"></image> | |||
| </view> | |||
| <view class="pane2" wx:if="{{data.couponOrderStatus==2}}"> | |||
| @@ -24,16 +24,22 @@ | |||
| </view> | |||
| <view class="pane2" wx:if="{{data.couponOrderStatus==3}}"> | |||
| <image src="./../../../assets/img/tui.jpg" mode="widthFix"></image> | |||
| </view> | |||
| <view class="panel" wx:if="{{data.couponOrderStatus==0}}"> | |||
| </view> --> | |||
| <view class="panel"> | |||
| <view class="barcode"> | |||
| <canvas canvas-id="barcode" /> | |||
| </view> | |||
| <view class="qrcode"> | |||
| <image wx:if="{{data.couponOrderStatus==1}}" src="./../../../assets/img/wm01.jpg" mode="widthFix"></image> | |||
| <image wx:if="{{data.couponOrderStatus==2}}" src="./../../../assets/img/wm02.jpg" mode="widthFix"></image> | |||
| <image wx:if="{{data.couponOrderStatus==3}}" src="./../../../assets/img/wm03.jpg" mode="widthFix"></image> | |||
| <canvas canvas-id="qrcode" /> | |||
| </view> | |||
| <view class="barnum"><text>兑换码:</text>{{code}}</view> | |||
| </view> | |||
| <view class="posi"> | |||
| <view class="tit"> | |||
| 适用门店 | |||
| @@ -58,7 +58,18 @@ | |||
| justify-content: flex-end; | |||
| align-items: center; | |||
| } | |||
| .qrcode image{ | |||
| position: absolute; | |||
| width: 160rpx; | |||
| height: 160rpx; | |||
| right:0; | |||
| bottom: 0; | |||
| top: 0; | |||
| left: 0; | |||
| margin: auto; | |||
| z-index: 1000000000; | |||
| border-radius:50%; | |||
| } | |||
| .qrcode > canvas { | |||
| width: 400rpx; | |||
| height: 400rpx; | |||
| @@ -4,7 +4,6 @@ | |||
| <view wx:else>请升级微信版本</view> | |||
| </view> --> | |||
| <view class="login-body"> | |||
| <view class="login-logo"> | |||
| <image src="../../assets/img/logo.png"></image> | |||
| @@ -19,57 +19,20 @@ Page({ | |||
| */ | |||
| powerDrawer: function(e) { | |||
| // var currentStatu = e.currentTarget.dataset.statu; | |||
| // couponOrderStatus | |||
| // 0 未使用 | |||
| // 1 已使用 | |||
| // 2 已过期 | |||
| // 3 已经退款 | |||
| console.log(e); | |||
| wx.navigateTo({ | |||
| url: `/pages/youhuiquanma/index?quancode=${e.currentTarget.dataset.quancode}&title=${e.currentTarget.dataset.title}&subtitle=${e.currentTarget.dataset.subtitle}&remark=${e.currentTarget.dataset.remark}`, | |||
| url: `/pages/youhuiquanma/index?quancode=${e.currentTarget.dataset.quancode}&title=${e.currentTarget.dataset.title}&subtitle=${e.currentTarget.dataset.subtitle}&remark=${e.currentTarget.dataset.remark}&couponorderstatus=${e.currentTarget.dataset.couponorderstatus}`, | |||
| }) | |||
| // console.log(e.currentTarget.dataset.statu); | |||
| console.log(e.currentTarget.dataset.quancode); | |||
| // this.utils(currentStatu, e.currentTarget.dataset.quancode); | |||
| console.log(e.currentTarget.dataset.couponorderstatus); | |||
| }, | |||
| // utils: function(currentStatu, quancode) { | |||
| // /* 动画部分 */ | |||
| // // 第1步:创建动画实例 | |||
| // var animation = wx.createAnimation({ | |||
| // duration: 200, //动画时长 | |||
| // timingFunction: "linear", //线性 | |||
| // delay: 0 //0则不延迟 | |||
| // }); // 第2步:这个动画实例赋给当前的动画实例 | |||
| // this.animation = animation; // 第3步:执行第一组动画 | |||
| // animation.opacity(0).step(); // 第4步:导出动画对象赋给数据对象储存 | |||
| // this.setData({ | |||
| // animationData: animation.export() | |||
| // }); // 第5步:设置定时器到指定时候后,执行第二组动画 | |||
| // setTimeout( | |||
| // function() { | |||
| // // 执行第二组动画 | |||
| // animation.opacity(1).step(); // 给数据对象储存的第一组动画,更替为执行完第二组动画的动画对象 | |||
| // this.setData({ | |||
| // animationData: animation | |||
| // }); //关闭 | |||
| // if (currentStatu == "close") { | |||
| // this.setData({ | |||
| // showModalStatus: false | |||
| // }); | |||
| // } | |||
| // }.bind(this), | |||
| // 20 | |||
| // ); | |||
| // // 显示 | |||
| // if (currentStatu == "open") { | |||
| // this.setData({ | |||
| // showModalStatus: true | |||
| // }); | |||
| // this.data.flag++; | |||
| // console.log(this.data.flag); | |||
| // util.barcode("barcode" + this.data.flag, quancode, 500, 100); | |||
| // util.qrcode("qrcode" + this.data.flag, quancode, 350, 350); | |||
| // this.setData({ | |||
| // flag: this.data.flag | |||
| // }); | |||
| // } | |||
| // }, | |||
| /** | |||
| * 生命周期函数--监听页面加载 | |||
| */ | |||
| @@ -29,15 +29,27 @@ | |||
| <text>适用门店</text> | |||
| <text class="fr">{{order.merchantName}}</text> | |||
| </view> | |||
| <view wx:if="{{order.orderStatus==1}}" data-title="{{order.title}}" data-subtitle="{{order.subTitle}}" data-remark="{{order.remark}}" data-quancode="{{order.id}}" bindtap="powerDrawer" data-statu="open"> | |||
| <view style="width:88%;clear: both;"> | |||
| <!-- | |||
| couponOrderStatus | |||
| 0 未使用 | |||
| 1 已使用 | |||
| 2 已过期 | |||
| 3 已经退款 | |||
| --> | |||
| <view data-couponOrderStatus="{{order.couponOrderStatus}}" data-title="{{order.title}}" data-subtitle="{{order.subTitle}}" data-remark="{{order.remark}}" data-quancode="{{order.couponOrderId}}" bindtap="powerDrawer"> | |||
| <view style="width:86%;clear: both;"> | |||
| <text>兑换码</text> | |||
| <text class="fr">{{order.id}}</text> | |||
| <text class="fr">{{order.couponOrderId}}</text> | |||
| </view> | |||
| <view> | |||
| <image class="spcode" src="./../../../assets/img/spcode.png" mode="widthFix"></image> | |||
| </view> | |||
| </view> | |||
| <view> | |||
| <text>下单时间</text> | |||
| <text>{{createDate}}</text> | |||
| @@ -56,18 +68,3 @@ | |||
| <button bindtap='orderFunc' data-couponChannelId="{{order.id}}" class='buy'>立即支付</button> | |||
| </view> | |||
| </view> | |||
| <!--mask--> | |||
| <!-- <view class="drawer_screen" data-title="{{order.title}}" data-subtitle="{{order.subTile}}}" data-remark="{{order.remark}}" data-quancode="{{order.id}}" wx:if="{{showModalStatus}}" bindtap="powerDrawer" data-statu="close"></view> | |||
| <view animation="{{animationData}}" class="drawer_box" wx:if="{{showModalStatus}}"> | |||
| <view class="panel"> | |||
| <view class="barcode"> | |||
| <canvas canvas-id="barcode{{flag+1}}" /> | |||
| </view> | |||
| <view class="qrcode"> | |||
| <canvas canvas-id="qrcode{{flag+1}}" /> | |||
| </view> | |||
| <view class="barnum"><text>兑换码:</text>{{data.id}}</view> | |||
| </view> | |||
| </view> --> | |||
| @@ -126,7 +126,6 @@ | |||
| } | |||
| .classif > view text { | |||
| font-size: 30rpx; | |||
| margin-right:6rpx; | |||
| } | |||
| .classif > view text:nth-child(2) { | |||
| color: #b8b8b8; | |||
| @@ -1,7 +1,7 @@ | |||
| <!-- 限时抢购 查看更多对应的页面 --> | |||
| <view class='flashSale'> | |||
| <view wx:for="{{list}}" class='flashSaleItemWrap' data-couponId="{{item.couponId}}" data-couponChannelId="{{item.id}}" data-targetAd="{{item.targetAd}}" bindtap="gotodetail" | |||
| wx:key="index"> | |||
| <view wx:for="{{list}}" class='flashSaleItemWrap' data-couponId="{{item.couponId}}" data-couponChannelId="{{item.id}}" data-targetAd="{{item.targetAd}}" | |||
| bindtap="gotodetail" wx:key="index"> | |||
| <view class='flashSaleItem'> | |||
| <view class='flashSaleItemTop'> | |||
| <view class='flashSaleItemTopL'> | |||
| @@ -19,14 +19,16 @@ | |||
| </view> | |||
| </view> | |||
| <view class='flashSaleItemBottom'> | |||
| <view class='flashSaleItemBottomTop'><text class='remainingTime'>剩余时间:</text><text class='realRemainingTime'>{{day}}天 {{hour}}小时{{minute}}分钟</text></view> | |||
| <view class='flashSaleItemBottomTop'> | |||
| <text class='remainingTime'>剩余时间:</text> | |||
| <text class='realRemainingTime'>{{day}}天{{hour}}小时{{minute}}分钟</text> | |||
| </view> | |||
| <view class='flashSaleItemBottomBottm'> | |||
| <view class="view1"><text class="remainingNumber">剩余件数:</text><text class='realnumber'>{{item.remainInventory}}件</text></view> | |||
| <view class='buy' wx:if="{{item.priceStr!=0}}">购买</view> | |||
| <view class='buy' wx:if="{{item.priceStr!=0}}">领取</view> | |||
| <view class='buy' wx:if="{{item.priceStr==0}}">领取</view> | |||
| </view> | |||
| </view> | |||
| </view> | |||
| </view> | |||
| </view> | |||
| @@ -22,7 +22,8 @@ Page({ | |||
| code:options.quancode, | |||
| title:options.title, | |||
| subtitle:options.subtitle, | |||
| remark:options.remark | |||
| remark:options.remark, | |||
| couponorderstatus:options.couponorderstatus | |||
| }) | |||
| }, | |||
| @@ -2,12 +2,22 @@ | |||
| <image src="./../../assets/img/bg.png"></image> | |||
| <view class="title">{{title}}</view> | |||
| <view class="subtitle">{{subtitle}}</view> | |||
| <!-- | |||
| couponorderstatus | |||
| 0 未使用 | |||
| 1 已使用 | |||
| 2 已过期 | |||
| 3 已经退款 | |||
| --> | |||
| <view class="panel"> | |||
| <view class="barcode"> | |||
| <canvas canvas-id="barcode" /> | |||
| </view> | |||
| <view class="qrcode"> | |||
| <canvas canvas-id="qrcode" /> | |||
| <image wx:if="{{couponorderstatus==1}}" src="./../../assets/img/wm01.jpg"></image> | |||
| <image wx:if="{{couponorderstatus==2}}" src="./../../assets/img/wm02.jpg"></image> | |||
| <image wx:if="{{couponorderstatus==3}}" src="./../../assets/img/wm03.jpg"></image> | |||
| </view> | |||
| <view class="barnum buy"><text>兑换码:</text>{{code}}</view> | |||
| </view> | |||
| @@ -3,7 +3,6 @@ page { | |||
| } | |||
| .couponbg { | |||
| position: relative; | |||
| height: 100%; | |||
| width: 100%; | |||
| } | |||
| .couponbg image { | |||
| @@ -17,7 +16,7 @@ page { | |||
| right: 0; | |||
| margin: auto; | |||
| z-index: -19999; | |||
| border-radius: 20rpx; | |||
| border-radius: 26rpx; | |||
| } | |||
| .title { | |||
| font-size: 33rpx; | |||
| @@ -37,7 +36,7 @@ page { | |||
| width: 600rpx; | |||
| border-radius: 10rpx; | |||
| background-color: #fff; | |||
| margin: 144rpx auto 0; | |||
| margin: 22rpx auto 0; | |||
| padding: 30rpx 0; | |||
| position: relative; | |||
| z-index: 10000000000; | |||
| @@ -78,12 +77,25 @@ page { | |||
| } | |||
| .qrcode { | |||
| height: 380rpx; | |||
| position: relative; | |||
| height: 360rpx; | |||
| display: flex; | |||
| flex-direction: column; | |||
| justify-content: flex-end; | |||
| align-items: center; | |||
| } | |||
| .qrcode image{ | |||
| position: absolute; | |||
| width: 160rpx; | |||
| height: 160rpx; | |||
| right:0; | |||
| bottom: 0; | |||
| top: 0; | |||
| left: 0; | |||
| margin: auto; | |||
| z-index: 1000000000; | |||
| border-radius:50%; | |||
| } | |||
| .qrcode > canvas { | |||
| width: 350rpx; | |||
| @@ -116,14 +128,15 @@ page { | |||
| margin-top:40rpx; | |||
| } | |||
| .gou{ | |||
| padding-left: 80rpx; | |||
| color: #878d95; | |||
| padding-top:30rpx; | |||
| font-size: 30rpx; | |||
| width: 87%; | |||
| margin: 0 auto; | |||
| color: #878d95; | |||
| font-size: 26rpx; | |||
| padding-bottom:74rpx; | |||
| } | |||
| .mai{ | |||
| color: #666; | |||
| color: #333; | |||
| } | |||
| .remark{ | |||
| padding-top: 37rpx; | |||
| padding-top: 17rpx; | |||
| } | |||