| @@ -25,7 +25,6 @@ Page({ | |||
| let that = this; | |||
| that.getBannerlist(); | |||
| console.log("onShow") | |||
| console.log() | |||
| var todayDate=new Date().getTime(); | |||
| that.setData({ | |||
| todayDate:todayDate | |||
| @@ -196,7 +195,8 @@ Page({ | |||
| flag: "mybargain", | |||
| allow_load: true, | |||
| loading: false, | |||
| content: "" | |||
| content: "", | |||
| page:1 | |||
| }) | |||
| that.getList(1, 'mybargain'); | |||
| wx.setNavigationBarTitle({ | |||
| @@ -211,6 +211,7 @@ Page({ | |||
| flag: "bargaingoods", | |||
| allow_load: true, | |||
| loading: false, | |||
| page:1, | |||
| content: "" | |||
| }) | |||
| @@ -69,8 +69,6 @@ Page({ | |||
| } | |||
| }) | |||
| .then(res => { | |||
| console.log(res) | |||
| console.log("--------------------------status------------------------------------") | |||
| if (res.data.status == 1) { | |||
| that.setData({ | |||
| discountStatus: 1 | |||
| @@ -111,6 +109,7 @@ Page({ | |||
| .then(res => { | |||
| console.log(res); | |||
| // id 是订单号 | |||
| that.pressOrderDetail(orderId); | |||
| }) | |||
| .catch(err => { | |||
| @@ -335,7 +334,7 @@ Page({ | |||
| }) | |||
| } else { | |||
| // 免费券 | |||
| that.payOrderUpdate(orderId, "0", 1, '', 'free'); | |||
| that.payOrderUpdate(orderId, "0", 1, '', 'free',that); | |||
| if (that.data.cardType == 100) { | |||
| wx.setStorage({ | |||
| key: 'couponNum2', | |||
| @@ -9,7 +9,7 @@ | |||
| <text class="txt04">可砍至<text class="money">{{data.salePrice/100}}</text>元</text> | |||
| </view> | |||
| </view> | |||
| <view class="progress" hover-class="none" hover-stop-propagation="false" wx:if="{{data.orderStatus != 8}}"> | |||
| <view class="progress" hover-class="none" hover-stop-propagation="false" wx:if="{{data.orderStatus !=8&&data.orderStatus!=1}}"> | |||
| <view class="clearfix progesstext" hover-class="none" hover-stop-propagation="false"> | |||
| <text class="fl">已砍 <text>{{already}}元</text></text> | |||
| <text class="fr" wx:if="{{data.pressCurrentValue/100!=0}}">还剩 <text>{{remain}}元</text></text> | |||
| @@ -29,7 +29,7 @@ | |||
| <button bindtap="barginAgain" data-couponChannelId="{{data.couponChannelId}}" data-couponId="{{data.productId}}" data-id="{{data.id}}">发起砍价</button> | |||
| <button bindtap="gotomore">更多砍价商品</button> | |||
| </view> | |||
| <view class="success" wx:if="{{data.orderStatus == 7}}" hover-class="none" hover-stop-propagation="false"> | |||
| <view class="success" wx:if="{{data.orderStatus == 7||data.orderStatus == 1}}" hover-class="none" hover-stop-propagation="false"> | |||
| <image src="./../../../assets/images/success01.png" mode="widthFix"></image> | |||
| <text class="" selectable="false" space="false" decode="false"> | |||
| 砍价成功 | |||
| @@ -265,7 +265,6 @@ Page({ | |||
| that.setData({ | |||
| data: res.data | |||
| }); | |||
| if (res.data.validType == 1) { | |||
| that.setData({ | |||
| validStartDate: util.formatTime(res.data.validStartDate, "yyyy-MM-dd"), | |||
| @@ -294,7 +293,7 @@ Page({ | |||
| let that = this; | |||
| that.orderFunc("discount"); | |||
| that.setData({ | |||
| showbutton:true | |||
| showbutton1:true | |||
| }) | |||
| }, | |||
| /** | |||
| @@ -507,7 +506,7 @@ Page({ | |||
| key: 'couponNum2', | |||
| data: "couponNum2" | |||
| }) | |||
| } else { | |||
| } else if(that.data.data.type!=5){ | |||
| wx.setStorage({ | |||
| key: 'couponNum', | |||
| data: "couponNum" | |||
| @@ -538,6 +537,7 @@ Page({ | |||
| }); | |||
| }) | |||
| } else { | |||
| console.log(that.data.type) | |||
| // 免费券 | |||
| that.payOrderUpdate(orderId, "0", 1, '', 'free'); | |||
| if (that.data.cardType == 100) { | |||
| @@ -545,7 +545,7 @@ Page({ | |||
| key: 'couponNum2', | |||
| data: "couponNum2" | |||
| }) | |||
| } else { | |||
| } else if (that.data.data.type != "5"){ | |||
| wx.setStorage({ | |||
| key: 'couponNum', | |||
| data: "couponNum" | |||
| @@ -563,9 +563,9 @@ Page({ | |||
| }) | |||
| }, | |||
| onShow() { | |||
| // this.setData({ | |||
| // showbutton: false | |||
| // }) | |||
| this.setData({ | |||
| showbutton: false | |||
| }) | |||
| }, | |||
| onShareAppMessage: function (options) { | |||
| var that = this; | |||
| @@ -35,7 +35,6 @@ | |||
| <text class="yuan">元</text> | |||
| <text class='throgh' wx:if="{{data.unit==0}}">{{data.priceStr}}元</text> | |||
| <text wx:if="{{data.unit==1}}">{{data.priceStr}}小时</text> | |||
| <text class='throgh' wx:if="{{data.unit==0}}">{{data.priceStr}}元</text> | |||
| </view> | |||
| <view class="fl" wx:if="{{data.type==8}}">可砍至 | |||
| <text class="pri01">{{data.salePriceStr}}</text>元 | |||
| @@ -84,21 +83,21 @@ | |||
| </view> | |||
| </view> | |||
| <view wx:if="{{data.type!=8}}" class="buy-view app-border-top" style="position:fixed;z-index:{{zIndex}};"> | |||
| <view class="buy-view app-border-top" style="position:fixed;z-index:{{zIndex}};"> | |||
| <button bindtap='gotopay' disabled='{{showbutton}}' hover-class='active' class='buy' wx:if="{{data.salePriceStr!=0&&data.remainInventory!=0&&endtime!='活动已结束'}}"> | |||
| <text class='txt'>{{data.salePriceStr}}元</text>马上购买</button> | |||
| <button bindtap='gotopay' disabled='{{showbutton}}' class='buy' wx:if="{{data.salePriceStr==0&&data.remainInventory!=0&&endtime!='活动已结束'}}">免费领取</button> | |||
| <button class='buy' disabled='true' wx:if="{{data.remainInventory==0&&endtime!='活动已结束'}}">已售罄</button> | |||
| <button class='buy' disabled='true' wx:if="{{data.remainInventory==0&&endtime!='活动已结束'||data.remainInventory==0&&data.type==8}}">已售罄</button> | |||
| <button class='buy' disabled='true' wx:if="{{endtime=='活动已结束'}}">活动已结束</button> | |||
| <button class='buy' disabled='true' wx:if="{{total_micro_second<=0}}">活动已结束</button> | |||
| </view> | |||
| </view> | |||
| <view wx:if="{{data.type==8}}" class="btns clearfix" hover-class="none" hover-stop-propagation="false"> | |||
| <view wx:if="{{data.remainInventory!=0&&data.type==8}}" class="btns clearfix" hover-class="none" hover-stop-propagation="false"> | |||
| <button class="fl" bindtap='gotopay' data-discount='discount1' disabled='{{showbutton}}'> | |||
| <text>{{data.priceStr}}元</text> | |||
| <text>立即购买</text> | |||
| </button> | |||
| <button class="fr" bindtap='inviteFriend' disabled='{{showbutton}}'> | |||
| <button class="fr" bindtap='inviteFriend' disabled='{{showbutton1}}'> | |||
| 发起砍价 | |||
| </button> | |||
| </view> | |||
| @@ -145,8 +145,12 @@ Page({ | |||
| 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") | |||
| }); | |||
| util.barcode("barcode", options.quancode, 510, 100); | |||
| util.qrcode("qrcode", options.quancode, 350, 350); | |||
| let url = JSON.stringify({ | |||
| END:"C", | |||
| TYPE:"couponorder", | |||
| ID: options.quancode | |||
| }) | |||
| util.qrcode("qrcode", url, 350, 350); | |||
| }) | |||
| .catch(err => { | |||
| wx.showToast({ | |||
| @@ -7,7 +7,9 @@ | |||
| <text class="title">{{data.title}}</text> | |||
| <view class="time">{{data.subTitle}}</view> | |||
| <view class="money"> | |||
| <text>¥{{data.salePrice/100}}</text> | |||
| <text wx:if="{{data.type == 8&&data.price == data.couponPrice}}">¥{{data.couponPrice/100}}</text> | |||
| <text wx:if="{{data.type == 8&&data.price != data.couponPrice}}">¥{{data.salePrice/100}}</text> | |||
| <text wx:if="{{data.type != 8}}">¥{{data.salePrice/100}}</text> | |||
| <del>¥{{data.price/100}}</del> | |||
| <text wx:if="{{data.usePrice!=undefined}}" class="manjian">满{{data.usePrice/100}}元可用</text> | |||
| <text wx:if="{{data.usePrice==undefined}}" class="manjian">仅限本店使用</text> | |||
| @@ -24,9 +26,6 @@ | |||
| <image wx:if="{{data.couponOrderStatus==2}}" src="{{wm02Url}}" mode='widthFix'></image> | |||
| <image wx:if="{{data.couponOrderStatus==3}}" src="{{wm03Url}}" mode='widthFix'></image> | |||
| <view class="panel" wx:if="{{data.couponOrderStatus==0}}"> | |||
| <!-- <view class="barcode"> | |||
| <canvas canvas-id="barcode" /> | |||
| </view> --> | |||
| <view class="qrcode"> | |||
| <canvas canvas-id="qrcode" /> | |||
| </view> | |||
| @@ -175,6 +175,19 @@ Page({ | |||
| wx.hideLoading() | |||
| }, 5000) | |||
| that.payOrderUpdate(that.data.orderId, payOrderId, 1,'','',that); // 支付成功 | |||
| if (res.errMsg == "requestPayment:ok") { | |||
| if (that.data.order.type == 100) { | |||
| wx.setStorage({ | |||
| key: 'couponNum2', | |||
| data: "couponNum2" | |||
| }) | |||
| } else if (that.data.order.type != 5) { | |||
| wx.setStorage({ | |||
| key: 'couponNum', | |||
| data: "couponNum" | |||
| }) | |||
| } | |||
| } | |||
| }, | |||
| fail: res => { | |||
| that.payOrderUpdate(that.data.orderId, payOrderId, 2,'','fail',that); | |||
| @@ -186,6 +199,17 @@ Page({ | |||
| } else { | |||
| // 免费券 | |||
| that.payOrderUpdate(orderId, "0", 1,'','free') // 支付成功 | |||
| if (that.data.order.type == 100) { | |||
| wx.setStorage({ | |||
| key: 'couponNum2', | |||
| data: "couponNum2" | |||
| }) | |||
| } else if (that.data.order.type != "5") { | |||
| wx.setStorage({ | |||
| key: 'couponNum', | |||
| data: "couponNum" | |||
| }) | |||
| } | |||
| wx.showToast({ | |||
| title: "支付成功", | |||
| duration: 2000, | |||
| @@ -244,20 +268,4 @@ Page({ | |||
| } | |||
| }); | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面隐藏 | |||
| */ | |||
| onHide: function () {}, | |||
| /** | |||
| * 页面相关事件处理函数--监听用户下拉动作 | |||
| */ | |||
| onPullDownRefresh: function () {}, | |||
| /** | |||
| * 页面上拉触底事件的处理函数 | |||
| */ | |||
| onReachBottom: function () {}, | |||
| }); | |||
| @@ -54,13 +54,14 @@ | |||
| <text>{{order.orderNumber}}</text> | |||
| </view> | |||
| <view> | |||
| <text>面额</text> | |||
| <text wx:if="{{order.type == 8}}">原价</text> | |||
| <text wx:if="{{order.type != 8}}">面额</text> | |||
| <text class="jine1" wx:if="{{order.unit==0}}">{{order.price/100}}元</text> | |||
| <text class="jine1" wx:if="{{order.unit==1}}">{{order.price/100}}小时</text> | |||
| </view> | |||
| <view> | |||
| <view> | |||
| <text>订单金额</text> | |||
| <text class="jine">{{order.salePrice/100}}元</text> | |||
| <text class="jine">{{order.payment/100}}元</text> | |||
| </view> | |||
| <view class="clearfix" bindtap='showDoorList'> | |||
| <text>适用门店:</text> | |||
| @@ -3,7 +3,7 @@ | |||
| <i-tab class='i-tab' wx:for="{{tabs}}" wx:key="unique" key="{{item.key}}" title="{{item.name}}"></i-tab> | |||
| </i-tabs> | |||
| <view style='padding-top:90rpx;'> | |||
| <view wx:if="{{list.length!=0}}" class='section' wx:for='{{list}}' wx:key='{{index}}'> | |||
| <view wx:for='{{list}}' wx:if="{{list.length!=0}}" class='section' wx:key='{{index}}' > | |||
| <view class='detail_msg'> | |||
| <view class='logo'> | |||
| <image mode="aspectFill" src='{{item.coverImg}}'></image> | |||
| @@ -26,8 +26,8 @@ | |||
| <text class='sucess' wx:if="{{item.orderStatus==1&&item.salePrice!=0}}">付款成功</text> | |||
| </view> | |||
| <view class="sub">{{item.subTitle}}</view> | |||
| <view class="value">面额:<text wx:if="{{item.unit==0}}">{{item.price/100}}元</text><text wx:if="{{item.unit==1}}">{{item.price/100}}小时</text></view> | |||
| <view class="value" wx:if="{{item.type != 8}}">面额:<text wx:if="{{item.unit==0}}">{{item.price/100}}元</text><text wx:if="{{item.unit==1}}">{{item.price/100}}小时</text></view> | |||
| <view class="value" wx:if="{{item.type == 8}}">原价:<text wx:if="{{item.unit==0}}">{{item.price/100}}元</text><text wx:if="{{item.unit==1}}">{{item.price/100}}小时</text></view> | |||
| <image class='sendImg' wx:if="{{item.sendChannelType!=1&&item.sendChannelType!=undefined}}" src='./../../../assets/images/give.png' mode='widthFix'></image> | |||
| <view class="value">下单时间:<text>{{item.createDate}}</text> | |||
| @@ -36,7 +36,7 @@ | |||
| </view> | |||
| <view class='payment'> | |||
| <view> | |||
| <text>实付金额:</text><text>{{item.salePrice/100}}元</text> | |||
| <text>实付金额:</text><text>{{item.payment/100}}元</text> | |||
| </view> | |||
| <!-- | |||
| orderStatus | |||
| @@ -16,9 +16,9 @@ | |||
| <view class='section' wx:for='{{list}}' wx:key='{{index}}' bindtap="gotouse" data-quancode="{{item.id}}" data-couponorderstatus="{{item.couponOrderStatus}}"> | |||
| <view class='mms'> | |||
| <view class='detail_msg'> | |||
| <!-- <view class='logo'> | |||
| <view class='logo'> | |||
| <image mode="aspectFill" src='{{item.coverImg}}'></image> | |||
| </view> --> | |||
| </view> | |||
| <view class='info'> | |||
| <view class='title'> | |||
| <text>{{item.title}}</text> | |||