| @@ -146,11 +146,11 @@ Page({ | |||||
| var data = { | var data = { | ||||
| couponChannelId: "" + that.data.couponChannelId, | couponChannelId: "" + that.data.couponChannelId, | ||||
| couponId: "" + that.data.couponId | couponId: "" + that.data.couponId | ||||
| } | |||||
| if (that.data.couponChannelId == null) { | |||||
| }; | |||||
| if (that.data.couponChannelId == null) { | |||||
| data = { | data = { | ||||
| couponId: "" + that.data.couponId | couponId: "" + that.data.couponId | ||||
| } | |||||
| }; | |||||
| } | } | ||||
| /** | /** | ||||
| * orderSave 下单 | * orderSave 下单 | ||||
| @@ -16,7 +16,7 @@ | |||||
| <text>有效期至:</text> | <text>有效期至:</text> | ||||
| <text>{{expiredTime}}</text> | <text>{{expiredTime}}</text> | ||||
| </view> | </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> | <image src="./../../../assets/img/shiyong.jpg" mode="widthFix"></image> | ||||
| </view> | </view> | ||||
| <view class="pane2" wx:if="{{data.couponOrderStatus==2}}"> | <view class="pane2" wx:if="{{data.couponOrderStatus==2}}"> | ||||
| @@ -24,16 +24,22 @@ | |||||
| </view> | </view> | ||||
| <view class="pane2" wx:if="{{data.couponOrderStatus==3}}"> | <view class="pane2" wx:if="{{data.couponOrderStatus==3}}"> | ||||
| <image src="./../../../assets/img/tui.jpg" mode="widthFix"></image> | <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"> | <view class="barcode"> | ||||
| <canvas canvas-id="barcode" /> | <canvas canvas-id="barcode" /> | ||||
| </view> | </view> | ||||
| <view class="qrcode"> | <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" /> | <canvas canvas-id="qrcode" /> | ||||
| </view> | </view> | ||||
| <view class="barnum"><text>兑换码:</text>{{code}}</view> | <view class="barnum"><text>兑换码:</text>{{code}}</view> | ||||
| </view> | </view> | ||||
| <view class="posi"> | <view class="posi"> | ||||
| <view class="tit"> | <view class="tit"> | ||||
| 适用门店 | 适用门店 | ||||
| @@ -58,7 +58,18 @@ | |||||
| justify-content: flex-end; | justify-content: flex-end; | ||||
| align-items: center; | 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 { | .qrcode > canvas { | ||||
| width: 400rpx; | width: 400rpx; | ||||
| height: 400rpx; | height: 400rpx; | ||||
| @@ -4,7 +4,6 @@ | |||||
| <view wx:else>请升级微信版本</view> | <view wx:else>请升级微信版本</view> | ||||
| </view> --> | </view> --> | ||||
| <view class="login-body"> | <view class="login-body"> | ||||
| <view class="login-logo"> | <view class="login-logo"> | ||||
| <image src="../../assets/img/logo.png"></image> | <image src="../../assets/img/logo.png"></image> | ||||
| @@ -19,57 +19,20 @@ Page({ | |||||
| */ | */ | ||||
| powerDrawer: function(e) { | powerDrawer: function(e) { | ||||
| // var currentStatu = e.currentTarget.dataset.statu; | |||||
| // couponOrderStatus | |||||
| // 0 未使用 | |||||
| // 1 已使用 | |||||
| // 2 已过期 | |||||
| // 3 已经退款 | |||||
| console.log(e); | |||||
| wx.navigateTo({ | 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); | 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>适用门店</text> | ||||
| <text class="fr">{{order.merchantName}}</text> | <text class="fr">{{order.merchantName}}</text> | ||||
| </view> | </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>兑换码</text> | ||||
| <text class="fr">{{order.id}}</text> | |||||
| <text class="fr">{{order.couponOrderId}}</text> | |||||
| </view> | </view> | ||||
| <view> | <view> | ||||
| <image class="spcode" src="./../../../assets/img/spcode.png" mode="widthFix"></image> | <image class="spcode" src="./../../../assets/img/spcode.png" mode="widthFix"></image> | ||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| <view> | <view> | ||||
| <text>下单时间</text> | <text>下单时间</text> | ||||
| <text>{{createDate}}</text> | <text>{{createDate}}</text> | ||||
| @@ -56,18 +68,3 @@ | |||||
| <button bindtap='orderFunc' data-couponChannelId="{{order.id}}" class='buy'>立即支付</button> | <button bindtap='orderFunc' data-couponChannelId="{{order.id}}" class='buy'>立即支付</button> | ||||
| </view> | </view> | ||||
| </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 { | .classif > view text { | ||||
| font-size: 30rpx; | font-size: 30rpx; | ||||
| margin-right:6rpx; | |||||
| } | } | ||||
| .classif > view text:nth-child(2) { | .classif > view text:nth-child(2) { | ||||
| color: #b8b8b8; | color: #b8b8b8; | ||||
| @@ -1,7 +1,7 @@ | |||||
| <!-- 限时抢购 查看更多对应的页面 --> | <!-- 限时抢购 查看更多对应的页面 --> | ||||
| <view class='flashSale'> | <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='flashSaleItem'> | ||||
| <view class='flashSaleItemTop'> | <view class='flashSaleItemTop'> | ||||
| <view class='flashSaleItemTopL'> | <view class='flashSaleItemTopL'> | ||||
| @@ -19,14 +19,16 @@ | |||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| <view class='flashSaleItemBottom'> | <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='flashSaleItemBottomBottm'> | ||||
| <view class="view1"><text class="remainingNumber">剩余件数:</text><text class='realnumber'>{{item.remainInventory}}件</text></view> | <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 class='buy' wx:if="{{item.priceStr==0}}">领取</view> | |||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| @@ -22,7 +22,8 @@ Page({ | |||||
| code:options.quancode, | code:options.quancode, | ||||
| title:options.title, | title:options.title, | ||||
| subtitle:options.subtitle, | subtitle:options.subtitle, | ||||
| remark:options.remark | |||||
| remark:options.remark, | |||||
| couponorderstatus:options.couponorderstatus | |||||
| }) | }) | ||||
| }, | }, | ||||
| @@ -2,12 +2,22 @@ | |||||
| <image src="./../../assets/img/bg.png"></image> | <image src="./../../assets/img/bg.png"></image> | ||||
| <view class="title">{{title}}</view> | <view class="title">{{title}}</view> | ||||
| <view class="subtitle">{{subtitle}}</view> | <view class="subtitle">{{subtitle}}</view> | ||||
| <!-- | |||||
| couponorderstatus | |||||
| 0 未使用 | |||||
| 1 已使用 | |||||
| 2 已过期 | |||||
| 3 已经退款 | |||||
| --> | |||||
| <view class="panel"> | <view class="panel"> | ||||
| <view class="barcode"> | <view class="barcode"> | ||||
| <canvas canvas-id="barcode" /> | <canvas canvas-id="barcode" /> | ||||
| </view> | </view> | ||||
| <view class="qrcode"> | <view class="qrcode"> | ||||
| <canvas canvas-id="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> | ||||
| <view class="barnum buy"><text>兑换码:</text>{{code}}</view> | <view class="barnum buy"><text>兑换码:</text>{{code}}</view> | ||||
| </view> | </view> | ||||
| @@ -3,7 +3,6 @@ page { | |||||
| } | } | ||||
| .couponbg { | .couponbg { | ||||
| position: relative; | position: relative; | ||||
| height: 100%; | |||||
| width: 100%; | width: 100%; | ||||
| } | } | ||||
| .couponbg image { | .couponbg image { | ||||
| @@ -17,7 +16,7 @@ page { | |||||
| right: 0; | right: 0; | ||||
| margin: auto; | margin: auto; | ||||
| z-index: -19999; | z-index: -19999; | ||||
| border-radius: 20rpx; | |||||
| border-radius: 26rpx; | |||||
| } | } | ||||
| .title { | .title { | ||||
| font-size: 33rpx; | font-size: 33rpx; | ||||
| @@ -37,7 +36,7 @@ page { | |||||
| width: 600rpx; | width: 600rpx; | ||||
| border-radius: 10rpx; | border-radius: 10rpx; | ||||
| background-color: #fff; | background-color: #fff; | ||||
| margin: 144rpx auto 0; | |||||
| margin: 22rpx auto 0; | |||||
| padding: 30rpx 0; | padding: 30rpx 0; | ||||
| position: relative; | position: relative; | ||||
| z-index: 10000000000; | z-index: 10000000000; | ||||
| @@ -78,12 +77,25 @@ page { | |||||
| } | } | ||||
| .qrcode { | .qrcode { | ||||
| height: 380rpx; | |||||
| position: relative; | |||||
| height: 360rpx; | |||||
| display: flex; | display: flex; | ||||
| flex-direction: column; | flex-direction: column; | ||||
| justify-content: flex-end; | justify-content: flex-end; | ||||
| align-items: center; | 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 { | .qrcode > canvas { | ||||
| width: 350rpx; | width: 350rpx; | ||||
| @@ -116,14 +128,15 @@ page { | |||||
| margin-top:40rpx; | margin-top:40rpx; | ||||
| } | } | ||||
| .gou{ | .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{ | .mai{ | ||||
| color: #666; | |||||
| color: #333; | |||||
| } | } | ||||
| .remark{ | .remark{ | ||||
| padding-top: 37rpx; | |||||
| padding-top: 17rpx; | |||||
| } | } | ||||