fix: 修改路由配置,改成直接导入
This commit is contained in:
7
components.d.ts
vendored
7
components.d.ts
vendored
@@ -11,20 +11,27 @@ declare module 'vue' {
|
||||
ABadge: typeof import('ant-design-vue/es')['Badge']
|
||||
ABreadcrumb: typeof import('ant-design-vue/es')['Breadcrumb']
|
||||
ACheckbox: typeof import('ant-design-vue/es')['Checkbox']
|
||||
ADatePicker: typeof import('ant-design-vue/es')['DatePicker']
|
||||
ADrawer: typeof import('ant-design-vue/es')['Drawer']
|
||||
AImage: typeof import('ant-design-vue/es')['Image']
|
||||
AMenu: typeof import('ant-design-vue/es')['Menu']
|
||||
AMenuItem: typeof import('ant-design-vue/es')['MenuItem']
|
||||
AModal: typeof import('ant-design-vue/es')['Modal']
|
||||
APagination: typeof import('ant-design-vue/es')['Pagination']
|
||||
APopover: typeof import('ant-design-vue/es')['Popover']
|
||||
AProgress: typeof import('ant-design-vue/es')['Progress']
|
||||
ARangePicker: typeof import('ant-design-vue/es')['RangePicker']
|
||||
ASelect: typeof import('ant-design-vue/es')['Select']
|
||||
ASelectOption: typeof import('ant-design-vue/es')['SelectOption']
|
||||
ASlider: typeof import('ant-design-vue/es')['Slider']
|
||||
ASpace: typeof import('ant-design-vue/es')['Space']
|
||||
ASpin: typeof import('ant-design-vue/es')['Spin']
|
||||
ASubMenu: typeof import('ant-design-vue/es')['SubMenu']
|
||||
ASwitch: typeof import('ant-design-vue/es')['Switch']
|
||||
ATable: typeof import('ant-design-vue/es')['Table']
|
||||
ATabPane: typeof import('ant-design-vue/es')['TabPane']
|
||||
ATabs: typeof import('ant-design-vue/es')['Tabs']
|
||||
ATimeRangePicker: typeof import('ant-design-vue/es')['TimeRangePicker']
|
||||
AUpload: typeof import('ant-design-vue/es')['Upload']
|
||||
RouterLink: typeof import('vue-router')['RouterLink']
|
||||
RouterView: typeof import('vue-router')['RouterView']
|
||||
|
||||
@@ -4,15 +4,10 @@ import {
|
||||
RouteRecordRaw,
|
||||
createWebHashHistory,
|
||||
} from "vue-router";
|
||||
import { defineAsyncComponent } from "vue";
|
||||
import store from "@/store";
|
||||
import { useStore } from "vuex";
|
||||
import { Https } from "@/tool/https";
|
||||
import { getCookie, setCookie } from "@/tool/cookie";
|
||||
const _import = (path: string) => () => import(`../views/${path}.vue`);
|
||||
const _import_component = (path: string) => () => import(`../component/${path}.vue`);
|
||||
const _import_custom = (path: string) => () => import(`../views/${path}.vue`);
|
||||
// defineAsyncComponent(import(`../views/${path}`))
|
||||
|
||||
const routes: Array<RouteRecordRaw> = [
|
||||
{
|
||||
path: "/",
|
||||
@@ -25,103 +20,97 @@ const routes: Array<RouteRecordRaw> = [
|
||||
path: "/login",
|
||||
name: "login",
|
||||
meta: { enter: "all" },
|
||||
component: _import("Login"),
|
||||
// component: _import('LoginPage')
|
||||
component: () => import("@/views/Login.vue"),
|
||||
},
|
||||
{
|
||||
path: "/schoolLogin",
|
||||
name: "schoolLogin",
|
||||
meta: { enter: "all" },
|
||||
component: _import("LoginPageSchool"),
|
||||
component: () => import("@/views/Login.vue"), // 使用通用登录组件
|
||||
},
|
||||
{
|
||||
path: "/enterpriseLogin",
|
||||
name: "enterpriseLogin",
|
||||
meta: { enter: "all" },
|
||||
component: _import("LoginPageEnterprise"),
|
||||
component: () => import("@/views/Login.vue"), // 使用通用登录组件
|
||||
},
|
||||
{
|
||||
path: "/test",
|
||||
name: "test1",
|
||||
meta: { enter: "all" },
|
||||
component: _import("test"),
|
||||
component: () => import("@/views/test.vue"),
|
||||
},
|
||||
{
|
||||
path: "/register",
|
||||
name: "register",
|
||||
meta: { enter: "all" },
|
||||
component: _import("Register"),
|
||||
component: () => import("@/views/Register.vue"),
|
||||
},
|
||||
{
|
||||
path: "/upgrade",
|
||||
name: "upgrade",
|
||||
meta: { enter: "all" },
|
||||
component: _import("Upgrade"),
|
||||
component: () => import("@/views/Upgrade.vue"),
|
||||
},
|
||||
{
|
||||
path: "/home",
|
||||
name: "home",
|
||||
meta: { enter: "all" },
|
||||
component: _import("HomeMain"),
|
||||
component: () => import("@/views/HomeMain.vue"),
|
||||
children: [
|
||||
// {
|
||||
// path: "",
|
||||
// name:'HomeChil',
|
||||
// redirect: "/home/homePage"
|
||||
// },
|
||||
{
|
||||
path: "tools",
|
||||
name: "tools",
|
||||
meta: { enter: "all" },
|
||||
component: _import_custom("HomeView/Tools"),
|
||||
component: () => import("@/views/HomeView/Tools.vue"),
|
||||
},
|
||||
{
|
||||
path: "homePage",
|
||||
name: "homePage",
|
||||
meta: { enter: "all" },
|
||||
component: _import_custom("HomeView/HomeView"),
|
||||
component: () => import("@/views/HomeView/HomeView.vue"),
|
||||
},
|
||||
{
|
||||
path: "library",
|
||||
name: "library",
|
||||
meta: { enter: "all" },
|
||||
component: _import_custom("HomeView/library"),
|
||||
},
|
||||
{
|
||||
path: "history",
|
||||
name: "history",
|
||||
meta: { enter: "all" },
|
||||
component: _import_custom("HomeView/history"),
|
||||
component: () => import("@/views/HomeView/library.vue"),
|
||||
},
|
||||
// {
|
||||
// path: "history",
|
||||
// name: "history",
|
||||
// meta: { enter: "all" },
|
||||
// component: () => import("@/views/HomeView/history.vue"),
|
||||
// },
|
||||
{
|
||||
path: "works",
|
||||
name: "works",
|
||||
meta: { enter: "all" },
|
||||
component: _import_custom("HomeView/Works"),
|
||||
component: () => import("@/views/HomeView/Works.vue"),
|
||||
},
|
||||
{
|
||||
path: "events",
|
||||
name: "events",
|
||||
meta: { enter: "all" },
|
||||
component: _import_custom("HomeView/Events"),
|
||||
component: () => import("@/views/HomeView/Events.vue"),
|
||||
},
|
||||
{
|
||||
path: "cloud",
|
||||
name: "cloud",
|
||||
meta: { enter: "all" },
|
||||
component: _import_custom("HomeView/cloudGeneration"),
|
||||
component: () => import("@/views/HomeView/cloudGeneration.vue"),
|
||||
},
|
||||
{
|
||||
path: "eventsDetail",
|
||||
name: "eventsDetail",
|
||||
meta: { enter: "all" },
|
||||
component: _import_component("Events/eventsDetail"),
|
||||
component: () => import("@/component/Events/eventsDetail.vue"),
|
||||
},
|
||||
{
|
||||
path: "account",
|
||||
name: "account",
|
||||
meta: { enter: "all" },
|
||||
component: _import_component("Account/account"),
|
||||
component: () => import("@/component/Account/account.vue"),
|
||||
children: [
|
||||
{
|
||||
path: "",
|
||||
@@ -133,19 +122,20 @@ const routes: Array<RouteRecordRaw> = [
|
||||
path: "frontPage",
|
||||
name: "frontPage",
|
||||
meta: { enter: "all" },
|
||||
component: _import_component("Account/frontPage"),
|
||||
component: () => import("@/component/Account/frontPage.vue"),
|
||||
},
|
||||
{
|
||||
path: "accountMessage",
|
||||
name: "accountMessage",
|
||||
meta: { enter: "all" },
|
||||
component: _import_component("Account/accountMessage"),
|
||||
component: () => import("@/component/Account/accountMessage.vue"),
|
||||
},
|
||||
{
|
||||
path: "accountFollowFans",
|
||||
name: "accountFollowFans",
|
||||
meta: { enter: "all" },
|
||||
component: _import_component("Account/accountFollowFans"),
|
||||
component: () =>
|
||||
import("@/component/Account/accountFollowFans.vue"),
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -153,7 +143,7 @@ const routes: Array<RouteRecordRaw> = [
|
||||
path: "otherUsers",
|
||||
name: "otherUsers",
|
||||
meta: { enter: "all" },
|
||||
component: _import_component("Account/otherUsers"),
|
||||
component: () => import("@/component/Account/otherUsers.vue"),
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -161,140 +151,140 @@ const routes: Array<RouteRecordRaw> = [
|
||||
path: "/Square",
|
||||
name: "HomeRecommend",
|
||||
meta: { enter: "all" },
|
||||
component: _import("HomeRecommend"),
|
||||
component: () => import("@/views/HomeRecommend.vue"),
|
||||
},
|
||||
{
|
||||
path: "/administrator",
|
||||
name: "administrator",
|
||||
meta: { enter: 3 },
|
||||
component: _import("Administrator"),
|
||||
component: () => import("@/views/Administrator.vue"),
|
||||
children: [
|
||||
{
|
||||
path: "allUser",
|
||||
name: "allUser",
|
||||
meta: { enter: 3 },
|
||||
component: _import_component("Administrator/allUser"),
|
||||
component: () => import("@/component/Administrator/allUser.vue"),
|
||||
},
|
||||
{
|
||||
path: "coupons",
|
||||
name: "coupons",
|
||||
meta: { enter: 3 },
|
||||
component: _import_component("Administrator/coupons/index"),
|
||||
component: () => import("@/component/Administrator/coupons/index.vue"),
|
||||
},
|
||||
{
|
||||
path: "testClickData",
|
||||
name: "testClickData",
|
||||
meta: { enter: 3 },
|
||||
component: _import_component("Administrator/TestClickData"),
|
||||
component: () => import("@/component/Administrator/TestClickData.vue"),
|
||||
},
|
||||
{
|
||||
path: "trialApproval",
|
||||
name: "trialApproval",
|
||||
meta: { enter: 3 },
|
||||
component: _import_component("Administrator/trialApproval"),
|
||||
component: () => import("@/component/Administrator/trialApproval.vue"),
|
||||
},
|
||||
{
|
||||
path: "questionnaire",
|
||||
name: "questionnaire",
|
||||
meta: { enter: 3 },
|
||||
component: _import_component("Administrator/questionnaire"),
|
||||
component: () => import("@/component/Administrator/questionnaire.vue"),
|
||||
},
|
||||
{
|
||||
path: "recentActiveChart",
|
||||
name: "recentActiveChart",
|
||||
meta: { enter: 3 },
|
||||
component: _import_component("Administrator/recentActiveChart"),
|
||||
component: () =>
|
||||
import("@/component/Administrator/recentActiveChart.vue"),
|
||||
},
|
||||
{
|
||||
path: "recentActiveUser",
|
||||
name: "recentActiveUser",
|
||||
meta: { enter: 3 },
|
||||
component: _import_component("Administrator/recentActiveUser"),
|
||||
component: () =>
|
||||
import("@/component/Administrator/recentActiveUser.vue"),
|
||||
},
|
||||
{
|
||||
path: "recentActiveUserChart",
|
||||
name: "recentActiveUserChart",
|
||||
meta: { enter: 3 },
|
||||
component: _import_component("Administrator/recentActiveUserChart"),
|
||||
component: () =>
|
||||
import("@/component/Administrator/recentActiveUserChart.vue"),
|
||||
},
|
||||
{
|
||||
path: "recentNewUser",
|
||||
name: "recentNewUser",
|
||||
meta: { enter: 3 },
|
||||
component: _import_component("Administrator/recentNewUser"),
|
||||
component: () => import("@/component/Administrator/recentNewUser.vue"),
|
||||
},
|
||||
{
|
||||
path: "recentNewUserChart",
|
||||
name: "recentNewUserChart",
|
||||
meta: { enter: 3 },
|
||||
component: _import_component("Administrator/recentNewUserChart"),
|
||||
component: () =>
|
||||
import("@/component/Administrator/recentNewUserChart.vue"),
|
||||
},
|
||||
{
|
||||
path: "trialUserCountry",
|
||||
name: "trialUserCountry",
|
||||
meta: { enter: 3 },
|
||||
component: _import_component("Administrator/trialUserCountry"),
|
||||
component: () =>
|
||||
import("@/component/Administrator/trialUserCountry.vue"),
|
||||
},
|
||||
{
|
||||
path: "trialUserConversionRateChart",
|
||||
name: "trialUserConversionRateChart",
|
||||
meta: { enter: 3 },
|
||||
component: _import_component(
|
||||
"Administrator/trialUserConversionRateChart"
|
||||
),
|
||||
component: () =>
|
||||
import("@/component/Administrator/trialUserConversionRateChart.vue"),
|
||||
},
|
||||
{
|
||||
path: "trialAllUser",
|
||||
name: "trialAllUser",
|
||||
meta: { enter: 3 },
|
||||
component: _import_component("Administrator/trialAllUser"),
|
||||
component: () => import("@/component/Administrator/trialAllUser.vue"),
|
||||
},
|
||||
{
|
||||
path: "affiliateAudit",
|
||||
name: "affiliateAudit",
|
||||
meta: { enter: 3 },
|
||||
component: _import_component(
|
||||
"Administrator/affiliate/affiliateAudit"
|
||||
),
|
||||
component: () =>
|
||||
import("@/component/Administrator/affiliate/affiliateAudit.vue"),
|
||||
},
|
||||
{
|
||||
path: "TransactionTable",
|
||||
name: "TransactionTable",
|
||||
meta: { enter: 3 },
|
||||
component: _import_component(
|
||||
"Administrator/Transaction/TransactionTable"
|
||||
),
|
||||
component: () =>
|
||||
import("@/component/Administrator/Transaction/TransactionTable.vue"),
|
||||
},
|
||||
{
|
||||
path: "organization",
|
||||
name: "organization",
|
||||
meta: { enter: 3 },
|
||||
component: _import_component(
|
||||
"Administrator/organization/organization"
|
||||
),
|
||||
component: () =>
|
||||
import("@/component/Administrator/organization/organization.vue"),
|
||||
},
|
||||
//企业版教育管理员页面
|
||||
{
|
||||
path: "allUserSE",
|
||||
name: "allUserSE",
|
||||
meta: { enter: 3 },
|
||||
component: _import_component("Administrator/SE/allUser/index"),
|
||||
component: () =>
|
||||
import("@/component/Administrator/SE/allUser/index.vue"),
|
||||
},
|
||||
{
|
||||
path: "testClickDataSE",
|
||||
name: "testClickDataSE",
|
||||
meta: { enter: 3 },
|
||||
component: _import_component(
|
||||
"Administrator/SE/designDetailList/index"
|
||||
),
|
||||
component: () =>
|
||||
import("@/component/Administrator/SE/designDetailList/index.vue"),
|
||||
},
|
||||
{
|
||||
path: "generateFrequencySE",
|
||||
name: "generateFrequencySE",
|
||||
meta: { enter: 3 },
|
||||
component: _import_component(
|
||||
"Administrator/SE/getGenerateFrequency/index"
|
||||
),
|
||||
component: () =>
|
||||
import("@/component/Administrator/SE/getGenerateFrequency/index.vue"),
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -304,7 +294,7 @@ const routes: Array<RouteRecordRaw> = [
|
||||
meta: {
|
||||
enter: "all",
|
||||
},
|
||||
component: _import("paySucceed"),
|
||||
component: () => import("@/views/paySucceed.vue"),
|
||||
},
|
||||
{
|
||||
path: "/affiliate",
|
||||
@@ -312,7 +302,7 @@ const routes: Array<RouteRecordRaw> = [
|
||||
meta: {
|
||||
enter: 2,
|
||||
},
|
||||
component: _import("affiliate/affiliatePage"),
|
||||
component: () => import("@/views/affiliate/affiliatePage.vue"),
|
||||
children: [
|
||||
{
|
||||
path: "/affiliate",
|
||||
@@ -320,7 +310,7 @@ const routes: Array<RouteRecordRaw> = [
|
||||
meta: {
|
||||
enter: 2,
|
||||
},
|
||||
component: _import_component("affiliate/home"),
|
||||
component: () => import("@/component/affiliate/home.vue"),
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -330,7 +320,7 @@ const routes: Array<RouteRecordRaw> = [
|
||||
meta: {
|
||||
enter: "all",
|
||||
},
|
||||
component: _import("affiliate/affiliateRegister"),
|
||||
component: () => import("@/views/affiliate/affiliateRegister.vue"),
|
||||
},
|
||||
{
|
||||
path: "/setIdentification",
|
||||
@@ -338,7 +328,7 @@ const routes: Array<RouteRecordRaw> = [
|
||||
meta: {
|
||||
enter: "all",
|
||||
},
|
||||
component: _import("setIdentification"),
|
||||
component: () => import("@/views/setIdentification.vue"),
|
||||
},
|
||||
{
|
||||
path: "/feedbackSurvey",
|
||||
@@ -346,7 +336,7 @@ const routes: Array<RouteRecordRaw> = [
|
||||
meta: {
|
||||
enter: "all",
|
||||
},
|
||||
component: _import("feedbackSurvey"),
|
||||
component: () => import("@/views/feedbackSurvey.vue"),
|
||||
},
|
||||
{
|
||||
path: "/feedbackSurveyCN",
|
||||
@@ -354,7 +344,7 @@ const routes: Array<RouteRecordRaw> = [
|
||||
meta: {
|
||||
enter: "all",
|
||||
},
|
||||
component: _import("feedbackSurveyCN"),
|
||||
component: () => import("@/views/feedbackSurveyCN.vue"),
|
||||
},
|
||||
{
|
||||
path: "/404",
|
||||
@@ -362,7 +352,7 @@ const routes: Array<RouteRecordRaw> = [
|
||||
meta: {
|
||||
enter: "all",
|
||||
},
|
||||
component: _import("404"),
|
||||
component: () => import("@/views/404.vue"),
|
||||
},
|
||||
{
|
||||
path: "/:catchAll(.*)",
|
||||
|
||||
Reference in New Issue
Block a user