feat: layout调整

This commit is contained in:
renxiaodong
2025-06-23 23:59:08 -04:00
parent 59dac3bb13
commit 74567f17c2
14 changed files with 167 additions and 52 deletions

View File

@ -54,12 +54,7 @@
>
联系客服
</a-button>
<a-popconfirm
focusLock
title="试用产品"
content="确定试用该产品吗?"
@ok="handleTrial(props.product.id)"
>
<a-popconfirm focusLock title="试用产品" content="确定试用该产品吗?" @ok="handleTrial(props.product.id)">
<a-button v-if="props.product.status === Status.Disable" class="outline-button" type="outline">
免费试用7天
</a-button>
@ -74,14 +69,14 @@ import { now } from '@vueuse/core';
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';
const props = defineProps<{
product: Product;
}>();
const emit = defineEmits(['refresh']);
const visible = ref(false);
const router = useRouter();
const sidebarStore = useSidebarStore();
enum Status {
Disable = 0, // 禁用
@ -101,6 +96,9 @@ interface Product {
expired_at?: number;
}
const visible = ref(false);
const router = useRouter();
const handleTrial = async (id: any) => {
await trialProduct(id);
AMessage.success('试用成功!');
@ -108,7 +106,11 @@ const handleTrial = async (id: any) => {
};
const gotoModule = (menuId: number) => {
router.push({ name: 'dataEngine' });
const _target = appRoutes.find((v) => v.meta.id === menuId);
if (_target) {
console.log({ _target });
router.push({ name: _target.name });
}
};
</script>
<style scoped lang="less">