|
@@ -1,5 +1,7 @@ |
|
|
import Vue from 'vue'; |
|
|
import Vue from 'vue'; |
|
|
|
|
|
import { FastForwardIcon } from 'vue-feather-icons'; |
|
|
import VueRouter from 'vue-router'; |
|
|
import VueRouter from 'vue-router'; |
|
|
|
|
|
import { apost } from '../utils/api/login' |
|
|
|
|
|
|
|
|
Vue.use(VueRouter); |
|
|
Vue.use(VueRouter); |
|
|
|
|
|
|
|
@@ -17,168 +19,168 @@ const routes = [ |
|
|
{ |
|
|
{ |
|
|
path: '/Dashboard', |
|
|
path: '/Dashboard', |
|
|
name: 'side-menu-dashboard', |
|
|
name: 'side-menu-dashboard', |
|
|
meta: {title: '会员中心'}, |
|
|
|
|
|
|
|
|
meta: { title: '会员中心' }, |
|
|
component: () => import('@/views/Dashboard') |
|
|
component: () => import('@/views/Dashboard') |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
path: 'inbox', |
|
|
path: 'inbox', |
|
|
name: 'side-menu-inbox', |
|
|
name: 'side-menu-inbox', |
|
|
meta: {title: '管理中心'}, |
|
|
|
|
|
|
|
|
meta: { title: '管理中心' }, |
|
|
component: () => import('@/views/Inbox') |
|
|
component: () => import('@/views/Inbox') |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
path: 'file-manager', |
|
|
path: 'file-manager', |
|
|
name: 'side-menu-file-manager', |
|
|
name: 'side-menu-file-manager', |
|
|
meta: {title: '文件管理'}, |
|
|
|
|
|
|
|
|
meta: { title: '文件管理' }, |
|
|
component: () => import('@/views/FileManager') |
|
|
component: () => import('@/views/FileManager') |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
path: 'point-of-sale', |
|
|
path: 'point-of-sale', |
|
|
name: 'side-menu-point-of-sale', |
|
|
name: 'side-menu-point-of-sale', |
|
|
meta: {title: '管理中心'}, |
|
|
|
|
|
|
|
|
meta: { title: '管理中心' }, |
|
|
component: () => import('@/views/PointOfSale') |
|
|
component: () => import('@/views/PointOfSale') |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
path: 'chat', |
|
|
path: 'chat', |
|
|
name: 'side-menu-chat', |
|
|
name: 'side-menu-chat', |
|
|
meta: {title: '管理中心'}, |
|
|
|
|
|
|
|
|
meta: { title: '管理中心' }, |
|
|
component: () => import('@/views/Chat') |
|
|
component: () => import('@/views/Chat') |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
path: 'post', |
|
|
path: 'post', |
|
|
name: 'side-menu-post', |
|
|
name: 'side-menu-post', |
|
|
meta: {title: '管理中心'}, |
|
|
|
|
|
|
|
|
meta: { title: '管理中心' }, |
|
|
component: () => import('@/views/Post') |
|
|
component: () => import('@/views/Post') |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
path: 'crud-data-list', |
|
|
path: 'crud-data-list', |
|
|
name: 'side-menu-crud-data-list', |
|
|
name: 'side-menu-crud-data-list', |
|
|
meta: {title: '管理中心'}, |
|
|
|
|
|
|
|
|
meta: { title: '管理中心' }, |
|
|
component: () => import('@/views/CrudDataList') |
|
|
component: () => import('@/views/CrudDataList') |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
path: 'crud-form', |
|
|
path: 'crud-form', |
|
|
name: 'side-menu-crud-form', |
|
|
name: 'side-menu-crud-form', |
|
|
meta: {title: '管理中心'}, |
|
|
|
|
|
|
|
|
meta: { title: '管理中心' }, |
|
|
component: () => import('@/views/CrudForm') |
|
|
component: () => import('@/views/CrudForm') |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
path: 'users-layout-1', |
|
|
path: 'users-layout-1', |
|
|
name: 'side-menu-users-layout-1', |
|
|
name: 'side-menu-users-layout-1', |
|
|
meta: {title: '管理中心'}, |
|
|
|
|
|
|
|
|
meta: { title: '管理中心' }, |
|
|
component: () => import('@/views/UsersLayout1') |
|
|
component: () => import('@/views/UsersLayout1') |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
path: 'users-layout-2', |
|
|
path: 'users-layout-2', |
|
|
name: 'side-menu-users-layout-2', |
|
|
name: 'side-menu-users-layout-2', |
|
|
meta: {title: '管理中心'}, |
|
|
|
|
|
|
|
|
meta: { title: '管理中心' }, |
|
|
component: () => import('@/views/UsersLayout2') |
|
|
component: () => import('@/views/UsersLayout2') |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
path: 'users-layout-3', |
|
|
path: 'users-layout-3', |
|
|
name: 'side-menu-users-layout-3', |
|
|
name: 'side-menu-users-layout-3', |
|
|
meta: {title: '管理中心'}, |
|
|
|
|
|
|
|
|
meta: { title: '管理中心' }, |
|
|
component: () => import('@/views/UsersLayout3') |
|
|
component: () => import('@/views/UsersLayout3') |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
path: 'profile-overview-1', |
|
|
path: 'profile-overview-1', |
|
|
name: 'side-menu-profile-overview-1', |
|
|
name: 'side-menu-profile-overview-1', |
|
|
meta: {title: '管理中心'}, |
|
|
|
|
|
|
|
|
meta: { title: '管理中心' }, |
|
|
component: () => import('@/views/ProfileOverview1') |
|
|
component: () => import('@/views/ProfileOverview1') |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
path: 'profile-overview-2', |
|
|
path: 'profile-overview-2', |
|
|
name: 'side-menu-profile-overview-2', |
|
|
name: 'side-menu-profile-overview-2', |
|
|
meta: {title: '管理中心'}, |
|
|
|
|
|
|
|
|
meta: { title: '管理中心' }, |
|
|
component: () => import('@/views/ProfileOverview2') |
|
|
component: () => import('@/views/ProfileOverview2') |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
path: 'profile-overview-3', |
|
|
|
|
|
name: 'side-menu-profile-overview-3', |
|
|
|
|
|
component: () => import('@/views/ProfileOverview3') |
|
|
|
|
|
|
|
|
path: 'profile-overview-3', |
|
|
|
|
|
name: 'side-menu-profile-overview-3', |
|
|
|
|
|
component: () => import('@/views/ProfileOverview3') |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
path: 'wizard-layout-1', |
|
|
path: 'wizard-layout-1', |
|
|
name: 'side-menu-wizard-layout-1', |
|
|
name: 'side-menu-wizard-layout-1', |
|
|
meta: {title: '管理中心'}, |
|
|
|
|
|
|
|
|
meta: { title: '管理中心' }, |
|
|
component: () => import('@/views/WizardLayout1') |
|
|
component: () => import('@/views/WizardLayout1') |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
path: 'wizard-layout-2', |
|
|
path: 'wizard-layout-2', |
|
|
name: 'side-menu-wizard-layout-2', |
|
|
name: 'side-menu-wizard-layout-2', |
|
|
meta: {title: '管理中心'}, |
|
|
|
|
|
|
|
|
meta: { title: '管理中心' }, |
|
|
component: () => import('@/views/WizardLayout2') |
|
|
component: () => import('@/views/WizardLayout2') |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
path: 'wizard-layout-3', |
|
|
path: 'wizard-layout-3', |
|
|
name: 'side-menu-wizard-layout-3', |
|
|
name: 'side-menu-wizard-layout-3', |
|
|
meta: {title: '管理中心'}, |
|
|
|
|
|
|
|
|
meta: { title: '管理中心' }, |
|
|
component: () => import('@/views/WizardLayout3') |
|
|
component: () => import('@/views/WizardLayout3') |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
path: 'blog-layout-1', |
|
|
path: 'blog-layout-1', |
|
|
name: 'side-menu-blog-layout-1', |
|
|
name: 'side-menu-blog-layout-1', |
|
|
meta: {title: '管理中心'}, |
|
|
|
|
|
|
|
|
meta: { title: '管理中心' }, |
|
|
component: () => import('@/views/BlogLayout1') |
|
|
component: () => import('@/views/BlogLayout1') |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
path: 'blog-layout-2', |
|
|
path: 'blog-layout-2', |
|
|
name: 'side-menu-blog-layout-2', |
|
|
name: 'side-menu-blog-layout-2', |
|
|
meta: {title: '管理中心'}, |
|
|
|
|
|
|
|
|
meta: { title: '管理中心' }, |
|
|
component: () => import('@/views/BlogLayout2') |
|
|
component: () => import('@/views/BlogLayout2') |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
path: 'blog-layout-3', |
|
|
path: 'blog-layout-3', |
|
|
name: 'side-menu-blog-layout-3', |
|
|
name: 'side-menu-blog-layout-3', |
|
|
meta: {title: '管理中心'}, |
|
|
|
|
|
|
|
|
meta: { title: '管理中心' }, |
|
|
component: () => import('@/views/BlogLayout3') |
|
|
component: () => import('@/views/BlogLayout3') |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
path: 'pricing-layout-1', |
|
|
path: 'pricing-layout-1', |
|
|
name: 'side-menu-pricing-layout-1', |
|
|
name: 'side-menu-pricing-layout-1', |
|
|
meta: {title: '管理中心'}, |
|
|
|
|
|
|
|
|
meta: { title: '管理中心' }, |
|
|
component: () => import('@/views/PricingLayout1') |
|
|
component: () => import('@/views/PricingLayout1') |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
path: 'pricing-layout-2', |
|
|
path: 'pricing-layout-2', |
|
|
name: 'side-menu-pricing-layout-2', |
|
|
name: 'side-menu-pricing-layout-2', |
|
|
meta: {title: '管理中心'}, |
|
|
|
|
|
|
|
|
meta: { title: '管理中心' }, |
|
|
component: () => import('@/views/PricingLayout2') |
|
|
component: () => import('@/views/PricingLayout2') |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
path: 'invoice-layout-1', |
|
|
path: 'invoice-layout-1', |
|
|
name: 'side-menu-invoice-layout-1', |
|
|
name: 'side-menu-invoice-layout-1', |
|
|
meta: {title: '管理中心'}, |
|
|
|
|
|
|
|
|
meta: { title: '管理中心' }, |
|
|
component: () => import('@/views/InvoiceLayout1') |
|
|
component: () => import('@/views/InvoiceLayout1') |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
path: 'invoice-layout-2', |
|
|
path: 'invoice-layout-2', |
|
|
name: 'side-menu-invoice-layout-2', |
|
|
name: 'side-menu-invoice-layout-2', |
|
|
meta: {title: '管理中心'}, |
|
|
|
|
|
|
|
|
meta: { title: '管理中心' }, |
|
|
component: () => import('@/views/InvoiceLayout2') |
|
|
component: () => import('@/views/InvoiceLayout2') |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
path: 'faq-layout-1', |
|
|
path: 'faq-layout-1', |
|
|
name: 'side-menu-faq-layout-1', |
|
|
name: 'side-menu-faq-layout-1', |
|
|
meta: {title: '管理中心'}, |
|
|
|
|
|
|
|
|
meta: { title: '管理中心' }, |
|
|
component: () => import('@/views/FaqLayout1') |
|
|
component: () => import('@/views/FaqLayout1') |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
path: 'faq-layout-2', |
|
|
path: 'faq-layout-2', |
|
|
name: 'side-menu-faq-layout-2', |
|
|
name: 'side-menu-faq-layout-2', |
|
|
meta: {title: '管理中心'}, |
|
|
|
|
|
|
|
|
meta: { title: '管理中心' }, |
|
|
component: () => import('@/views/FaqLayout2') |
|
|
component: () => import('@/views/FaqLayout2') |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
path: 'faq-layout-3', |
|
|
path: 'faq-layout-3', |
|
|
name: 'side-menu-faq-layout-3', |
|
|
name: 'side-menu-faq-layout-3', |
|
|
meta: {title: '管理中心'}, |
|
|
|
|
|
|
|
|
meta: { title: '管理中心' }, |
|
|
component: () => import('@/views/FaqLayout3') |
|
|
component: () => import('@/views/FaqLayout3') |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
path: 'update-profile', |
|
|
path: 'update-profile', |
|
|
name: 'side-menu-update-profile', |
|
|
name: 'side-menu-update-profile', |
|
|
meta: {title: '管理中心'}, |
|
|
|
|
|
|
|
|
meta: { title: '管理中心' }, |
|
|
component: () => import('@/views/UpdateProfile') |
|
|
component: () => import('@/views/UpdateProfile') |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
@@ -189,157 +191,157 @@ const routes = [ |
|
|
{ |
|
|
{ |
|
|
path: 'regular-table', |
|
|
path: 'regular-table', |
|
|
name: 'side-menu-regular-table', |
|
|
name: 'side-menu-regular-table', |
|
|
meta: {title: '管理中心'}, |
|
|
|
|
|
|
|
|
meta: { title: '管理中心' }, |
|
|
component: () => import('@/views/RegularTable') |
|
|
component: () => import('@/views/RegularTable') |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
path: 'tabulator', |
|
|
path: 'tabulator', |
|
|
name: 'side-menu-tabulator', |
|
|
name: 'side-menu-tabulator', |
|
|
meta: {title: '管理中心'}, |
|
|
|
|
|
|
|
|
meta: { title: '管理中心' }, |
|
|
component: () => import('@/views/Tabulator') |
|
|
component: () => import('@/views/Tabulator') |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
path: 'accordion', |
|
|
path: 'accordion', |
|
|
name: 'side-menu-accordion', |
|
|
name: 'side-menu-accordion', |
|
|
meta: {title: '管理中心'}, |
|
|
|
|
|
|
|
|
meta: { title: '管理中心' }, |
|
|
component: () => import('@/views/Accordion') |
|
|
component: () => import('@/views/Accordion') |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
path: 'button', |
|
|
path: 'button', |
|
|
name: 'side-menu-button', |
|
|
name: 'side-menu-button', |
|
|
meta: {title: '管理中心'}, |
|
|
|
|
|
|
|
|
meta: { title: '管理中心' }, |
|
|
component: () => import('@/views/Button') |
|
|
component: () => import('@/views/Button') |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
path: 'modal', |
|
|
path: 'modal', |
|
|
name: 'side-menu-modal', |
|
|
name: 'side-menu-modal', |
|
|
meta: {title: '管理中心'}, |
|
|
|
|
|
|
|
|
meta: { title: '管理中心' }, |
|
|
component: () => import('@/views/Modal') |
|
|
component: () => import('@/views/Modal') |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
path: 'alert', |
|
|
path: 'alert', |
|
|
name: 'side-menu-alert', |
|
|
name: 'side-menu-alert', |
|
|
meta: {title: '管理中心'}, |
|
|
|
|
|
|
|
|
meta: { title: '管理中心' }, |
|
|
component: () => import('@/views/Alert') |
|
|
component: () => import('@/views/Alert') |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
path: 'progress-bar', |
|
|
path: 'progress-bar', |
|
|
name: 'side-menu-progress-bar', |
|
|
name: 'side-menu-progress-bar', |
|
|
meta: {title: '管理中心'}, |
|
|
|
|
|
|
|
|
meta: { title: '管理中心' }, |
|
|
component: () => import('@/views/ProgressBar') |
|
|
component: () => import('@/views/ProgressBar') |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
path: 'tooltip', |
|
|
path: 'tooltip', |
|
|
name: 'side-menu-tooltip', |
|
|
name: 'side-menu-tooltip', |
|
|
meta: {title: '管理中心'}, |
|
|
|
|
|
|
|
|
meta: { title: '管理中心' }, |
|
|
component: () => import('@/views/Tooltip') |
|
|
component: () => import('@/views/Tooltip') |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
path: 'dropdown', |
|
|
path: 'dropdown', |
|
|
name: 'side-menu-dropdown', |
|
|
name: 'side-menu-dropdown', |
|
|
meta: {title: '管理中心'}, |
|
|
|
|
|
|
|
|
meta: { title: '管理中心' }, |
|
|
component: () => import('@/views/Dropdown') |
|
|
component: () => import('@/views/Dropdown') |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
path: 'toast', |
|
|
path: 'toast', |
|
|
name: 'side-menu-toast', |
|
|
name: 'side-menu-toast', |
|
|
meta: {title: '管理中心'}, |
|
|
|
|
|
|
|
|
meta: { title: '管理中心' }, |
|
|
component: () => import('@/views/Toast') |
|
|
component: () => import('@/views/Toast') |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
path: 'typography', |
|
|
path: 'typography', |
|
|
name: 'side-menu-typography', |
|
|
name: 'side-menu-typography', |
|
|
meta: {title: '管理中心'}, |
|
|
|
|
|
|
|
|
meta: { title: '管理中心' }, |
|
|
component: () => import('@/views/Typography') |
|
|
component: () => import('@/views/Typography') |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
path: 'icon', |
|
|
path: 'icon', |
|
|
name: 'side-menu-icon', |
|
|
name: 'side-menu-icon', |
|
|
meta: {title: '管理中心'}, |
|
|
|
|
|
|
|
|
meta: { title: '管理中心' }, |
|
|
component: () => import('@/views/Icon') |
|
|
component: () => import('@/views/Icon') |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
path: 'loading-icon', |
|
|
path: 'loading-icon', |
|
|
name: 'side-menu-loading-icon', |
|
|
name: 'side-menu-loading-icon', |
|
|
meta: {title: '管理中心'}, |
|
|
|
|
|
|
|
|
meta: { title: '管理中心' }, |
|
|
component: () => import('@/views/LoadingIcon') |
|
|
component: () => import('@/views/LoadingIcon') |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
path: 'regular-form', |
|
|
path: 'regular-form', |
|
|
name: 'side-menu-regular-form', |
|
|
name: 'side-menu-regular-form', |
|
|
meta: {title: '管理中心'}, |
|
|
|
|
|
|
|
|
meta: { title: '管理中心' }, |
|
|
component: () => import('@/views/RegularForm') |
|
|
component: () => import('@/views/RegularForm') |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
path: 'datepicker', |
|
|
path: 'datepicker', |
|
|
name: 'side-menu-datepicker', |
|
|
name: 'side-menu-datepicker', |
|
|
meta: {title: '管理中心'}, |
|
|
|
|
|
|
|
|
meta: { title: '管理中心' }, |
|
|
component: () => import('@/views/Datepicker') |
|
|
component: () => import('@/views/Datepicker') |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
path: 'tail-select', |
|
|
path: 'tail-select', |
|
|
name: 'side-menu-tail-select', |
|
|
name: 'side-menu-tail-select', |
|
|
meta: {title: '管理中心'}, |
|
|
|
|
|
|
|
|
meta: { title: '管理中心' }, |
|
|
component: () => import('@/views/TailSelect') |
|
|
component: () => import('@/views/TailSelect') |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
path: 'file-upload', |
|
|
path: 'file-upload', |
|
|
name: 'side-menu-file-upload', |
|
|
name: 'side-menu-file-upload', |
|
|
meta: {title: '管理中心'}, |
|
|
|
|
|
|
|
|
meta: { title: '管理中心' }, |
|
|
component: () => import('@/views/FileUpload') |
|
|
component: () => import('@/views/FileUpload') |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
path: 'wysiwyg-editor', |
|
|
path: 'wysiwyg-editor', |
|
|
name: 'side-menu-wysiwyg-editor', |
|
|
name: 'side-menu-wysiwyg-editor', |
|
|
meta: {title: '管理中心'}, |
|
|
|
|
|
|
|
|
meta: { title: '管理中心' }, |
|
|
component: () => import('@/views/WysiwygEditor') |
|
|
component: () => import('@/views/WysiwygEditor') |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
path: 'validation', |
|
|
path: 'validation', |
|
|
name: 'side-menu-validation', |
|
|
name: 'side-menu-validation', |
|
|
meta: {title: '管理中心'}, |
|
|
|
|
|
|
|
|
meta: { title: '管理中心' }, |
|
|
component: () => import('@/views/Validation') |
|
|
component: () => import('@/views/Validation') |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
path: 'chart', |
|
|
path: 'chart', |
|
|
name: 'side-menu-chart', |
|
|
name: 'side-menu-chart', |
|
|
meta: {title: '管理中心'}, |
|
|
|
|
|
|
|
|
meta: { title: '管理中心' }, |
|
|
component: () => import('@/views/Chart') |
|
|
component: () => import('@/views/Chart') |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
path: 'slider', |
|
|
path: 'slider', |
|
|
name: 'side-menu-slider', |
|
|
name: 'side-menu-slider', |
|
|
meta: {title: '管理中心'}, |
|
|
|
|
|
|
|
|
meta: { title: '管理中心' }, |
|
|
component: () => import('@/views/Slider') |
|
|
component: () => import('@/views/Slider') |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
path: 'image-zoom', |
|
|
path: 'image-zoom', |
|
|
name: 'side-menu-image-zoom', |
|
|
name: 'side-menu-image-zoom', |
|
|
meta: {title: '管理中心'}, |
|
|
|
|
|
|
|
|
meta: { title: '管理中心' }, |
|
|
component: () => import('@/views/ImageZoom') |
|
|
component: () => import('@/views/ImageZoom') |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
path: 'profile', |
|
|
path: 'profile', |
|
|
name: 'profile', |
|
|
name: 'profile', |
|
|
meta: {title: '个人资料'}, |
|
|
|
|
|
|
|
|
meta: { title: '个人资料' }, |
|
|
component: () => import('@/views/Profile') |
|
|
component: () => import('@/views/Profile') |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
path: 'invitation', |
|
|
path: 'invitation', |
|
|
name: 'invitation', |
|
|
name: 'invitation', |
|
|
meta: {title: '邀请赚钱'}, |
|
|
|
|
|
|
|
|
meta: { title: '邀请赚钱' }, |
|
|
component: () => import('@/views/Invitation') |
|
|
component: () => import('@/views/Invitation') |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
path: 'app', |
|
|
path: 'app', |
|
|
name: 'app', |
|
|
name: 'app', |
|
|
meta: {title: '应用中心'}, |
|
|
|
|
|
|
|
|
meta: { title: '应用中心' }, |
|
|
component: () => import('@/views/App') |
|
|
component: () => import('@/views/App') |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
path: 'myApp', |
|
|
path: 'myApp', |
|
|
name: 'my-app', |
|
|
name: 'my-app', |
|
|
meta: {title: '我的应用'}, |
|
|
|
|
|
|
|
|
meta: { title: '我的应用' }, |
|
|
component: () => import('@/views/MyApp') |
|
|
component: () => import('@/views/MyApp') |
|
|
} |
|
|
} |
|
|
] |
|
|
] |
|
@@ -347,19 +349,19 @@ const routes = [ |
|
|
{ |
|
|
{ |
|
|
path: '/test', |
|
|
path: '/test', |
|
|
name: 'test', |
|
|
name: 'test', |
|
|
meta: {title: '管理中心'}, |
|
|
|
|
|
|
|
|
meta: { title: '管理中心' }, |
|
|
component: () => import('@/views/Inbox') |
|
|
component: () => import('@/views/Inbox') |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
path: '/register', |
|
|
path: '/register', |
|
|
name: 'register', |
|
|
name: 'register', |
|
|
meta: {title: '管理中心'}, |
|
|
|
|
|
|
|
|
meta: { title: '管理中心' }, |
|
|
component: () => import('@/views/Register') |
|
|
component: () => import('@/views/Register') |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
path: '/404', |
|
|
path: '/404', |
|
|
name: 'error-page', |
|
|
name: 'error-page', |
|
|
meta: {title: '管理中心'}, |
|
|
|
|
|
|
|
|
meta: { title: '管理中心' }, |
|
|
component: () => import('@/views/ErrorPage') |
|
|
component: () => import('@/views/ErrorPage') |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
@@ -377,14 +379,27 @@ const router = new VueRouter({ |
|
|
if (savedPosition) { |
|
|
if (savedPosition) { |
|
|
return savedPosition; |
|
|
return savedPosition; |
|
|
} else { |
|
|
} else { |
|
|
return {x: 0, y: 0}; |
|
|
|
|
|
|
|
|
return { x: 0, y: 0 }; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
router.beforeEach((to, from, next) => { |
|
|
router.beforeEach((to, from, next) => { |
|
|
document.title = to.meta.title ? to.meta.title + ' - ZhiOS智莺' : 'ZhiOS智莺' |
|
|
document.title = to.meta.title ? to.meta.title + ' - ZhiOS智莺' : 'ZhiOS智莺' |
|
|
|
|
|
if (to.path === '/') { |
|
|
|
|
|
apost("/api/sign/status").then((res) => { |
|
|
|
|
|
|
|
|
|
|
|
next('/Dashboard') |
|
|
|
|
|
// 用户登录未失效, 直接跳转到会员中心页面 |
|
|
|
|
|
}).catch(err=>{ |
|
|
|
|
|
return |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
next() |
|
|
next() |
|
|
}) |
|
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export default router; |
|
|
export default router; |