const data = {
day: {
is_get: "1", // 是否领取过 (1:是 0:否)
is_has: "1", // 是否中奖 (1:是 0:否)
hit_type: "1", // 命中类型(1:每日排行 2:累计排行)
award_type: "1", // 奖品类型(1:优惠券 2:实物)
},
total: {
is_get: "1", // 是否领取过 (1:是 0:否)
is_has: "1", // 是否中奖 (1:是 0:否)
hit_type: "1", // 命中类型(1:每日排行 2:累计排行)
award_type: "1", // 奖品类型(1:优惠券 2:实物)
}
}
const { day, total } = data
if(day && JSON.stringify(day) !== JSON.stringify('{}')){
if(String(day.is_has) === '1') {
if(String(day.is_get) === '1') {
console.log('弹出每日已领取过弹窗');
}else {
if(Sting(day.award_type) === "1") {
console.log('弹出优惠券弹窗');
}else {
console.log('弹出每日实物奖品弹窗')
}
}
} else {
console.log('弹出每日未中奖弹窗');
}
}
if(total && JSON.stringify(total) !== JSON.stringify('{}')){
if(String(total.is_has) === '1') {
if(String(total.is_get) === '1') {
console.log('弹出总榜已领取过弹窗');
}else {
console.log('弹出总榜实物奖品弹窗')
}
} else {
console.log('弹出总榜弹窗');
}
}
console