mirror of
https://gitee.com/ccnetcore/Yi
synced 2026-04-29 12:43:25 +08:00
feat: 项目加载优化
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
import type { GoodsItem } from '@/api/pay';
|
||||
import { ElMessage } from 'element-plus';
|
||||
import { computed, onBeforeUnmount, onMounted, ref, watch } from 'vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { createOrder, getOrderStatus } from '@/api';
|
||||
import { getGoodsList, GoodsCategoryType } from '@/api/pay';
|
||||
import ProductPage from '@/pages/products/index.vue';
|
||||
@@ -11,6 +12,7 @@ import NewbieGuide from './NewbieGuide.vue';
|
||||
import PackageTab from './PackageTab.vue';
|
||||
|
||||
const emit = defineEmits(['close']);
|
||||
const router = useRouter();
|
||||
|
||||
// 商品数据类型定义
|
||||
interface PackageItem {
|
||||
@@ -321,8 +323,10 @@ function onClose() {
|
||||
|
||||
function goToActivation() {
|
||||
close();
|
||||
// 使用 window.location 进行跳转,避免 router 注入问题
|
||||
window.location.href = '/console/activation';
|
||||
// 使用 router 进行跳转,避免完整页面刷新
|
||||
setTimeout(() => {
|
||||
router.push('/console/activation');
|
||||
}, 300); // 等待对话框关闭动画完成
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user