perf: 登录逻辑调整

This commit is contained in:
rd
2025-09-11 12:04:54 +08:00
parent 44e1ea9a06
commit 7e6e086098
11 changed files with 103 additions and 104 deletions

View File

@ -65,7 +65,7 @@
</section>
<!-- 建立商务联系中 -->
<section class="w-full" v-if="primary_enterprise?.audit_status === 1">
<section class="w-full" v-if="enterpriseStore.enterpriseInfo?.audit_status === 1">
<div class="rounded-16px bg-#fff px-36px pt-80px pb-60px flex flex-col items-center">
<img :src="icon2" width="96" height="96" class="mb-8px" />
<p class="cts !text-18px !lh-26px mb-8px">您的试用申请已提交</p>
@ -87,7 +87,7 @@
</section>
<!-- 试用到期 -->
<section class="w-full" v-if="primary_enterprise?.subscribe_status === 4">
<section class="w-full" v-if="enterpriseStore.enterpriseInfo?.subscribe_status === 4">
<div class="rounded-16px bg-#fff px-36px pt-80px pb-60px flex flex-col items-center">
<img :src="icon1" width="96" height="96" class="mb-8px" />
<p class="cts !text-18px !lh-26px mb-8px">试用已到期</p>
@ -121,6 +121,7 @@ import { postCreateEnterprises } from '@/api/all/login';
import { exactFormatTime } from '@/utils/tools';
import { handleUserHome } from '@/utils/user';
import { useUserStore } from '@/stores';
import { useEnterpriseStore } from '@/stores/modules/enterprise';
import icon1 from './img/icon-info.png';
import icon2 from './img/icon-check.png';
@ -130,6 +131,8 @@ type Status = 0 | 1 | 2 | 3 | 4;
const router = useRouter();
const userStore = useUserStore();
const enterpriseStore = useEnterpriseStore();
const formRef = ref();
const submitting = ref(false);
// const status = ref<Status>(1);
@ -178,12 +181,13 @@ const formRules = {
};
const primary_enterprise = computed(() => userStore.userInfo?.primary_enterprise);
const hasOpenEnterprise = computed(() => userStore.isOpenEnterprise);
const hasOpenEnterprise = computed(() => enterpriseStore.isOpenEnterprise);
const trialingStepsItems = computed(() => {
return [
{
title: '提交申请',
description: exactFormatTime(primary_enterprise.value?.created_at),
description: exactFormatTime(enterpriseStore.enterpriseInfo?.created_at),
},
{
title: '人工审核',
@ -199,7 +203,7 @@ const trialEndStepsItems = computed(() => {
return [
{
title: '提交申请',
description: exactFormatTime(primary_enterprise.value?.created_at),
description: exactFormatTime(enterpriseStore.enterpriseInfo?.created_at),
},
{
title: '人工审核',