|
|
@@ -1,404 +1,442 @@
|
|
|
-import { createWebHashHistory, RouteRecordRaw } from 'vue-router'
|
|
|
-import { useLoginStore } from '@/stores'
|
|
|
-import service from '@/services'
|
|
|
-import Page from '@mobile/components/layouts/page/index.vue'
|
|
|
-import animateRouter from './animateRouter'
|
|
|
+import { createWebHashHistory, RouteRecordRaw } from "vue-router";
|
|
|
+import { useLoginStore } from "@/stores";
|
|
|
+import service from "@/services";
|
|
|
+import Page from "@mobile/components/layouts/page/index.vue";
|
|
|
+import animateRouter from "./animateRouter";
|
|
|
|
|
|
-const { getToken } = useLoginStore()
|
|
|
+const { getToken } = useLoginStore();
|
|
|
|
|
|
const routes: Array<RouteRecordRaw> = [
|
|
|
{
|
|
|
- path: '/:pathMatch(.*)*',
|
|
|
- name: 'Error',
|
|
|
- component: () => import('../views/error/404.vue'),
|
|
|
+ path: "/:pathMatch(.*)*",
|
|
|
+ name: "Error",
|
|
|
+ component: () => import("../views/error/404.vue"),
|
|
|
meta: {
|
|
|
ignoreAuth: true,
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
- path: '/boot',
|
|
|
- name: 'Boot',
|
|
|
- component: () => import('../views/boot/index.vue'),
|
|
|
+ path: "/boot",
|
|
|
+ name: "Boot",
|
|
|
+ component: () => import("../views/boot/index.vue"),
|
|
|
meta: {
|
|
|
ignoreAuth: true,
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
- path: '/',
|
|
|
+ path: "/",
|
|
|
component: Page,
|
|
|
children: [
|
|
|
{
|
|
|
- path: '',
|
|
|
- name: 'Home',
|
|
|
- component: () => import('../views/home/index.vue'),
|
|
|
- }
|
|
|
- ]
|
|
|
+ path: "",
|
|
|
+ name: "Home",
|
|
|
+ component: () => import("../views/home/index.vue"),
|
|
|
+ },
|
|
|
+ ],
|
|
|
},
|
|
|
{
|
|
|
- path: '/user',
|
|
|
+ path: "/user",
|
|
|
component: Page,
|
|
|
children: [
|
|
|
{
|
|
|
- path: 'login',
|
|
|
- name: 'UserLogin',
|
|
|
- component: () => import('../views/user/login/index.vue'),
|
|
|
+ path: "login",
|
|
|
+ name: "UserLogin",
|
|
|
+ component: () => import("../views/user/login/index.vue"),
|
|
|
meta: {
|
|
|
ignoreAuth: true,
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
- path: 'register',
|
|
|
- name: 'UserRegister',
|
|
|
- component: () => import('../views/user/register/index.vue'),
|
|
|
+ path: "register",
|
|
|
+ name: "UserRegister",
|
|
|
+ component: () => import("../views/user/register/index.vue"),
|
|
|
meta: {
|
|
|
ignoreAuth: true,
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
- path: 'forget',
|
|
|
- name: 'UserForget',
|
|
|
- component: () => import('../views/user/forget/index.vue'),
|
|
|
+ path: "forget",
|
|
|
+ name: "UserForget",
|
|
|
+ component: () => import("../views/user/forget/index.vue"),
|
|
|
meta: {
|
|
|
ignoreAuth: true,
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
- path: 'logoff',
|
|
|
- name: 'UserLogoff',
|
|
|
- component: () => import('../views/user/logoff/index.vue'),
|
|
|
+ path: "logoff",
|
|
|
+ name: "UserLogoff",
|
|
|
+ component: () => import("../views/user/logoff/index.vue"),
|
|
|
},
|
|
|
{
|
|
|
- path: 'password',
|
|
|
- name: 'UserPassword',
|
|
|
- component: () => import('../views/user/password/index.vue'),
|
|
|
+ path: "password",
|
|
|
+ name: "UserPassword",
|
|
|
+ component: () => import("../views/user/password/index.vue"),
|
|
|
},
|
|
|
- ]
|
|
|
+ ],
|
|
|
},
|
|
|
{
|
|
|
- path: '/account',
|
|
|
+ path: "/account",
|
|
|
component: Page,
|
|
|
children: [
|
|
|
{
|
|
|
- path: 'certification',
|
|
|
- name: 'account-certification',
|
|
|
- component: () => import('../views/account/certification/index.vue'),
|
|
|
- }
|
|
|
- ]
|
|
|
+ path: "certification",
|
|
|
+ name: "account-certification",
|
|
|
+ component: () => import("../views/account/certification/index.vue"),
|
|
|
+ },
|
|
|
+ ],
|
|
|
},
|
|
|
{
|
|
|
- path: '/news',
|
|
|
+ path: "/news",
|
|
|
component: Page,
|
|
|
children: [
|
|
|
{
|
|
|
- path: 'details',
|
|
|
- name: 'news-details',
|
|
|
- component: () => import('../views/news/details/index.vue'),
|
|
|
+ path: "details",
|
|
|
+ name: "news-details",
|
|
|
+ component: () => import("../views/news/details/index.vue"),
|
|
|
},
|
|
|
{
|
|
|
- path: 'list',
|
|
|
- name: 'news-list',
|
|
|
- component: () => import('../views/news/list/index.vue'),
|
|
|
- }
|
|
|
- ]
|
|
|
+ path: "list",
|
|
|
+ name: "news-list",
|
|
|
+ component: () => import("../views/news/list/index.vue"),
|
|
|
+ },
|
|
|
+ ],
|
|
|
},
|
|
|
{
|
|
|
- path: '/market',
|
|
|
+ path: "/market",
|
|
|
component: Page,
|
|
|
children: [
|
|
|
{
|
|
|
- path: '',
|
|
|
- name: 'Market',
|
|
|
- component: () => import('../views/market/list/index.vue'),
|
|
|
- }
|
|
|
- ]
|
|
|
+ path: "",
|
|
|
+ name: "Market",
|
|
|
+ component: () => import("../views/market/list/index.vue"),
|
|
|
+ },
|
|
|
+ ],
|
|
|
},
|
|
|
{
|
|
|
- path: '/product',
|
|
|
+ path: "/product",
|
|
|
component: Page,
|
|
|
children: [
|
|
|
{
|
|
|
- path: '',
|
|
|
- name: 'product',
|
|
|
- component: () => import('../views/product/list/index.vue'),
|
|
|
+ path: "",
|
|
|
+ name: "product",
|
|
|
+ component: () => import("../views/product/list/index.vue"),
|
|
|
},
|
|
|
{
|
|
|
- path: 'detail',
|
|
|
- name: 'product-detail',
|
|
|
- component: () => import('../views/product/detail/index.vue'),
|
|
|
- }
|
|
|
- ]
|
|
|
+ path: "detail",
|
|
|
+ name: "product-detail",
|
|
|
+ component: () => import("../views/product/detail/index.vue"),
|
|
|
+ },
|
|
|
+ ],
|
|
|
},
|
|
|
{
|
|
|
- path: '/purchase',
|
|
|
+ path: "/purchase",
|
|
|
component: Page,
|
|
|
children: [
|
|
|
{
|
|
|
- path: 'detail',
|
|
|
- name: 'PurchaseDetail',
|
|
|
- component: () => import('../views/purchase/detail/index.vue'),
|
|
|
- }
|
|
|
- ]
|
|
|
+ path: "detail",
|
|
|
+ name: "PurchaseDetail",
|
|
|
+ component: () => import("../views/purchase/detail/index.vue"),
|
|
|
+ },
|
|
|
+ ],
|
|
|
},
|
|
|
{
|
|
|
- path: '/supply-demand',
|
|
|
+ path: "/supply-demand",
|
|
|
component: Page,
|
|
|
children: [
|
|
|
{
|
|
|
- path: 'detail',
|
|
|
- name: 'SupplyDemandDetail',
|
|
|
- component: () => import('../views/supply-demand/detail/index.vue'),
|
|
|
- }
|
|
|
- ]
|
|
|
+ path: "detail",
|
|
|
+ name: "SupplyDemandDetail",
|
|
|
+ component: () => import("../views/supply-demand/detail/index.vue"),
|
|
|
+ },
|
|
|
+ ],
|
|
|
},
|
|
|
{
|
|
|
- path: '/contract',
|
|
|
+ path: "/contract",
|
|
|
component: Page,
|
|
|
children: [
|
|
|
{
|
|
|
- path: '',
|
|
|
- name: 'contract',
|
|
|
- component: () => import('../views/contract/list/index.vue'),
|
|
|
+ path: "",
|
|
|
+ name: "contract",
|
|
|
+ component: () => import("../views/contract/list/index.vue"),
|
|
|
},
|
|
|
{
|
|
|
- path: 'details',
|
|
|
- name: 'contract-details',
|
|
|
- component: () => import('../views/contract/details/index.vue'),
|
|
|
- }
|
|
|
- ]
|
|
|
+ path: "details",
|
|
|
+ name: "contract-details",
|
|
|
+ component: () => import("../views/contract/details/index.vue"),
|
|
|
+ },
|
|
|
+ ],
|
|
|
},
|
|
|
{
|
|
|
- path: '/bank',
|
|
|
+ path: "/bank",
|
|
|
component: Page,
|
|
|
children: [
|
|
|
{
|
|
|
- path: 'bank',
|
|
|
- name: 'bank-wallet',
|
|
|
- component: () => import('../views/bank/wallet/index.vue'),
|
|
|
+ path: "bank",
|
|
|
+ name: "bank-wallet",
|
|
|
+ component: () => import("../views/bank/wallet/index.vue"),
|
|
|
},
|
|
|
{
|
|
|
- path: 'sign',
|
|
|
- name: 'bank-sign',
|
|
|
- component: () => import('../views/bank/sign/index.vue'),
|
|
|
+ path: "sign",
|
|
|
+ name: "bank-sign",
|
|
|
+ component: () => import("../views/bank/sign/index.vue"),
|
|
|
},
|
|
|
{
|
|
|
- path: 'edit',
|
|
|
- name: 'add-banksign',
|
|
|
- component: () => import('../views/bank/sign/components/edit/index.vue'),
|
|
|
+ path: "edit",
|
|
|
+ name: "add-banksign",
|
|
|
+ component: () => import("../views/bank/sign/components/edit/index.vue"),
|
|
|
},
|
|
|
{
|
|
|
- path: 'statement',
|
|
|
- name: 'bank-statement',
|
|
|
- component: () => import('../views/bank/statement/index.vue'),
|
|
|
+ path: "statement",
|
|
|
+ name: "bank-statement",
|
|
|
+ component: () => import("../views/bank/statement/index.vue"),
|
|
|
},
|
|
|
{
|
|
|
- path: 'hisstatement',
|
|
|
- name: 'bank-hisstatement',
|
|
|
- component: () => import('../views/bank/hisstatement/index.vue'),
|
|
|
+ path: "hisstatement",
|
|
|
+ name: "bank-hisstatement",
|
|
|
+ component: () => import("../views/bank/hisstatement/index.vue"),
|
|
|
},
|
|
|
- ]
|
|
|
+ ],
|
|
|
},
|
|
|
{
|
|
|
- path: '/order',
|
|
|
+ path: "/order",
|
|
|
component: Page,
|
|
|
children: [
|
|
|
{
|
|
|
- path: '',
|
|
|
- name: 'my-order',
|
|
|
- component: () => import('../views/mine/order/list/index.vue'),
|
|
|
+ path: "",
|
|
|
+ name: "my-order",
|
|
|
+ component: () => import("../views/mine/order/list/index.vue"),
|
|
|
},
|
|
|
{
|
|
|
- path: 'purchasetradedetail',
|
|
|
- name: 'purchase-trade-detail',
|
|
|
- component: () => import('../views/mine/order/detail/purchasetrade/index.vue'),
|
|
|
+ path: "purchasetradedetail",
|
|
|
+ name: "purchase-trade-detail",
|
|
|
+ component: () =>
|
|
|
+ import("../views/mine/order/detail/purchasetrade/index.vue"),
|
|
|
},
|
|
|
{
|
|
|
- path: 'wrtradedetail',
|
|
|
- name: 'wrtrade-detail',
|
|
|
- component: () => import('../views/mine/order/detail/wrtrade/index.vue'),
|
|
|
+ path: "wrtradedetail",
|
|
|
+ name: "wrtrade-detail",
|
|
|
+ component: () => import("../views/mine/order/detail/wrtrade/index.vue"),
|
|
|
},
|
|
|
{
|
|
|
- path: 'wrorderdetail',
|
|
|
- name: 'wrorder-detail',
|
|
|
- component: () => import('../views/mine/order/detail/wrorder/index.vue'),
|
|
|
+ path: "wrorderdetail",
|
|
|
+ name: "wrorder-detail",
|
|
|
+ component: () => import("../views/mine/order/detail/wrorder/index.vue"),
|
|
|
},
|
|
|
{
|
|
|
- path: 'transferdetail',
|
|
|
- name: 'transfer-detail',
|
|
|
- component: () => import('../views/mine/order/detail/transfer/index.vue'),
|
|
|
- }
|
|
|
- ,
|
|
|
+ path: "transferdetail",
|
|
|
+ name: "transfer-detail",
|
|
|
+ component: () =>
|
|
|
+ import("../views/mine/order/detail/transfer/index.vue"),
|
|
|
+ },
|
|
|
{
|
|
|
- path: 'hispurchasetradedetail',
|
|
|
- name: 'his-purchase-trade-detail',
|
|
|
- component: () => import('../views/mine/order/his/purchasetrade/index.vue'),
|
|
|
+ path: "hispurchasetradedetail",
|
|
|
+ name: "his-purchase-trade-detail",
|
|
|
+ component: () =>
|
|
|
+ import("../views/mine/order/his/purchasetrade/index.vue"),
|
|
|
},
|
|
|
{
|
|
|
- path: 'hiswrtradedetail',
|
|
|
- name: 'his-wrtrade-detail',
|
|
|
- component: () => import('../views/mine/order/his/wrtrade/index.vue'),
|
|
|
+ path: "hiswrtradedetail",
|
|
|
+ name: "his-wrtrade-detail",
|
|
|
+ component: () => import("../views/mine/order/his/wrtrade/index.vue"),
|
|
|
},
|
|
|
{
|
|
|
- path: 'hiswrorderdetail',
|
|
|
- name: 'his-wrorder-detail',
|
|
|
- component: () => import('../views/mine/order/his/wrorder/index.vue'),
|
|
|
+ path: "hiswrorderdetail",
|
|
|
+ name: "his-wrorder-detail",
|
|
|
+ component: () => import("../views/mine/order/his/wrorder/index.vue"),
|
|
|
},
|
|
|
{
|
|
|
- path: 'histransferdetail',
|
|
|
- name: 'his-transfer-detail',
|
|
|
- component: () => import('../views/mine/order/his/transfer/index.vue'),
|
|
|
- }
|
|
|
- ]
|
|
|
+ path: "histransferdetail",
|
|
|
+ name: "his-transfer-detail",
|
|
|
+ component: () => import("../views/mine/order/his/transfer/index.vue"),
|
|
|
+ },
|
|
|
+ ],
|
|
|
},
|
|
|
{
|
|
|
- path: '/wareorder',
|
|
|
+ path: "/wareorder",
|
|
|
component: Page,
|
|
|
children: [
|
|
|
{
|
|
|
- path: '',
|
|
|
- name: 'my-wareorder',
|
|
|
- component: () => import('../views/mine/wareorder/list/index.vue'),
|
|
|
+ path: "",
|
|
|
+ name: "my-wareorder",
|
|
|
+ component: () => import("../views/mine/wareorder/list/index.vue"),
|
|
|
},
|
|
|
{
|
|
|
- path: 'wroutinapplydetail',
|
|
|
- name: 'wroutinapply-detail',
|
|
|
- component: () => import('../views/mine/wareorder/wroutinapplydetail/index.vue'),
|
|
|
+ path: "wroutinapplydetail",
|
|
|
+ name: "wroutinapply-detail",
|
|
|
+ component: () =>
|
|
|
+ import("../views/mine/wareorder/wroutinapplydetail/index.vue"),
|
|
|
},
|
|
|
- ]
|
|
|
+ ],
|
|
|
},
|
|
|
{
|
|
|
- path: '/rules',
|
|
|
+ path: "/rules",
|
|
|
component: Page,
|
|
|
children: [
|
|
|
{
|
|
|
- path: 'ptgz',
|
|
|
- name: 'rules-ptgz',
|
|
|
- component: () => import('../views/rules/ptgz/index.vue'),
|
|
|
+ path: "ptgz",
|
|
|
+ name: "rules-ptgz",
|
|
|
+ component: () => import("../views/rules/ptgz/index.vue"),
|
|
|
},
|
|
|
{
|
|
|
- path: 'myrz',
|
|
|
- name: 'rules-myrz',
|
|
|
- component: () => import('../views/rules/myrz/index.vue'),
|
|
|
+ path: "myrz",
|
|
|
+ name: "rules-myrz",
|
|
|
+ component: () => import("../views/rules/myrz/index.vue"),
|
|
|
},
|
|
|
{
|
|
|
- path: 'ccwl',
|
|
|
- name: 'rules-ccwl',
|
|
|
- component: () => import('../views/rules/ccwl/index.vue'),
|
|
|
+ path: "ccwl",
|
|
|
+ name: "rules-ccwl",
|
|
|
+ component: () => import("../views/rules/ccwl/index.vue"),
|
|
|
},
|
|
|
{
|
|
|
- path: 'zcxy',
|
|
|
- name: 'rules-zcxy',
|
|
|
- component: () => import('../views/rules/zcxy/index.vue'),
|
|
|
+ path: "zcxy",
|
|
|
+ name: "rules-zcxy",
|
|
|
+ component: () => import("../views/rules/zcxy/index.vue"),
|
|
|
meta: {
|
|
|
ignoreAuth: true,
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
- path: 'yhkhfxgzs',
|
|
|
- name: 'rules-yhkhfxgzs',
|
|
|
- component: () => import('../views/rules/fxgzs/index.vue'),
|
|
|
+ path: "yhkhfxgzs",
|
|
|
+ name: "rules-yhkhfxgzs",
|
|
|
+ component: () => import("../views/rules/fxgzs/index.vue"),
|
|
|
meta: {
|
|
|
ignoreAuth: true,
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
- path: 'yszc',
|
|
|
- name: 'rules-yszc',
|
|
|
- component: () => import('../views/rules/yszc/index.vue'),
|
|
|
+ path: "yszc",
|
|
|
+ name: "rules-yszc",
|
|
|
+ component: () => import("../views/rules/yszc/index.vue"),
|
|
|
meta: {
|
|
|
ignoreAuth: true,
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
- path: 'gywm',
|
|
|
- name: 'rules-gywm',
|
|
|
- component: () => import('../views/rules/gywm/index.vue'),
|
|
|
+ path: "gywm",
|
|
|
+ name: "rules-gywm",
|
|
|
+ component: () => import("../views/rules/gywm/index.vue"),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: "fpsm",
|
|
|
+ name: "rules-fpsm",
|
|
|
+ component: () => import("../views/rules/fpsm/index.vue"),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: "fwrx",
|
|
|
+ name: "rules-fwrx",
|
|
|
+ component: () => import("../views/rules/fwrx/index.vue"),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: "buyrule",
|
|
|
+ name: "rules-buyrule",
|
|
|
+ component: () => import("../views/rules/buyrule/index.vue"),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: "sellrule",
|
|
|
+ name: "rules-sellrule",
|
|
|
+ component: () => import("../views/rules/sellrule/index.vue"),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: "jfgz",
|
|
|
+ name: "rules-jf",
|
|
|
+ component: () => import("../views/rules/jfgz/index.vue"),
|
|
|
},
|
|
|
{
|
|
|
- path: 'fpsm',
|
|
|
- name: 'rules-fpsm',
|
|
|
- component: () => import('../views/rules/fpsm/index.vue'),
|
|
|
+ path: "cght",
|
|
|
+ name: "rules-cght",
|
|
|
+ component: () => import("../views/rules/cght/index.vue"),
|
|
|
},
|
|
|
{
|
|
|
- path: 'fwrx',
|
|
|
- name: 'rules-fwrx',
|
|
|
- component: () => import('../views/rules/fwrx/index.vue'),
|
|
|
+ path: "zrht",
|
|
|
+ name: "rules-zrht",
|
|
|
+ component: () => import("../views/rules/zrht/index.vue"),
|
|
|
},
|
|
|
- ]
|
|
|
+ {
|
|
|
+ path: "xhht",
|
|
|
+ name: "rules-xhht",
|
|
|
+ component: () => import("../views/rules/xhht/index.vue"),
|
|
|
+ },
|
|
|
+ ],
|
|
|
},
|
|
|
{
|
|
|
- path: '/credit',
|
|
|
+ path: "/credit",
|
|
|
component: Page,
|
|
|
children: [
|
|
|
{
|
|
|
- path: 'signin',
|
|
|
- name: 'credit-signin',
|
|
|
- component: () => import('../views/credit/signin/index.vue'),
|
|
|
+ path: "signin",
|
|
|
+ name: "credit-signin",
|
|
|
+ component: () => import("../views/credit/signin/index.vue"),
|
|
|
},
|
|
|
{
|
|
|
- path: 'statement',
|
|
|
- name: 'credit-statement',
|
|
|
- component: () => import('../views/credit/statement/index.vue'),
|
|
|
+ path: "statement",
|
|
|
+ name: "credit-statement",
|
|
|
+ component: () => import("../views/credit/statement/index.vue"),
|
|
|
},
|
|
|
{
|
|
|
- path: 'lottery',
|
|
|
- name: 'credit-lottery',
|
|
|
- component: () => import('../views/credit/lottery/index.vue'),
|
|
|
+ path: "lottery",
|
|
|
+ name: "credit-lottery",
|
|
|
+ component: () => import("../views/credit/lottery/index.vue"),
|
|
|
},
|
|
|
- ]
|
|
|
+ ],
|
|
|
},
|
|
|
{
|
|
|
- path: '/mine',
|
|
|
+ path: "/mine",
|
|
|
component: Page,
|
|
|
children: [
|
|
|
{
|
|
|
- path: 'generalize',
|
|
|
- name: 'mine-generalize',
|
|
|
- component: () => import('../views/mine/generalize/index.vue'),
|
|
|
+ path: "generalize",
|
|
|
+ name: "mine-generalize",
|
|
|
+ component: () => import("../views/mine/generalize/index.vue"),
|
|
|
},
|
|
|
{
|
|
|
- path: 'promotion',
|
|
|
- name: 'promotion-detail',
|
|
|
- component: () => import('../views/mine/generalize/detail/index.vue'),
|
|
|
+ path: "promotion",
|
|
|
+ name: "promotion-detail",
|
|
|
+ component: () => import("../views/mine/generalize/detail/index.vue"),
|
|
|
},
|
|
|
{
|
|
|
- path: 'service',
|
|
|
- name: 'mine-service',
|
|
|
- component: () => import('../views/mine/service/index.vue'),
|
|
|
+ path: "service",
|
|
|
+ name: "mine-service",
|
|
|
+ component: () => import("../views/mine/service/index.vue"),
|
|
|
},
|
|
|
{
|
|
|
- path: 'address',
|
|
|
- name: 'mine-address',
|
|
|
- component: () => import('../views/mine/address/index.vue'),
|
|
|
+ path: "address",
|
|
|
+ name: "mine-address",
|
|
|
+ component: () => import("../views/mine/address/index.vue"),
|
|
|
},
|
|
|
{
|
|
|
- path: 'invoice',
|
|
|
- name: 'mine-invoice',
|
|
|
- component: () => import('../views/mine/invoice/index.vue'),
|
|
|
+ path: "invoice",
|
|
|
+ name: "mine-invoice",
|
|
|
+ component: () => import("../views/mine/invoice/index.vue"),
|
|
|
},
|
|
|
- ]
|
|
|
+ ],
|
|
|
},
|
|
|
{
|
|
|
- path: '/navigation',
|
|
|
+ path: "/navigation",
|
|
|
component: Page,
|
|
|
children: [
|
|
|
{
|
|
|
- path: 'setting',
|
|
|
- name: 'NavigationSetting',
|
|
|
- component: () => import('../views/navigation/setting/index.vue'),
|
|
|
+ path: "setting",
|
|
|
+ name: "NavigationSetting",
|
|
|
+ component: () => import("../views/navigation/setting/index.vue"),
|
|
|
},
|
|
|
{
|
|
|
- path: 'invoice',
|
|
|
- name: 'NavigationInvoice',
|
|
|
- component: () => import('../views/navigation/invoice/index.vue'),
|
|
|
+ path: "invoice",
|
|
|
+ name: "NavigationInvoice",
|
|
|
+ component: () => import("../views/navigation/invoice/index.vue"),
|
|
|
},
|
|
|
- ]
|
|
|
- }
|
|
|
-]
|
|
|
+ {
|
|
|
+ path: "ptgz",
|
|
|
+ name: "NavigationPTGZ",
|
|
|
+ component: () => import("../views/navigation/ptgz/index.vue"),
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+];
|
|
|
|
|
|
const router = animateRouter.create({
|
|
|
history: createWebHashHistory(),
|
|
|
routes,
|
|
|
-})
|
|
|
+});
|
|
|
|
|
|
// 路由跳转拦截
|
|
|
router.beforeEach((to, from, next) => {
|
|
|
@@ -408,20 +446,20 @@ router.beforeEach((to, from, next) => {
|
|
|
next();
|
|
|
} else {
|
|
|
next({
|
|
|
- name: 'UserLogin',
|
|
|
+ name: "UserLogin",
|
|
|
query: { redirect: to.fullPath },
|
|
|
});
|
|
|
}
|
|
|
} else {
|
|
|
- if (to.name === 'Boot' || to.name === 'UserLogin') {
|
|
|
+ if (to.name === "Boot" || to.name === "UserLogin") {
|
|
|
next();
|
|
|
} else {
|
|
|
next({
|
|
|
- name: 'Boot',
|
|
|
+ name: "Boot",
|
|
|
query: { redirect: to.fullPath },
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
-})
|
|
|
+});
|
|
|
|
|
|
-export default router
|
|
|
+export default router;
|