@@ -254,10 +254,12 @@ Page({ | |||||
*/ | */ | ||||
gotopay: function(e) { | gotopay: function(e) { | ||||
let that = this; | let that = this; | ||||
let formId = e.detail.formId; | |||||
var discount = e.currentTarget.dataset.discount; | var discount = e.currentTarget.dataset.discount; | ||||
that.setData({ | that.setData({ | ||||
queueData: null, | queueData: null, | ||||
showbutton: true | |||||
showbutton: true, | |||||
formId: formId | |||||
}) | }) | ||||
Http.get({ | Http.get({ | ||||
url: config.api.getQuestion, | url: config.api.getQuestion, | ||||
@@ -587,22 +589,26 @@ Page({ | |||||
var data = { | var data = { | ||||
couponChannelId: "" + that.data.couponChannelId, | couponChannelId: "" + that.data.couponChannelId, | ||||
couponId: "" + that.data.couponId, | couponId: "" + that.data.couponId, | ||||
formId: "" + that.data.formId, | |||||
press: true | press: true | ||||
} | } | ||||
} else if (discount == 'discount1') { | } else if (discount == 'discount1') { | ||||
var data = { | var data = { | ||||
couponChannelId: "" + that.data.couponChannelId, | couponChannelId: "" + that.data.couponChannelId, | ||||
couponId: "" + that.data.couponId, | couponId: "" + that.data.couponId, | ||||
formId: "" + that.data.formId, | |||||
press: false | press: false | ||||
} | } | ||||
} else if (that.data.couponChannelId == null) { | } else if (that.data.couponChannelId == null) { | ||||
var data = { | var data = { | ||||
couponId: "" + that.data.couponId | |||||
couponId: "" + that.data.couponId, | |||||
formId: "" + that.data.formId, | |||||
}; | }; | ||||
} else { | } else { | ||||
var data = { | var data = { | ||||
couponChannelId: "" + that.data.couponChannelId, | couponChannelId: "" + that.data.couponChannelId, | ||||
couponId: "" + that.data.couponId, | couponId: "" + that.data.couponId, | ||||
formId: "" + that.data.formId, | |||||
} | } | ||||
} | } | ||||
/** | /** | ||||
@@ -92,16 +92,18 @@ | |||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class="buy-view app-border-top" style="position:fixed;z-index:{{zIndex}};"> | |||||
<button class='goback' bindtap='goback'><image src='{{wmhome}}' mode="widthFix"></image></button> | |||||
<button bindtap='gotopay' disabled='{{showbutton}}' hover-class='active' class='buy' wx:if="{{data.salePriceStr!=0&&data.remainInventory!=0&&endtime!='活动已结束'&&data.activityStatus!=0}}"> | |||||
<text class='txt'>{{data.salePriceStr}}元</text>马上购买</button> | |||||
<button bindtap='gotopay' disabled='{{showbutton}}' class='buy' wx:if="{{data.salePriceStr==0&&data.remainInventory!=0&&endtime!='活动已结束'&&data.activityStatus!=0}}">免费领取</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=='活动已结束'&&data.activityStatus!=0}}">活动已结束</button> | |||||
<button class='buy' disabled='true' wx:if="{{total_micro_second<=0&&data.activityStatus!=0}}">活动已结束</button> | |||||
<button class='buy' disabled='true' wx:if="{{data.activityStatus==0}}">活动未开始</button> | |||||
</view> | |||||
<form bindsubmit="gotopay" report-submit='true' > | |||||
<view class="buy-view app-border-top" style="position:fixed;z-index:{{zIndex}};"> | |||||
<button class='goback' bindtap='goback'><image src='{{wmhome}}' mode="widthFix"></image></button> | |||||
<button form-type="submit" disabled='{{showbutton}}' hover-class='active' class='buy' wx:if="{{data.salePriceStr!=0&&data.remainInventory!=0&&endtime!='活动已结束'&&data.activityStatus!=0}}"> | |||||
<text class='txt'>{{data.salePriceStr}}元</text>马上购买</button> | |||||
<button form-type="submit" disabled='{{showbutton}}' class='buy' wx:if="{{data.salePriceStr==0&&data.remainInventory!=0&&endtime!='活动已结束'&&data.activityStatus!=0}}">免费领取</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=='活动已结束'&&data.activityStatus!=0}}">活动已结束</button> | |||||
<button class='buy' disabled='true' wx:if="{{total_micro_second<=0&&data.activityStatus!=0}}">活动已结束</button> | |||||
<button class='buy' disabled='true' wx:if="{{data.activityStatus==0}}">活动未开始</button> | |||||
</view> | |||||
</form> | |||||
</view> | </view> | ||||
<view wx:if="{{data.remainInventory!=0&&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='goback' bindtap='goback'><image src='{{wmhome}}' mode="widthFix"></image></button> | <button class='goback' bindtap='goback'><image src='{{wmhome}}' mode="widthFix"></image></button> | ||||