main
王文龙 2023-11-27 14:19:05 +08:00
parent 597b0922d7
commit 627c8ca487
2 changed files with 20 additions and 12 deletions

View File

@ -6,4 +6,4 @@ VITE_USE_COMPRESS=false
VITE_USE_REPORT=false
VITE_BASE_API_URL='http://139.224.10.234:8088'
VITE_BASE_API_URL='http://192.168.2.107:8088'

View File

@ -31,7 +31,7 @@
</div>
<div
class="flex items-center justify-between overflow-hidden rounded-md bg-beijing pr-16px pl-8px h-184px"
:class="item.nums <= 0 && 'grayscale'"
:class="(item.nums <= 0 || item.verifState) && 'grayscale'"
>
<img :src="item.giftImage" alt="" class="h-184px mt-[-6px] object-contain" />
<div class="flex items-center justify-between flex-1 pl-2">
@ -41,16 +41,16 @@
<p class="text-20px leading-36px">剩余{{ item.nums }}</p>
</div>
<div
v-if="item.nums > 0"
v-if="item.nums > 0 && !item.verifState"
@click="handleClick(item)"
class="bg-white hover:bg-light-600 overflow-hidden cursor-pointer text-[#090909] text-26px rounded-26px h-52px w-140px leading-46px text-center"
>
我要报名
<!-- 去核销 -->
{{ !item.state ? '我要报名' : '去核销' }}
</div>
</div>
<div>
<img v-if="item.nums <= 0" src="@/assets/imgs/sale/lingwan.png" alt="" class="w-166px object-contain mr-[-18px]" />
<img v-if="item.nums <= 0 && !item.verifState" src="@/assets/imgs/sale/lingwan.png" alt="" class="w-166px object-contain mr-[-18px]" />
<img v-if="item.verifState" src="@/assets/imgs/sale/hexiao.png" alt="" class="w-166px object-contain mr-[-18px]" />
</div>
</div>
</div>
@ -105,12 +105,13 @@
>
<div class="text-36px leading bg-text"> {{ isSuccess ? '核销成功' : '报名成功' }} </div>
<div class="text-60px leading mt-[-4px] bg-text"> {{ selItem.giftName }} </div>
<div class="text-30px leading bg-text"> {{ isSuccess ? '' : selItem.activityRules }} </div>
<!-- <div class="text-30px leading bg-text"> {{ isSuccess ? '' : selItem.activityRules }} </div> -->
<div class="text-30px leading bg-text"> 礼品发放以线下库存为准 先到先得 </div>
</div>
<div
v-if="iptShow"
@click.stop
class="absolute box-border right-[84px] top-[380px] h-76px w-415px rounded-10px bg-#FADDC0 overflow-hidden"
class="absolute box-border right-[80px] top-[380px] h-76px w-415px rounded-10px bg-#FADDC0 overflow-hidden"
>
<nut-input
ref="iptRef"
@ -196,10 +197,14 @@
const handleClick = async (item: any) => {
if (!token.value) return (location.href = handleWxRedict());
// 001Mol1000Yj4R1raU100kCKRM0Mol1G
if (selId.value) {
console.log('🚀 ~ file: index.vue:197 ~ item:', item);
// state truefalse
if (item.state) {
selId.value = item.id;
selItem.value = item;
show.value = true;
isSuccess.value = false;
iptShow.value = true;
return;
}
const { result, code } = await queryCouponLog({ id: item.id, openId: userInfo.value.openid });
@ -289,9 +294,9 @@
userInfo.value = JSON.parse(user);
}
}
getCoupon();
};
getCoupon();
init();
onMounted(async () => {
@ -302,8 +307,10 @@
if (val) {
checkCode.value = '';
} else {
getCoupon();
getCoupon()
setTimeout(() => {
selId.value && (iptShow.value = true);
},200)
}
});
</script>
@ -346,6 +353,7 @@
}
.nut-input-box input {
color: #000;
padding-left: 14px;
}
}
</style>