| @@ -30,7 +30,8 @@ | |||||
| <view class="fl ri" hover-class="none" hover-stop-propagation="false"> | <view class="fl ri" hover-class="none" hover-stop-propagation="false"> | ||||
| <text class="txt01">{{item.title}}</text> | <text class="txt01">{{item.title}}</text> | ||||
| <text class="txt02">{{item.subTitle}}</text> | <text class="txt02">{{item.subTitle}}</text> | ||||
| <text class="txt04 mr" wx:if="{{item.orderStatus == 6&&todayDate<=item.pressEndDate}}">距砍价到{{item.salePrice/100}}元还差:{{item.pressCurrentValue/100}}元</text> | |||||
| <text class="txt04 mr txt004" wx:if="{{item.orderStatus == 6&&todayDate<=item.pressEndDate}}">距砍价到{{item.salePrice/100}}元还差:</text> | |||||
| <text class="txt04 mr" wx:if="{{item.orderStatus == 6&&todayDate<=item.pressEndDate}}">{{item.pressCurrentValue/100}}元</text> | |||||
| <text class="txt04 mr" wx:if="{{item.orderStatus == 7}}">已砍价到底价:{{item.salePrice/100}}元</text> | <text class="txt04 mr" wx:if="{{item.orderStatus == 7}}">已砍价到底价:{{item.salePrice/100}}元</text> | ||||
| </view> | </view> | ||||
| <view class='again' wx:if="{{item.orderStatus == 6&&todayDate<=item.pressEndDate}}" hover-class="none" hover-stop-propagation="false" data-id="{{item.id}}" bindtap="inviteFriend"> | <view class='again' wx:if="{{item.orderStatus == 6&&todayDate<=item.pressEndDate}}" hover-class="none" hover-stop-propagation="false" data-id="{{item.id}}" bindtap="inviteFriend"> | ||||
| @@ -164,7 +164,11 @@ page{ | |||||
| padding-bottom: 100rpx; | padding-bottom: 100rpx; | ||||
| } | } | ||||
| .mr{ | .mr{ | ||||
| margin-top: 60rpx; | |||||
| height: 40rpx; | |||||
| line-height: 40rpx; | |||||
| } | |||||
| .txt004{ | |||||
| margin-top: 10rpx; | |||||
| } | } | ||||
| .market { | .market { | ||||
| width: 100%; | width: 100%; | ||||
| @@ -17,7 +17,8 @@ Page({ | |||||
| sec: null, | sec: null, | ||||
| showPage: false, | showPage: false, | ||||
| discountStatus:null, | discountStatus:null, | ||||
| disabled:false | |||||
| disabled:false, | |||||
| display:"block!important" | |||||
| }, | }, | ||||
| /** | /** | ||||
| @@ -205,6 +206,8 @@ Page({ | |||||
| }, | }, | ||||
| payOrderUpdate: (orderId, payOrderId, status, reason, type, _this) => { | payOrderUpdate: (orderId, payOrderId, status, reason, type, _this) => { | ||||
| let that = this; | let that = this; | ||||
| console.log(that) | |||||
| console.log(_this) | |||||
| // 支付成功 | // 支付成功 | ||||
| Http.post({ | Http.post({ | ||||
| url: config.api.payOrderUpdate, | url: config.api.payOrderUpdate, | ||||
| @@ -216,7 +219,10 @@ Page({ | |||||
| } | } | ||||
| }) | }) | ||||
| .then(res => { | .then(res => { | ||||
| wx.hideLoading() | |||||
| wx.hideLoading(); | |||||
| _this.setData({ | |||||
| display: "none!important", | |||||
| }) | |||||
| // 有价券 | // 有价券 | ||||
| if (!type && type != 'free') { | if (!type && type != 'free') { | ||||
| wx.navigateTo({ | wx.navigateTo({ | ||||
| @@ -291,7 +297,7 @@ Page({ | |||||
| /** | /** | ||||
| * 用户支付成功以后跳转到券包列表 | * 用户支付成功以后跳转到券包列表 | ||||
| */ | */ | ||||
| if (that.data.cardType == 7) { | |||||
| if (that.data.cardType == 100) { | |||||
| wx.setStorage({ | wx.setStorage({ | ||||
| key: 'couponNum2', | key: 'couponNum2', | ||||
| data: "couponNum2" | data: "couponNum2" | ||||
| @@ -330,7 +336,7 @@ Page({ | |||||
| } else { | } else { | ||||
| // 免费券 | // 免费券 | ||||
| that.payOrderUpdate(orderId, "0", 1, '', 'free'); | that.payOrderUpdate(orderId, "0", 1, '', 'free'); | ||||
| if (that.data.cardType == 7) { | |||||
| if (that.data.cardType == 100) { | |||||
| wx.setStorage({ | wx.setStorage({ | ||||
| key: 'couponNum2', | key: 'couponNum2', | ||||
| data: "couponNum2" | data: "couponNum2" | ||||
| @@ -60,7 +60,7 @@ | |||||
| </view> | </view> | ||||
| <button class='share user-motto fr' data-orderId='{{data.id}}' id="shareBtn" open-type="share" hover-class="other-button-hover">邀请好友继续砍价</button> | <button class='share user-motto fr' data-orderId='{{data.id}}' id="shareBtn" open-type="share" hover-class="other-button-hover">邀请好友继续砍价</button> | ||||
| </view> | </view> | ||||
| <view wx:if="{{data.orderStatus == 7&&discountStatus == 1}}" class="btns01 clearfix" hover-class="none" hover-stop-propagation="false"> | |||||
| <button bindtap='orderFunc' data-orderId="{{data.id}}" data-salePrice="{{data.salePrice/100}}" hover-class="other-button-hover" disabled="{{disabled}}">{{data.salePrice/100}}元 底价购买 </button> | |||||
| <view style='display:{{display}}' wx:if="{{data.orderStatus == 7&&discountStatus == 1}}" class="btns01 clearfix" hover-class="none" hover-stop-propagation="false"> | |||||
| <button bindtap='orderFunc' data-orderId="{{data.id}}" data-salePrice="{{data.salePrice/100}}" hover-class="other-button-hover">{{data.salePrice/100}}元 底价购买</button> | |||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| @@ -131,7 +131,7 @@ Page({ | |||||
| * 页面需要初始渲染的效果 | * 页面需要初始渲染的效果 | ||||
| */ | */ | ||||
| Http.get({ | Http.get({ | ||||
| url: config.api.couponOrderDetail, | |||||
| url: config.api.couponOrderDetail, | |||||
| data: { | data: { | ||||
| couponOrderId: options.quancode | couponOrderId: options.quancode | ||||
| } | } | ||||
| @@ -242,7 +242,7 @@ Page({ | |||||
| showPage: true | showPage: true | ||||
| }) | }) | ||||
| } | } | ||||
| if (res.data.type == 7) { | |||||
| if (res.data.type == 100) { | |||||
| wx.setNavigationBarTitle({ | wx.setNavigationBarTitle({ | ||||
| title: "卡详情" | title: "卡详情" | ||||
| }) | }) | ||||
| @@ -293,6 +293,9 @@ Page({ | |||||
| inviteFriend: function () { | inviteFriend: function () { | ||||
| let that = this; | let that = this; | ||||
| that.orderFunc("discount"); | that.orderFunc("discount"); | ||||
| that.setData({ | |||||
| showbutton:true | |||||
| }) | |||||
| }, | }, | ||||
| /** | /** | ||||
| * 支付订单更新 | * 支付订单更新 | ||||
| @@ -499,7 +502,7 @@ Page({ | |||||
| /** | /** | ||||
| * 用户支付成功以后跳转到券包列表 | * 用户支付成功以后跳转到券包列表 | ||||
| */ | */ | ||||
| if (that.data.cardType == 7) { | |||||
| if (that.data.cardType == 100) { | |||||
| wx.setStorage({ | wx.setStorage({ | ||||
| key: 'couponNum2', | key: 'couponNum2', | ||||
| data: "couponNum2" | data: "couponNum2" | ||||
| @@ -537,7 +540,7 @@ Page({ | |||||
| } else { | } else { | ||||
| // 免费券 | // 免费券 | ||||
| that.payOrderUpdate(orderId, "0", 1, '', 'free'); | that.payOrderUpdate(orderId, "0", 1, '', 'free'); | ||||
| if (that.data.cardType == 7) { | |||||
| if (that.data.cardType == 100) { | |||||
| wx.setStorage({ | wx.setStorage({ | ||||
| key: 'couponNum2', | key: 'couponNum2', | ||||
| data: "couponNum2" | data: "couponNum2" | ||||
| @@ -560,9 +563,9 @@ Page({ | |||||
| }) | }) | ||||
| }, | }, | ||||
| onShow() { | onShow() { | ||||
| this.setData({ | |||||
| showbutton: false | |||||
| }) | |||||
| // this.setData({ | |||||
| // showbutton: false | |||||
| // }) | |||||
| }, | }, | ||||
| onShareAppMessage: function (options) { | onShareAppMessage: function (options) { | ||||
| var that = this; | var that = this; | ||||
| @@ -27,7 +27,7 @@ | |||||
| <text>{{sec}}</text> | <text>{{sec}}</text> | ||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| <text class='title'>{{data.title}}<text class="elecard" wx:if="{{data.type==7}}">电子卡</text></text> | |||||
| <text class='title'>{{data.title}}<text class="elecard" wx:if="{{data.type==100}}">电子卡</text></text> | |||||
| <text class="subTitle">{{data.subTitle}}</text> | <text class="subTitle">{{data.subTitle}}</text> | ||||
| <view class='salePriceStr clearfix'> | <view class='salePriceStr clearfix'> | ||||
| <view class="fl" wx:if="{{data.type!=8}}">售价: | <view class="fl" wx:if="{{data.type!=8}}">售价: | ||||
| @@ -99,7 +99,7 @@ | |||||
| <text>立即购买</text> | <text>立即购买</text> | ||||
| </button> | </button> | ||||
| <button class="fr" bindtap='inviteFriend' disabled='{{showbutton}}'> | <button class="fr" bindtap='inviteFriend' disabled='{{showbutton}}'> | ||||
| 邀请好友继续砍价 | |||||
| 发起砍价 | |||||
| </button> | </button> | ||||
| </view> | </view> | ||||
| @@ -35,7 +35,7 @@ | |||||
| 只有支付完成的时 | 只有支付完成的时 | ||||
| 才显示兑换码 | 才显示兑换码 | ||||
| --> | --> | ||||
| <view wx:if="{{order.orderStatus==1&&order.type!=7}}" data-couponOrderStatus="{{order.couponOrderStatus}}" data-title="{{order.title}}" data-subtitle="{{order.subTitle}}" data-remark="{{order.remark}}" data-quancode="{{order.couponOrderId}}" bindtap="powerDrawer"> | |||||
| <view wx:if="{{order.orderStatus==1&&order.type!=100}}" 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;"> | <view style="width:86%;clear: both;"> | ||||
| <text>兑换码</text> | <text>兑换码</text> | ||||
| <text class="fr">{{order.couponOrderId}}</text> | <text class="fr">{{order.couponOrderId}}</text> | ||||
| @@ -78,8 +78,4 @@ | |||||
| <image src="{{newUrl}}" class='gameimg' mode='widthFix'></image> | <image src="{{newUrl}}" class='gameimg' mode='widthFix'></image> | ||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| <!-- 如果是消费卡 就显示跳转到首页--> | |||||
| <!-- <view style="margin-top:30rpx;" wx:if="{{order.orderStatus!=0&&order.type==7}}" class="app-border-top"> | |||||
| <button class='btns' bindtap='gotoUse' hover-class='active'>立即使用</button> | |||||
| </view> --> | |||||
| </view> | </view> | ||||
| @@ -11,7 +11,8 @@ Page({ | |||||
| expiredTime: "", | expiredTime: "", | ||||
| updateDate: "", | updateDate: "", | ||||
| //存储计时器 | //存储计时器 | ||||
| setInter: "" | |||||
| setInter: "", | |||||
| showPage:false | |||||
| }, | }, | ||||
| onUnload: function () { | onUnload: function () { | ||||
| let that = this; | let that = this; | ||||
| @@ -34,14 +35,15 @@ Page({ | |||||
| } | } | ||||
| }).then(res => { | }).then(res => { | ||||
| that.setData({ | that.setData({ | ||||
| data: res.data | |||||
| data: res.data, | |||||
| showPage:true | |||||
| }); | }); | ||||
| that.setData({ | that.setData({ | ||||
| expiredTime: util.fmtDate(that.data.data.expiredTime), | expiredTime: util.fmtDate(that.data.data.expiredTime), | ||||
| updateDate: util.formatTime(that.data.data.updateDate, "yyyy-MM-dd hh:mm:ss"), | updateDate: util.formatTime(that.data.data.updateDate, "yyyy-MM-dd hh:mm:ss"), | ||||
| createDate: util.formatTime(that.data.data.createDate, "yyyy-MM-dd hh:mm:ss") | createDate: util.formatTime(that.data.data.createDate, "yyyy-MM-dd hh:mm:ss") | ||||
| }); | }); | ||||
| util.barcode("barcode", options.quancode, 510, 100); | |||||
| // util.barcode("barcode", options.quancode, 510, 100); | |||||
| util.qrcode("qrcode", options.quancode, 350, 350); | util.qrcode("qrcode", options.quancode, 350, 350); | ||||
| }) | }) | ||||
| .catch(err => { | .catch(err => { | ||||
| @@ -1,4 +1,4 @@ | |||||
| <view class="container page"> | |||||
| <view class="container page" wx:if="{{showPage}}"> | |||||
| <view class="coupon_detail clearfix"> | <view class="coupon_detail clearfix"> | ||||
| <view class="fl wmfl"> | <view class="fl wmfl"> | ||||
| <image src="{{data.coverImg}}"/> | <image src="{{data.coverImg}}"/> | ||||