feat: 申请试用权限调整
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<Layout class="flex justify-center items-center trial-wrap">
|
||||
<Layout.Header class="header-wrap">
|
||||
<Layout.Header class="header-wrap cursor-pointer" @click="onLogoClick">
|
||||
<div class="h-full px-24px">
|
||||
<div class="w-full h-full relative flex justify-between">
|
||||
<div class="flex items-center">
|
||||
@ -65,7 +65,7 @@
|
||||
</section>
|
||||
|
||||
<!-- 建立商务联系中 -->
|
||||
<section class="w-full" v-if="primary_enterprise.audit_status === 1">
|
||||
<section class="w-full" v-if="primary_enterprise?.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="primary_enterprise?.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>
|
||||
@ -113,8 +113,10 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { Layout, Form, Button, FormItem, Input, Steps } from 'ant-design-vue';
|
||||
import { Button, Form, FormItem, Input, Layout, Steps } from 'ant-design-vue';
|
||||
import RightSide from '@/layouts/components/navbar/components/right-side/index.vue';
|
||||
|
||||
import { useRouter } from 'vue-router';
|
||||
import { postCreateEnterprises } from '@/api/all/login';
|
||||
import { exactFormatTime } from '@/utils/tools';
|
||||
import { handleUserHome } from '@/utils/user';
|
||||
@ -126,6 +128,7 @@ import icon2 from './img/icon-check.png';
|
||||
// 0-未开通,1-已开通,2-试用中,3-已到期,4-试用结束
|
||||
type Status = 0 | 1 | 2 | 3 | 4;
|
||||
|
||||
const router = useRouter();
|
||||
const userStore = useUserStore();
|
||||
const formRef = ref();
|
||||
const submitting = ref(false);
|
||||
@ -175,7 +178,7 @@ const formRules = {
|
||||
};
|
||||
|
||||
const primary_enterprise = computed(() => userStore.userInfo?.primary_enterprise);
|
||||
|
||||
const hasOpenEnterprise = computed(() => userStore.isOpenEnterprise);
|
||||
const trialingStepsItems = computed(() => {
|
||||
return [
|
||||
{
|
||||
@ -209,6 +212,16 @@ const trialEndStepsItems = computed(() => {
|
||||
];
|
||||
});
|
||||
|
||||
const onLogoClick = () => {
|
||||
if (hasOpenEnterprise.value) {
|
||||
handleUserHome();
|
||||
} else {
|
||||
router.push({
|
||||
name: 'Trial',
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
const handleSubmit = async () => {
|
||||
submitting.value = true;
|
||||
formRef.value
|
||||
|
||||
Reference in New Issue
Block a user