perf: 申请试用后 初始化权限列表
This commit is contained in:
@ -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');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user