perf: 申请试用后 初始化权限列表

This commit is contained in:
rd
2025-07-09 15:27:28 +08:00
parent e48681a4ec
commit eb81cb04c3
4 changed files with 22 additions and 14 deletions

View File

@ -70,8 +70,11 @@ import { trialProduct } from '@/api/all';
import { useRouter } from 'vue-router';
import CustomerServiceModal from '@/components/customer-service-modal.vue';
import { appRoutes } from '@/router/routes';
import { useSidebarStore } from '@/stores/modules/side-bar';
import { useEnterpriseStore } from '@/stores/modules/enterprise';
import { useUserStore } from '@/stores';
import { getUserEnterpriseInfo } from '@/utils/user';
const props = defineProps<{
product: Product;
@ -98,11 +101,14 @@ interface Product {
const visible = ref(false);
const router = useRouter();
const enterpriseStore = useEnterpriseStore();
const userStore = useUserStore();
const sidebarStore = useSidebarStore();
const handleTrial = async (id: any) => {
const { code } = await trialProduct(id);
if (code === 200) {
enterpriseStore.getUserEnterpriseInfo();
getUserEnterpriseInfo();
AMessage.success('试用成功!');
emit('refresh');
}