admin-import

This commit is contained in:
xiaomlove
2021-04-12 20:31:02 +08:00
parent be9b8634c4
commit 3f13ec875f
131 changed files with 125950 additions and 10676 deletions
+92 -20
View File
@@ -1,23 +1,95 @@
import { createWebHistory, createRouter } from "vue-router";
import Home from "../pages/index";
import AgentAllow from "../pages/agent-allow";
const routes = [
{
path: "/",
name: "Home",
component: Home,
},
{
path: "/agent-allow",
name: "Agent-allow",
component: AgentAllow,
},
];
import { createRouter, createWebHashHistory } from 'vue-router'
const router = createRouter({
history: createWebHistory(),
routes,
});
history: createWebHashHistory(), // hash模式:createWebHashHistoryhistory模式:createWebHistory
routes: [
{
path: '/',
redirect: '/introduce'
},
{
path: '/introduce',
name: 'introduce',
component: () => import(/* webpackChunkName: "introduce" */ '../views/Introduce.vue')
},
{
path: '/dashboard',
name: 'dashboard',
component: () => import(/* webpackChunkName: "dashboard" */ '../views/Index.vue')
},
{
path: '/login',
name: 'login',
component: () => import(/* webpackChunkName: "login" */ '../views/Login.vue')
},
{
path: '/add',
name: 'add',
component: () => import(/* webpackChunkName: "add" */ '../views/AddGood.vue')
},
{
path: '/swiper',
name: 'swiper',
component: () => import(/* webpackChunkName: "swiper" */ '../views/Swiper.vue')
},
{
path: '/hot',
name: 'hot',
component: () => import(/* webpackChunkName: "hot" */ '../views/IndexConfig.vue')
},
{
path: '/new',
name: 'new',
component: () => import(/* webpackChunkName: "new" */ '../views/IndexConfig.vue')
},
{
path: '/recommend',
name: 'recommend',
component: () => import(/* webpackChunkName: "recommend" */ '../views/IndexConfig.vue')
},
{
path: '/category',
name: 'category',
component: () => import(/* webpackChunkName: "category" */ '../views/Category.vue'),
children: [
{
path: '/category/level2',
name: 'level2',
component: () => import(/* webpackChunkName: "level2" */ '../views/Category.vue'),
},
{
path: '/category/level3',
name: 'level3',
component: () => import(/* webpackChunkName: "level3" */ '../views/Category.vue'),
}
]
},
{
path: '/good',
name: 'good',
component: () => import(/* webpackChunkName: "new" */ '../views/Good.vue')
},
{
path: '/guest',
name: 'guest',
component: () => import(/* webpackChunkName: "guest" */ '../views/Guest.vue')
},
{
path: '/order',
name: 'order',
component: () => import(/* webpackChunkName: "order" */ '../views/Order.vue')
},
{
path: '/order_detail',
name: 'order_detail',
component: () => import(/* webpackChunkName: "order_detail" */ '../views/OrderDetail.vue')
},
{
path: '/account',
name: 'account',
component: () => import(/* webpackChunkName: "account" */ '../views/Account.vue')
}
]
})
export default router;
export default router