From 4035a339e300e9915444ae757e8b8f00d6ca0ef4 Mon Sep 17 00:00:00 2001 From: tcubic <123456> Date: Sat, 6 Aug 2022 00:18:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Index.vue | 2 +- src/components/ServiceList.vue | 24 ++++++++++++++++-------- src/page/Home/Home.vue | 3 ++- 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/src/components/Index.vue b/src/components/Index.vue index f2ea753..17de985 100644 --- a/src/components/Index.vue +++ b/src/components/Index.vue @@ -424,7 +424,7 @@ const activityBtn = (item) => { if (item.id == 1) { - if(store.state.userAccount.isAddCustomerBefore == 1 || isGetedServiceLucky.value){ + if(store.state.userAccount.isAddCustomerBefore == 1 ){ // Toast("您已添加过专属服务人员,请参与下方其他活动吧") ishasServicePop() }else{ diff --git a/src/components/ServiceList.vue b/src/components/ServiceList.vue index f29c1f7..05bcb60 100644 --- a/src/components/ServiceList.vue +++ b/src/components/ServiceList.vue @@ -7,7 +7,7 @@ -
+
@@ -67,20 +67,17 @@ const isBingo = ref(false); //是否中过奖 const noPrize = ref(false); //未中奖 +const noFirstAdd = ref(false) + // 刷新添加状态 const updateStaus = () => { + getIsAddService(); }; // 页面挂载前 onBeforeMount(() => { - if (store.state.userAccount.isAddCustomer == 1) { - isadd.value = 1; - } - - if (store.state.userAccount.isAddCustomer == 0) { - isadd.value = 0; - } + let arr = store.state.userAccount.prizeList; @@ -89,12 +86,23 @@ onBeforeMount(() => { console.log("已经抽过》》》》》"); isgot.value = true; isDraw.value = true; + noFirstAdd.value = true } // if(element.amount != 0){ // isBingo.value = true // } }); + + + + if (store.state.userAccount.isAddCustomer == 1) { + isadd.value = 1; + } + + if (store.state.userAccount.isAddCustomer == 0 && !noFirstAdd.value) { + isadd.value = 0; + } }); // 页面挂载后 diff --git a/src/page/Home/Home.vue b/src/page/Home/Home.vue index 2332818..34faf0a 100644 --- a/src/page/Home/Home.vue +++ b/src/page/Home/Home.vue @@ -243,7 +243,8 @@ const getCode = () => { let code = res.data.data; console.log("get code结果3", res); authCode.value = res.data.data; - window.location.href = res.data.data; + // window.location.href = res.data.data; + window.open(res.data.data) }); };