This commit is contained in:
tcubic
2022-08-05 23:19:03 +08:00
parent e391123b4e
commit 2561a377bd

View File

@@ -262,8 +262,13 @@ const activityList = reactive([
}, },
]); ]);
// const hasServicePrize = ref(false)
// 页面挂载前 // 页面挂载前
onBeforeMount(() => { onBeforeMount(() => {
// 判断参与活动红包是否领取 // 判断参与活动红包是否领取
let arr = store.state.userAccount.prizeList; let arr = store.state.userAccount.prizeList;
arr.forEach((element) => { arr.forEach((element) => {
@@ -276,6 +281,7 @@ onBeforeMount(() => {
// 判断红包记录里面是否存在企微红包 // 判断红包记录里面是否存在企微红包
if (element.type == 2) { if (element.type == 2) {
isGetedServiceLucky.value = true; isGetedServiceLucky.value = true;
} }
}); });
}); });
@@ -359,10 +365,7 @@ onMounted(() => {
addPoint(); addPoint();
// 如果添加了企微,直接调抽奖结果,中奖了就弹窗,未中奖的话不弹窗 // 如果添加了企微,直接调抽奖结果,中奖了就弹窗,未中奖的话不弹窗
if (store.state.userAccount.isAddCustomerBefore == 0 && !isGetedServiceLucky.value) {
// 您已添加过专属服务人员,请参与其他活动
if (store.state.userAccount.isAddCustomerBefore == 0) {
if ( if (
store.state.userAccount.isAddCustomer == 1 && store.state.userAccount.isAddCustomer == 1 &&
!isGetedServiceLucky.value !isGetedServiceLucky.value
@@ -406,8 +409,8 @@ const activityBtn = (item) => {
if (item.id == 1) { if (item.id == 1) {
if(store.state.userAccount.isAddCustomerBefore == 1){ if(store.state.userAccount.isAddCustomerBefore == 1 || !isGetedServiceLucky.value){
Toast("您已添加过专属服务人员,请参与其他活动") Toast("您已添加过专属服务人员,请参与下方其他活动")
}else{ }else{
showServicePop.value = true; showServicePop.value = true;
} }