mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-10-02 02:06:38 +08:00
minQuantity minPrice checked via settlement.vue
This commit is contained in:
parent
201f9fa9bf
commit
ae9f2e34e6
@ -408,16 +408,16 @@ export default {
|
||||
let avaliableCouponNum = 0;
|
||||
if (data) {
|
||||
this.drawlist=[];
|
||||
avaliableCouponNum = data.length;
|
||||
this.drawlist = data.data;
|
||||
/*
|
||||
//avaliableCouponNum = data.length;
|
||||
//this.drawlist = data.data;
|
||||
|
||||
for(let itemInCart of this.goldmedal) {
|
||||
let tmpIndex=0;
|
||||
for(let myCoupon of data.data) {
|
||||
valDateFromTime=0;
|
||||
valDateToTime=0;
|
||||
dateChecked=true;
|
||||
|
||||
/*
|
||||
if(myCoupon.fValidFrom) {
|
||||
//Fix ios date issue
|
||||
myCoupon.fValidFrom = myCoupon.fValidFrom.replace(/-/g, '/');
|
||||
@ -435,6 +435,7 @@ export default {
|
||||
if(valDateToTime && curTime > valDateToTime) {
|
||||
dateChecked=false;
|
||||
}
|
||||
*/
|
||||
if(myCoupon.minQuantity && myCoupon.minQuantity>itemInCart.buyCount) {
|
||||
dateChecked=false;
|
||||
}
|
||||
@ -444,16 +445,17 @@ export default {
|
||||
if(myCoupon.udf2!='H5') {
|
||||
dateChecked=false;
|
||||
}
|
||||
//TODO add more checking
|
||||
if(dateChecked && myCoupon.activityId != 10 && myCoupon.status == 0 && (!myCoupon.productCodes || myCoupon.productCodes.indexOf(itemInCart.productCode)>-1)) {
|
||||
data.data.splice(tmpIndex,1);
|
||||
|
||||
//if(dateChecked && myCoupon.activityId != 10 && myCoupon.status == 0 && (!myCoupon.productCodes || myCoupon.productCodes.indexOf(itemInCart.productCode)>-1)) {
|
||||
if(dateChecked) {
|
||||
//data.data.splice(tmpIndex,1);
|
||||
_self.drawlist.push(myCoupon);
|
||||
avaliableCouponNum++;
|
||||
}
|
||||
tmpIndex++;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
if(avaliableCouponNum > 0) {
|
||||
this.curCoupon.couponName = '有 '+avaliableCouponNum+' 张优惠券可以使用';
|
||||
}
|
||||
|
@ -407,7 +407,6 @@ export default {
|
||||
this.checkIsLogin();
|
||||
let returnMessage='';
|
||||
if(data.type==1) {
|
||||
debugger;
|
||||
if(data.data.memberName===undefined){
|
||||
returnMessage = '欢迎回来';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user