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