You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

237 lines
7.1 KiB
JavaScript

6 years ago
import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/pages/Login';
import ExternalContact from '@/pages/ExternalContact';
import Home from '@/pages/Home';
import AccountManager from '@/pages/user/AccountManager';
import AccountManagerAdd from '@/pages/user/AccountManagerAdd';
import AccountManagementModify from '@/pages/user/AccountManagementModify';
6 years ago
import AccountManagerUpload from '@/pages/user/AccountManagerUpload';
import RoleManager from '@/pages/user/RoleManager';
import IncreaseManager from '@/pages/shop/IncreaseManager';
import CustomerView from "@/pages/home/CustomerView";
import TableAnalysis from "@/pages/TableAnalysis";
import AddCustomerTable from "@/pages/analysis/AddCustomerTable";
import ApplyCustomerTable from "@/pages/analysis/ApplyCustomerTable";
import ZeroExtendDetail from "@/pages/home/ZeroExtendDetail";
import CustomerDetail from "@/pages/home/CustomerDetail";
6 years ago
import IncreaseData from '@/pages/shop/IncreaseData';
6 years ago
import IncreaseDataCompany from '@/pages/shop/IncreaseDataCompany';
6 years ago
import IncreaseDataStaff from '@/pages/shop/IncreaseDataStaff';
import IncreaseDataStore from '@/pages/shop/IncreaseDataStore';
import IncreaseStaffManager from '@/pages/shop/IncreaseStaffManager';
import IncreaseStaffManagerBatchAdd from '@/pages/shop/IncreaseStaffManagerBatchAdd';
6 years ago
import IncreaseStoreManager from '@/pages/shop/IncreaseStoreManager';
6 years ago
import IncreaseConfigure from '@/pages/shop/IncreaseConfigure';
import IncreaseGroupSendConfigure from '@/pages/shop/IncreaseGroupSendConfigure';
import IncreaseWelcomeConfigure from '@/pages/shop/IncreaseWelcomeConfigure';
import IncreaseGroupSendConfigureAdd from '@/pages/shop/IncreaseGroupSendConfigureAdd';
import NoPermission from '@/pages/shop/NoPermission';
import CustomerViewHome from '@/pages/home/CustomerViewHome';
import ActivityAnalysis from "@/pages/activity/ActivityAnalysis";
import ActivityManager from "@/pages/activity/ActivityManager";
import ActivityPlan from "@/pages/activity/ActivityPlan";
6 years ago
Vue.use(Router);
const router = new Router({
mode: 'history',
6 years ago
base: '/youke',
6 years ago
routes: [
{
path: '/',
redirect: '/login'
},
{
path: '/login',
name: 'login',
component: Login
},
{
path: '/external/contact',
name: 'externalContact',
component: ExternalContact
},
{
path: '/home',
name: 'Home',
component: Home,
children: [
{
path: '/activity/manager',
name: 'ActivityManager',
component: ActivityManager
},
{
path: '/activity/plan',
name: 'ActivityPlan',
component: ActivityPlan
},
{
path: '/activity/analysis',
name: 'ActivityAnalysis',
component: ActivityAnalysis
},
6 years ago
{
path: '/account/manager',
name: 'AccountManager',
component: AccountManager
},
{
path: '/account/management/add',
name: 'AccountManagerAdd',
component: AccountManagerAdd
},
{
path: '/account/management/modify',
name: 'AccountManagementModify',
component: AccountManagementModify
},
{
path: '/account/upload',
6 years ago
name: 'AccountManagerUpload',
component: AccountManagerUpload
},
{
path: '/role/manager',
name: 'RoleManager',
component: RoleManager
},
{
path: '/shop/increase/manager',
name: 'IncreaseManager',
component: IncreaseManager,
children: [
{
path: '/',
redirect: '/shop/increase/manager/store'
},
{
path: '/shop/increase/manager/store',
name: 'IncreaseStoreManager',
component: IncreaseStoreManager
},
{
path: '/shop/increase/manager/staff',
name: 'IncreaseStaffManager',
component: IncreaseStaffManager
},
{
path: '/shop/increase/manager/staff/batch/add',
name: 'IncreaseStaffManagerBatchAdd',
component: IncreaseStaffManagerBatchAdd
6 years ago
}
]
},
{
path: '/table/analysis',
name: 'TableAnalysis',
component: TableAnalysis,
children: [
{
path: '/',
redirect: '/table/analysis/customer/add'
},
{
path: '/table/analysis/customer/add',
name: 'AddCustomerTable',
component: AddCustomerTable
},
{
path: '/table/analysis/customer/apply',
name: 'ApplyCustomerTable',
component: ApplyCustomerTable
}
]
},
6 years ago
{
path: '/shop/increase/configure',
name: 'IncreaseConfigure',
component: IncreaseConfigure,
children: [
{
path: '/',
redirect: '/shop/increase/configure/welcome'
},
{
path: '/shop/increase/configure/group',
name: 'IncreaseGroupSendConfigure',
component: IncreaseGroupSendConfigure
},
{
path: '/shop/increase/configure/welcome',
name: 'IncreaseWelcomeConfigure',
component: IncreaseWelcomeConfigure
},
{
path: '/shop/increase/configure/group/add',
name: 'IncreaseGroupSendConfigureAdd',
component: IncreaseGroupSendConfigureAdd
},
]
},
6 years ago
{
path: '/shop/increase/data',
name: 'IncreaseData',
component: IncreaseData,
children: [
{
path: '/',
redirect: '/shop/increase/data/region'
},
{
path: '/shop/increase/data/region',
6 years ago
name: 'IncreaseDataCompany',
component: IncreaseDataCompany
6 years ago
},
{
path: '/shop/increase/data/store',
name: 'IncreaseDataStore',
component: IncreaseDataStore
},
{
path: '/shop/increase/data/staff',
name: 'IncreaseDataStaff',
component: IncreaseDataStaff
},
]
},
{
path: '/customer/view',
name: 'CustomerView',
component: CustomerView,
},
{
path: '/zero/extend/detail',
name: 'ZeroExtendDetail',
component: ZeroExtendDetail
},
6 years ago
{
path: '/customer/data/detail',
name: 'CustomerDetail',
component: CustomerDetail,
},
{
path: '/no/permission',
name: 'NoPermission',
component: NoPermission,
},
6 years ago
]
},
{
path: '/customer/view/home',
name: 'CustomerViewHome',
component: CustomerViewHome,
},
6 years ago
]
});
/*
* 跳转前的处理事件
* */
router.beforeEach(function (to, from, next) {
next();
});
export default router