diff --git a/src/views/components/login/index.vue b/src/views/components/login/index.vue index 9233287..c213797 100644 --- a/src/views/components/login/index.vue +++ b/src/views/components/login/index.vue @@ -101,7 +101,11 @@ v-for="(account, index) in accounts" :key="index" class="account-item" - :class="{ selected: selectedAccountIndex === index }" + :class="{ + selected: selectedAccountIndex === index, + 'cursor-no-drop': account.status === 0, + 'cursor-pointer': account.status !== 0, + }" @click="selectAccount(account, index)" > @@ -202,6 +206,10 @@ const disabledSubmitBtn = computed(() => { }); const selectAccount = (account: any, index: any) => { + if (account.status === 0) { + return; + } + enterpriseStore.setEnterpriseInfo(account); selectedAccountIndex.value = index; }; @@ -264,11 +272,12 @@ const handleVerificationSubmit = async () => { const getProfileInfo = async () => { const { code, data } = await fetchProfileInfo(); if (code === 200) { - enterpriseStore.setEnterpriseInfo(data); - userStore.setUserInfo(data); let enterprises = data['enterprises']; mobileNumber.value = data['mobile']; accounts.value = enterprises; + + enterpriseStore.setEnterpriseInfo(data); + userStore.setUserInfo(data); if (enterprises.length > 0) { if (enterprises.length === 1) { await enterpriseStore.updateEnterpriseInfo();