2025-01-25 02:48:00 +00:00
|
|
|
/*
|
|
|
|
* @Description: router
|
|
|
|
* @Author: zenghua.wang
|
|
|
|
* @Date: 2023-06-20 11:48:41
|
|
|
|
* @LastEditors: zenghua.wang
|
2025-04-14 02:33:18 +01:00
|
|
|
* @LastEditTime: 2025-04-14 09:27:05
|
2025-01-25 02:48:00 +00:00
|
|
|
*/
|
|
|
|
import { createRouter, createWebHistory } from 'vue-router';
|
|
|
|
import Layout from '@/layouts/index.vue';
|
2025-05-22 10:38:36 +08:00
|
|
|
import BrandLayout from '@/views/brand/index.vue';
|
2025-04-02 13:46:49 +08:00
|
|
|
import Views from '@/layouts/Views.vue';
|
2025-04-11 17:32:55 +08:00
|
|
|
import userCentre from '@/layouts/userCentre.vue';
|
2025-01-25 02:48:00 +00:00
|
|
|
|
|
|
|
export const constantRoutes = [
|
|
|
|
{
|
2025-04-02 13:46:49 +08:00
|
|
|
path: '/sub-operation-service/404',
|
2025-01-25 02:48:00 +00:00
|
|
|
name: '404',
|
|
|
|
component: () => import('@/views/error/404.vue'),
|
|
|
|
hidden: true,
|
|
|
|
},
|
|
|
|
{
|
2025-04-02 13:46:49 +08:00
|
|
|
path: '/sub-operation-service/403',
|
2025-01-25 02:48:00 +00:00
|
|
|
name: '403',
|
|
|
|
component: () => import('@/views/error/403.vue'),
|
|
|
|
hidden: true,
|
|
|
|
},
|
2025-05-20 13:05:37 +08:00
|
|
|
// {
|
|
|
|
// path: '/sub-operation-service/userCenter',
|
|
|
|
// name: 'userCenter',
|
|
|
|
// component: () => import('@/views/userCenter/shoppingCart.vue'),
|
|
|
|
// hidden: true,
|
|
|
|
// },
|
|
|
|
{
|
|
|
|
path: '/sub-operation-service/userCenter',
|
|
|
|
name: 'userCenter',
|
|
|
|
// component: Layout,
|
|
|
|
redirect: '/sub-operation-service/userCenter',
|
|
|
|
meta: { title: '个人中心' },
|
|
|
|
children: [
|
2025-06-12 15:46:55 +08:00
|
|
|
// {
|
|
|
|
// path: '/sub-operation-service/userCenter',
|
|
|
|
// component: () => import('@/views/userCenter/shoppingCart.vue'),
|
|
|
|
// name: 'shoppingCart',
|
|
|
|
// meta: { title: '我的购物车' },
|
|
|
|
// },
|
2025-05-20 13:05:37 +08:00
|
|
|
{
|
|
|
|
path: '/sub-operation-service/userCenter',
|
2025-06-12 15:46:55 +08:00
|
|
|
component: () => import('@/views/userCenter/userOrders.vue'),
|
|
|
|
name: 'userOrders',
|
|
|
|
meta: { title: '我的订单', keepAlive: true },
|
2025-05-20 13:05:37 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/sub-operation-service/sureOrder',
|
|
|
|
component: () => import('@/views/userCenter/sureOrder.vue'),
|
|
|
|
name: 'sureOrder',
|
|
|
|
meta: { title: '结算' },
|
|
|
|
},
|
2025-06-06 13:28:38 +08:00
|
|
|
{
|
|
|
|
path: '/sub-operation-service/addressList',
|
|
|
|
component: () => import('@/views/userCenter/addressList.vue'),
|
|
|
|
name: 'addressList',
|
|
|
|
meta: { title: '我的地址' },
|
|
|
|
},
|
2025-05-20 13:05:37 +08:00
|
|
|
{
|
|
|
|
path: '/sub-operation-service/orderSuccess',
|
|
|
|
component: () => import('@/views/userCenter/orderSuccess.vue'),
|
|
|
|
name: 'orderSuccess',
|
|
|
|
meta: { title: '提交订单' },
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/sub-operation-service/paySuccess',
|
|
|
|
component: () => import('@/views/userCenter/paySuccess.vue'),
|
|
|
|
name: 'paySuccess',
|
|
|
|
meta: { title: '支付成功' },
|
|
|
|
},
|
2025-06-06 13:28:38 +08:00
|
|
|
{
|
|
|
|
path: '/sub-operation-service/orderDetails',
|
|
|
|
component: () => import('@/views/userCenter/orderDetails.vue'),
|
|
|
|
name: 'orderDetails',
|
2025-06-10 13:54:50 +08:00
|
|
|
meta: { title: '订单详情', keepAlive: true },
|
2025-06-06 13:28:38 +08:00
|
|
|
},
|
2025-05-21 13:44:54 +08:00
|
|
|
{
|
2025-05-20 13:05:37 +08:00
|
|
|
path: '/sub-operation-service/userLands',
|
|
|
|
component: () => import('@/views/userCenter/userLands.vue'),
|
|
|
|
name: 'userLands',
|
|
|
|
meta: { title: '我的土地' },
|
|
|
|
},
|
2025-05-28 11:13:02 +08:00
|
|
|
{
|
|
|
|
path: '/sub-operation-service/mySource',
|
|
|
|
component: () => import('@/views/userCenter/mySource.vue'),
|
2025-05-28 12:06:01 +08:00
|
|
|
name: 'mySource',
|
2025-05-28 11:13:02 +08:00
|
|
|
meta: { title: '我的溯源' },
|
|
|
|
},
|
2025-05-28 12:06:01 +08:00
|
|
|
{
|
|
|
|
path: '/sub-operation-service/myFinance',
|
|
|
|
component: () => import('@/views/userCenter/myFinance.vue'),
|
|
|
|
name: 'myFinance',
|
|
|
|
meta: { title: '我的金融' },
|
|
|
|
},
|
2025-05-29 17:27:04 +08:00
|
|
|
{
|
|
|
|
path: '/sub-operation-service/myBrand',
|
|
|
|
component: () => import('@/views/userCenter/myBrand.vue'),
|
|
|
|
name: 'myBrand',
|
|
|
|
meta: { title: '我的品牌' },
|
|
|
|
},
|
2025-05-20 13:05:37 +08:00
|
|
|
],
|
|
|
|
},
|
|
|
|
|
2025-06-12 15:46:55 +08:00
|
|
|
{
|
|
|
|
path: '/sub-operation-service/shoppingCarts',
|
|
|
|
name: 'shoppingCarts',
|
|
|
|
// component: Layout,
|
|
|
|
redirect: '/sub-operation-service/shoppingCarts',
|
|
|
|
meta: { title: '购物车' },
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
path: '/sub-operation-service/shoppingCarts',
|
|
|
|
component: () => import('@/views/shoppingCarts/shoppingCarts.vue'),
|
|
|
|
name: 'shoppingCartss',
|
|
|
|
meta: { title: '购物车' },
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/sub-operation-service/sureOrders',
|
|
|
|
component: () => import('@/views/shoppingCarts/sureOrders.vue'),
|
|
|
|
name: 'sureOrders',
|
|
|
|
meta: { title: '结算' },
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/sub-operation-service/addressLists',
|
|
|
|
component: () => import('@/views/shoppingCarts/addressLists.vue'),
|
|
|
|
name: 'addressLists',
|
|
|
|
meta: { title: '我的地址' },
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/sub-operation-service/orderSuccesss',
|
|
|
|
component: () => import('@/views/shoppingCarts/orderSuccesss.vue'),
|
|
|
|
name: 'orderSuccesss',
|
|
|
|
meta: { title: '提交订单' },
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/sub-operation-service/paySuccesss',
|
|
|
|
component: () => import('@/views/shoppingCarts/paySuccesss.vue'),
|
|
|
|
name: 'paySuccesss',
|
|
|
|
meta: { title: '支付成功' },
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
|
2025-01-25 02:48:00 +00:00
|
|
|
{
|
2025-04-02 13:46:49 +08:00
|
|
|
path: '/sub-operation-service',
|
2025-01-25 02:48:00 +00:00
|
|
|
name: 'layout',
|
|
|
|
component: Layout,
|
2025-06-06 15:19:52 +08:00
|
|
|
redirect: '/sub-operation-service/dashboard',
|
2025-04-14 02:33:18 +01:00
|
|
|
meta: { title: '运营服务' },
|
2025-01-25 02:48:00 +00:00
|
|
|
children: [
|
|
|
|
{
|
2025-04-02 13:46:49 +08:00
|
|
|
path: '/sub-operation-service/home',
|
2025-01-25 02:48:00 +00:00
|
|
|
component: () => import('@/views/home/index.vue'),
|
|
|
|
name: 'home',
|
2025-04-03 17:20:49 +08:00
|
|
|
meta: { title: '首页' },
|
2025-01-25 02:48:00 +00:00
|
|
|
},
|
2025-06-06 15:19:52 +08:00
|
|
|
],
|
|
|
|
},
|
2025-06-12 13:13:08 +08:00
|
|
|
{
|
|
|
|
path: '/sub-operation-service/finance',
|
|
|
|
component: Layout,
|
|
|
|
name: 'RuralFinance',
|
|
|
|
redirect: '/sub-operation-service/finance/integratedSector',
|
|
|
|
meta: { title: '涉农金融' },
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
path: 'integratedSector',
|
|
|
|
component: Views,
|
|
|
|
name: 'integratedSectors',
|
|
|
|
meta: { title: '综合板块' },
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
path: '',
|
|
|
|
component: () => import('@/views/ruralFinance/integratedSector/index.vue'),
|
|
|
|
name: 'integratedSectorMain',
|
|
|
|
meta: { title: '综合板块', hideInBread: true },
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'detail',
|
|
|
|
component: () => import('@/views/ruralFinance/integratedSector/detail.vue'),
|
|
|
|
name: 'integratedSectorDetail',
|
|
|
|
meta: { title: '查看详情', hideInBread: true },
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'loan',
|
|
|
|
component: () => import('@/views/ruralFinance/integratedSector/loan.vue'),
|
|
|
|
name: 'integratedSectorLoan',
|
|
|
|
meta: { title: '我要贷款', hideInBread: true },
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
2025-06-11 14:38:40 +08:00
|
|
|
{
|
|
|
|
path: '/sub-operation-service/farmService',
|
|
|
|
component: Layout,
|
|
|
|
name: 'farmService',
|
|
|
|
redirect: '/sub-operation-service/farmService/consult/policy',
|
|
|
|
meta: { title: '农事服务' },
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
path: 'consult',
|
|
|
|
component: Views,
|
2025-06-11 16:36:45 +08:00
|
|
|
redirect: '/sub-operation-service/farmService/consult/policy',
|
2025-06-11 14:38:40 +08:00
|
|
|
name: 'farmServiceMain',
|
|
|
|
meta: { title: '农事咨询' },
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
path: 'policy',
|
|
|
|
component: Views,
|
|
|
|
name: 'farmPolicys',
|
|
|
|
meta: { title: '农业政策' },
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
path: '',
|
|
|
|
component: () => import('@/views/farmingService/farmingConsult/index.vue'),
|
|
|
|
name: 'farmPolicy',
|
|
|
|
meta: { title: '农业政策', hideInBread: true },
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'detail',
|
2025-06-11 16:36:45 +08:00
|
|
|
component: () => import('@/views/farmingService/farmingConsult/policyDetail.vue'),
|
2025-06-11 14:38:40 +08:00
|
|
|
name: 'farmPolicyDetail',
|
|
|
|
meta: { title: '农业政策详情' },
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'technology',
|
|
|
|
component: () => import('@/views/farmingService/farmingConsult/farmingTec.vue'),
|
|
|
|
name: 'farmTechnology',
|
|
|
|
meta: { title: '农事技术' },
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'situation',
|
|
|
|
component: () => import('@/views/farmingService/farmingConsult/situation.vue'),
|
|
|
|
name: 'farmSituation',
|
|
|
|
meta: { title: '市场行情' },
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
2025-06-06 15:19:52 +08:00
|
|
|
{
|
|
|
|
path: '/sub-operation-service/dashboard',
|
|
|
|
component: Layout,
|
|
|
|
name: 'dashboard',
|
|
|
|
redirect: '/sub-operation-service/dashboard/home',
|
|
|
|
meta: { title: '综合看板' },
|
|
|
|
children: [
|
2025-05-15 17:34:49 +08:00
|
|
|
{
|
2025-06-06 15:19:52 +08:00
|
|
|
path: '/sub-operation-service/dashboard/home',
|
|
|
|
component: () => import('@/views/dashboard/breed/index.vue'),
|
|
|
|
name: 'dashboardHome',
|
|
|
|
meta: { title: '综合看板首页' },
|
2025-05-15 17:34:49 +08:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/sub-operation-service/smartFarm',
|
|
|
|
name: 'smartFarm',
|
|
|
|
component: Layout,
|
|
|
|
redirect: '/sub-operation-service/smartFarm/main',
|
|
|
|
meta: { title: '智慧种植' },
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
path: '/sub-operation-service/smartFarm/main',
|
|
|
|
component: () => import('@/views/smartFarm/index.vue'),
|
|
|
|
name: 'smartFarmMain',
|
|
|
|
meta: { title: '智慧种植首页' },
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/sub-operation-service/smartFarm/fieldInspection',
|
2025-05-20 09:48:38 +08:00
|
|
|
component: () => import('@/views/smartFarm/inspection/fieldInspection.vue'),
|
2025-05-15 17:34:49 +08:00
|
|
|
name: 'fieldInspection',
|
2025-05-20 09:48:38 +08:00
|
|
|
meta: { title: '田间监测' },
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/sub-operation-service/smartFarm/waterInspection',
|
|
|
|
component: () => import('@/views/smartFarm/inspection/waterInspection.vue'),
|
|
|
|
name: 'waterInspection',
|
|
|
|
meta: { title: '水质监测' },
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/sub-operation-service/smartFarm/bugInspection',
|
|
|
|
component: () => import('@/views/smartFarm/inspection/bugInspection.vue'),
|
|
|
|
name: 'bugInspection',
|
|
|
|
meta: { title: '病虫害监测' },
|
2025-05-15 17:34:49 +08:00
|
|
|
},
|
2025-05-20 17:34:11 +08:00
|
|
|
{
|
|
|
|
path: '/sub-operation-service/smartFarm/envInspection',
|
|
|
|
component: () => import('@/views/smartFarm/inspection/envInspection.vue'),
|
|
|
|
name: 'envInspection',
|
|
|
|
meta: { title: '环境监测' },
|
|
|
|
},
|
2025-05-21 10:14:25 +08:00
|
|
|
{
|
|
|
|
path: '/sub-operation-service/smartFarm/intelligentFertilizer',
|
|
|
|
component: () => import('@/views/smartFarm/inspection/intelligentFertilizer.vue'),
|
|
|
|
name: 'intelligentFertilizer',
|
|
|
|
meta: { title: '智能配肥' },
|
|
|
|
},
|
2025-05-21 14:33:34 +08:00
|
|
|
{
|
|
|
|
path: '/sub-operation-service/smartFarm/IntelligentIrrigation',
|
|
|
|
component: () => import('@/views/smartFarm/inspection/IntelligentIrrigation.vue'),
|
|
|
|
name: 'IntelligentIrrigation',
|
|
|
|
meta: { title: '智能灌溉' },
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/sub-operation-service/smartFarm/IntelligentSeedSoaking',
|
|
|
|
component: () => import('@/views/smartFarm/inspection/IntelligentSeedSoaking.vue'),
|
|
|
|
name: 'IntelligentSeedSoaking',
|
|
|
|
meta: { title: '智能浸种' },
|
|
|
|
},
|
2025-05-20 13:25:47 +08:00
|
|
|
{
|
|
|
|
path: '/sub-operation-service/smartFarm/growSeedlings',
|
2025-05-21 10:46:48 +08:00
|
|
|
component: () => import('@/views/smartFarm/manageControl/growSeedlings.vue'),
|
2025-05-20 13:25:47 +08:00
|
|
|
name: 'growSeedlings',
|
|
|
|
meta: { title: '一体育苗' },
|
|
|
|
},
|
2025-05-20 17:49:10 +08:00
|
|
|
{
|
|
|
|
path: '/sub-operation-service/smartFarm/pestPrevention',
|
2025-05-21 10:46:48 +08:00
|
|
|
component: () => import('@/views/smartFarm/manageControl/pestPrevention.vue'),
|
2025-05-20 17:49:10 +08:00
|
|
|
name: 'pestPrevention',
|
|
|
|
meta: { title: '病虫害防治' },
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/sub-operation-service/smartFarm/irrigationSystem',
|
2025-05-21 10:46:48 +08:00
|
|
|
component: () => import('@/views/smartFarm/manageControl/irrigationSystem.vue'),
|
2025-05-20 17:49:10 +08:00
|
|
|
name: 'irrigationSystem',
|
|
|
|
meta: { title: '喷灌滴灌' },
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/sub-operation-service/smartFarm/drainageControl',
|
2025-05-21 10:46:48 +08:00
|
|
|
component: () => import('@/views/smartFarm/manageControl/drainageControl.vue'),
|
2025-05-20 17:49:10 +08:00
|
|
|
name: 'drainageControl',
|
|
|
|
meta: { title: '排集水控制' },
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/sub-operation-service/smartFarm/openCurtain',
|
2025-05-21 10:46:48 +08:00
|
|
|
component: () => import('@/views/smartFarm/manageControl/openCurtain.vue'),
|
2025-05-20 17:49:10 +08:00
|
|
|
name: 'openCurtain',
|
|
|
|
meta: { title: '开窗卷帘' },
|
|
|
|
},
|
2025-05-15 17:34:49 +08:00
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/sub-operation-service/ruralFinance',
|
|
|
|
name: 'ruralFinance',
|
|
|
|
component: Layout,
|
|
|
|
redirect: '/sub-operation-service/ruralFinance/index',
|
|
|
|
meta: { title: '涉农金融' },
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
path: '/sub-operation-service/ruralFinance/index',
|
2025-06-09 10:59:28 +08:00
|
|
|
component: () => import('@/views/error/blank.vue'),
|
2025-05-15 17:34:49 +08:00
|
|
|
name: 'ruralFinanceMain',
|
|
|
|
meta: { title: '涉农金融首页' },
|
|
|
|
},
|
2025-06-09 10:59:28 +08:00
|
|
|
// {
|
|
|
|
// path: '/sub-operation-service/ruralFinance/index',
|
|
|
|
// component: () => import('@/views/ruralFinance/index.vue'),
|
|
|
|
// name: 'ruralFinanceMain',
|
|
|
|
// meta: { title: '涉农金融首页' },
|
|
|
|
// },
|
2025-05-15 17:34:49 +08:00
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/sub-operation-service/packaging',
|
|
|
|
name: 'packaging',
|
|
|
|
component: Layout,
|
2025-05-28 14:26:06 +08:00
|
|
|
redirect: '/sub-operation-service/packaging/sorting',
|
2025-05-15 17:34:49 +08:00
|
|
|
meta: { title: '分拣包装' },
|
|
|
|
children: [
|
2025-05-28 14:26:06 +08:00
|
|
|
{
|
|
|
|
path: '/sub-operation-service/packaging/sorting',
|
2025-06-09 10:59:28 +08:00
|
|
|
component: () => import('@/views/error/blank.vue'),
|
2025-05-28 14:26:06 +08:00
|
|
|
name: 'sortingMain',
|
|
|
|
meta: { title: '分拣首页' },
|
|
|
|
},
|
2025-06-09 10:59:28 +08:00
|
|
|
// {
|
|
|
|
// path: '/sub-operation-service/packaging/sorting',
|
|
|
|
// component: () => import('@/views/packaging/sorting.vue'),
|
|
|
|
// name: 'sortingMain',
|
|
|
|
// meta: { title: '分拣首页' },
|
|
|
|
// },
|
2025-05-15 17:34:49 +08:00
|
|
|
{
|
|
|
|
path: '/sub-operation-service/packaging/index',
|
2025-06-09 10:59:28 +08:00
|
|
|
component: () => import('@/views/error/blank.vue'),
|
2025-05-15 17:34:49 +08:00
|
|
|
name: 'packagingMain',
|
2025-05-28 14:26:06 +08:00
|
|
|
meta: { title: '包装首页' },
|
2025-05-15 17:34:49 +08:00
|
|
|
},
|
2025-06-09 10:59:28 +08:00
|
|
|
// {
|
|
|
|
// path: '/sub-operation-service/packaging/index',
|
|
|
|
// component: () => import('@/views/packaging/index.vue'),
|
|
|
|
// name: 'packagingMain',
|
|
|
|
// meta: { title: '包装首页' },
|
|
|
|
// },
|
2025-05-30 11:41:57 +08:00
|
|
|
{
|
|
|
|
path: '/sub-operation-service/packaging/details',
|
|
|
|
component: () => import('@/views/packaging/details.vue'),
|
|
|
|
name: 'detailsMain',
|
|
|
|
meta: { title: '详情页' },
|
|
|
|
},
|
2025-05-15 17:34:49 +08:00
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/sub-operation-service/warehouseLogistics',
|
|
|
|
name: 'warehouseLogistics',
|
|
|
|
component: Layout,
|
2025-05-28 11:43:31 +08:00
|
|
|
redirect: '/sub-operation-service/warehouse',
|
2025-05-15 17:34:49 +08:00
|
|
|
meta: { title: '仓储物流' },
|
|
|
|
children: [
|
|
|
|
{
|
2025-05-28 11:43:31 +08:00
|
|
|
path: '/sub-operation-service/warehouse',
|
2025-06-09 10:59:28 +08:00
|
|
|
component: () => import('@/views/error/blank.vue'),
|
2025-05-28 11:43:31 +08:00
|
|
|
name: 'warehouseMain',
|
|
|
|
meta: { title: '仓储首页' },
|
|
|
|
},
|
2025-06-09 10:59:28 +08:00
|
|
|
// {
|
|
|
|
// path: '/sub-operation-service/warehouse',
|
|
|
|
// component: () => import('@/views/warehouseLogistics/warehouse/index.vue'),
|
|
|
|
// name: 'warehouseMain',
|
|
|
|
// meta: { title: '仓储首页' },
|
|
|
|
// },
|
2025-05-29 18:02:16 +08:00
|
|
|
{
|
|
|
|
path: '/sub-operation-service/warehouse-detail',
|
|
|
|
component: () => import('@/views/warehouseLogistics/warehouse/detail.vue'),
|
|
|
|
name: 'warehouse-detail',
|
|
|
|
meta: { title: '仓储详情' },
|
|
|
|
},
|
2025-05-28 11:43:31 +08:00
|
|
|
{
|
|
|
|
path: '/sub-operation-service/logistics',
|
2025-06-09 10:59:28 +08:00
|
|
|
component: () => import('@/views/error/blank.vue'),
|
2025-05-28 11:43:31 +08:00
|
|
|
name: 'logistics-list',
|
|
|
|
meta: { title: '物流首页' },
|
2025-05-15 17:34:49 +08:00
|
|
|
},
|
2025-06-09 10:59:28 +08:00
|
|
|
// {
|
|
|
|
// path: '/sub-operation-service/logistics',
|
|
|
|
// component: () => import('@/views/warehouseLogistics/logistics/index.vue'),
|
|
|
|
// name: 'logistics-list',
|
|
|
|
// meta: { title: '物流首页' },
|
|
|
|
// },
|
2025-06-04 09:24:46 +08:00
|
|
|
{
|
|
|
|
path: '/sub-operation-service/logistics-detail',
|
|
|
|
component: () => import('@/views/warehouseLogistics/logistics/detail.vue'),
|
|
|
|
name: 'logistics-detail',
|
|
|
|
meta: { title: '物流详情' },
|
|
|
|
},
|
2025-05-15 17:34:49 +08:00
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/sub-operation-service/brand',
|
|
|
|
name: 'brand',
|
|
|
|
component: Layout,
|
2025-05-21 13:44:54 +08:00
|
|
|
redirect: '/sub-operation-service/brand/apply', // 默认页
|
2025-05-15 17:34:49 +08:00
|
|
|
meta: { title: '公共品牌' },
|
|
|
|
children: [
|
|
|
|
{
|
2025-06-11 14:38:40 +08:00
|
|
|
path: 'apply',
|
2025-05-22 10:38:36 +08:00
|
|
|
component: BrandLayout,
|
2025-06-11 14:38:40 +08:00
|
|
|
meta: { title: '使用申请' },
|
|
|
|
name: 'brandList',
|
2025-05-22 13:54:28 +08:00
|
|
|
redirect: '/sub-operation-service/brand/apply',
|
2025-05-21 13:44:54 +08:00
|
|
|
children: [
|
|
|
|
{
|
2025-06-11 14:38:40 +08:00
|
|
|
path: '',
|
2025-05-22 10:38:36 +08:00
|
|
|
component: () => import('@/views/brand/components/ApplyList.vue'),
|
2025-06-11 14:38:40 +08:00
|
|
|
meta: { title: '使用申请', hideInBread: true },
|
|
|
|
name: 'brandApplyList',
|
2025-05-21 13:44:54 +08:00
|
|
|
},
|
|
|
|
{
|
2025-06-11 14:38:40 +08:00
|
|
|
path: 'detail',
|
2025-05-22 10:38:36 +08:00
|
|
|
component: () => import('@/views/brand/components/ApplyDetail.vue'),
|
2025-06-11 14:38:40 +08:00
|
|
|
meta: { title: '申请详情' },
|
|
|
|
name: 'brandApplyDetail',
|
2025-05-21 13:44:54 +08:00
|
|
|
},
|
2025-06-11 14:38:40 +08:00
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'auth',
|
|
|
|
component: BrandLayout,
|
|
|
|
meta: { title: '授权管理' },
|
|
|
|
name: 'authManage',
|
|
|
|
redirect: 'record',
|
|
|
|
children: [
|
2025-05-21 13:44:54 +08:00
|
|
|
{
|
2025-06-11 14:38:40 +08:00
|
|
|
path: 'record',
|
|
|
|
name: 'authRecord',
|
2025-05-22 10:38:36 +08:00
|
|
|
component: () => import('@/views/brand/components/Auth.vue'),
|
|
|
|
meta: { title: '授权记录' },
|
2025-05-21 13:44:54 +08:00
|
|
|
},
|
|
|
|
{
|
2025-06-11 14:38:40 +08:00
|
|
|
path: 'manage',
|
|
|
|
name: 'brandManage',
|
2025-05-22 10:38:36 +08:00
|
|
|
component: () => import('@/views/brand/components/BrandSystem.vue'),
|
2025-06-11 14:38:40 +08:00
|
|
|
meta: { title: '品牌使用管理' },
|
2025-05-21 13:44:54 +08:00
|
|
|
},
|
|
|
|
],
|
2025-05-15 17:34:49 +08:00
|
|
|
},
|
2025-01-25 02:48:00 +00:00
|
|
|
],
|
|
|
|
},
|
2025-05-21 13:44:54 +08:00
|
|
|
|
2025-04-02 13:46:49 +08:00
|
|
|
{
|
2025-04-09 17:25:08 +08:00
|
|
|
path: '/sub-operation-service/ecommerce',
|
2025-04-02 13:46:49 +08:00
|
|
|
name: 'ecommerce',
|
|
|
|
component: Layout,
|
2025-04-09 17:25:08 +08:00
|
|
|
redirect: '/sub-operation-service/ecommerce-agricultural',
|
2025-04-03 17:20:49 +08:00
|
|
|
meta: { title: '电商交易' },
|
2025-04-02 13:46:49 +08:00
|
|
|
children: [
|
|
|
|
{
|
2025-06-10 14:02:34 +08:00
|
|
|
path: '/sub-operation-service/ecommerce-agricultural',
|
2025-04-09 17:25:08 +08:00
|
|
|
component: Views,
|
2025-06-10 14:02:34 +08:00
|
|
|
name: 'agricultural',
|
2025-04-12 15:57:15 +08:00
|
|
|
meta: { title: '农资交易', headerActive: 'ecommerce' },
|
2025-04-09 17:25:08 +08:00
|
|
|
children: [
|
|
|
|
{
|
2025-06-10 14:02:34 +08:00
|
|
|
path: '',
|
2025-04-09 17:25:08 +08:00
|
|
|
component: () => import('@/views/ecommerce/index.vue'),
|
2025-06-10 14:02:34 +08:00
|
|
|
name: 'agriculturalMain',
|
|
|
|
meta: { title: '农资交易', headerActive: 'ecommerce', hideInBread: true },
|
2025-04-09 17:25:08 +08:00
|
|
|
},
|
|
|
|
{
|
2025-06-10 14:02:34 +08:00
|
|
|
path: 'ecommerce-agriculturalDetail',
|
|
|
|
component: Views,
|
|
|
|
name: 'agriculturalDetails',
|
2025-04-12 15:57:15 +08:00
|
|
|
meta: { title: '农资详情', headerActive: 'ecommerce' },
|
2025-06-10 14:02:34 +08:00
|
|
|
children: [
|
|
|
|
{
|
|
|
|
path: '',
|
|
|
|
component: () => import('@/views/ecommerce/agriculturalDetail.vue'),
|
|
|
|
name: 'agriculturalDetail',
|
|
|
|
meta: { title: '农资详情', headerActive: 'ecommerce', hideInBread: true },
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'source',
|
|
|
|
component: () => import('@/views/ecommerce/sourceCodeDetail.vue'),
|
|
|
|
name: 'sourceCodeDetail',
|
|
|
|
meta: { title: '农产品溯源详情', headerActive: 'ecommerce' },
|
|
|
|
},
|
|
|
|
],
|
2025-04-11 17:32:55 +08:00
|
|
|
},
|
2025-04-09 17:25:08 +08:00
|
|
|
],
|
2025-04-02 13:46:49 +08:00
|
|
|
},
|
|
|
|
{
|
2025-04-09 17:25:08 +08:00
|
|
|
path: '/sub-operation-service/purchaser',
|
2025-04-03 17:20:49 +08:00
|
|
|
component: Views,
|
2025-04-09 17:25:08 +08:00
|
|
|
redirect: '/sub-operation-service/ecommerce-purchaser',
|
2025-04-03 17:20:49 +08:00
|
|
|
name: 'purchaserParent',
|
2025-04-12 15:57:15 +08:00
|
|
|
meta: { title: '采购商服务', headerActive: 'ecommerce' },
|
2025-04-03 17:20:49 +08:00
|
|
|
children: [
|
|
|
|
{
|
2025-04-09 17:25:08 +08:00
|
|
|
path: '/sub-operation-service/ecommerce-purchaser',
|
2025-04-03 17:20:49 +08:00
|
|
|
component: () => import('@/views/ecommerce/purchaser.vue'),
|
|
|
|
name: 'purchaser',
|
2025-04-12 15:57:15 +08:00
|
|
|
meta: { title: '采购商服务', headerActive: 'ecommerce' },
|
2025-04-03 17:20:49 +08:00
|
|
|
},
|
|
|
|
{
|
2025-04-09 17:25:08 +08:00
|
|
|
path: '/sub-operation-service/ecommerce-purchaserDetail',
|
2025-04-03 17:20:49 +08:00
|
|
|
component: () => import('@/views/ecommerce/purchaserDetail.vue'),
|
|
|
|
name: 'purchaserDetail',
|
2025-04-12 15:57:15 +08:00
|
|
|
meta: { title: '采购详情', headerActive: 'ecommerce' },
|
2025-04-03 17:20:49 +08:00
|
|
|
},
|
|
|
|
],
|
2025-04-02 13:46:49 +08:00
|
|
|
},
|
|
|
|
{
|
2025-04-09 17:25:08 +08:00
|
|
|
path: '/sub-operation-service/ecommerce-supplier',
|
2025-06-10 14:02:34 +08:00
|
|
|
component: Views,
|
2025-04-02 13:46:49 +08:00
|
|
|
name: 'supplier',
|
2025-06-10 14:02:34 +08:00
|
|
|
meta: { title: '农产品交易', headerActive: 'ecommerce' },
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
path: '',
|
|
|
|
component: () => import('@/views/ecommerce/supplier.vue'),
|
|
|
|
name: 'supplierMain',
|
|
|
|
meta: { title: '农产品交易', headerActive: 'ecommerce', hideInBread: true },
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'detail',
|
|
|
|
component: Views,
|
|
|
|
name: 'supplierDetails',
|
|
|
|
meta: { title: '农产品详情', headerActive: 'ecommerce' },
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
path: '',
|
|
|
|
component: () => import('@/views/ecommerce/supplierDetail.vue'),
|
|
|
|
name: 'supplierDetail',
|
|
|
|
meta: { title: '农产品详情', headerActive: 'ecommerce', hideInBread: true },
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'source',
|
|
|
|
component: () => import('@/views/ecommerce/sourceCodeDetail.vue'),
|
|
|
|
name: 'sourceDetail',
|
|
|
|
meta: { title: '溯源详情', headerActive: 'ecommerce' },
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
2025-04-02 13:46:49 +08:00
|
|
|
},
|
|
|
|
{
|
2025-04-09 17:25:08 +08:00
|
|
|
path: '/sub-operation-service/ecommerce-land',
|
2025-04-03 17:20:49 +08:00
|
|
|
component: Views,
|
2025-04-09 17:25:08 +08:00
|
|
|
redirect: '/sub-operation-service/ecommerce-land',
|
2025-04-03 17:20:49 +08:00
|
|
|
name: 'landParent',
|
2025-04-12 15:57:15 +08:00
|
|
|
meta: { title: '土地交易', headerActive: 'ecommerce' },
|
2025-04-03 17:20:49 +08:00
|
|
|
children: [
|
|
|
|
{
|
2025-04-09 17:25:08 +08:00
|
|
|
path: '/sub-operation-service/ecommerce-land',
|
2025-04-03 17:20:49 +08:00
|
|
|
component: () => import('@/views/ecommerce/land.vue'),
|
|
|
|
name: 'land',
|
2025-04-12 15:57:15 +08:00
|
|
|
meta: { title: '土地交易', headerActive: 'ecommerce' },
|
2025-04-03 17:20:49 +08:00
|
|
|
},
|
|
|
|
{
|
2025-04-09 17:25:08 +08:00
|
|
|
path: '/sub-operation-service/ecommerce-landDetail',
|
2025-04-03 17:20:49 +08:00
|
|
|
component: () => import('@/views/ecommerce/landDetail.vue'),
|
|
|
|
name: 'landDetail',
|
2025-04-12 15:57:15 +08:00
|
|
|
meta: { title: '土地详情', headerActive: 'ecommerce' },
|
2025-04-03 17:20:49 +08:00
|
|
|
},
|
|
|
|
],
|
2025-04-02 13:46:49 +08:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
2025-05-12 17:46:49 +08:00
|
|
|
// ...demo,
|
2025-01-25 02:48:00 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @Title notFoundRouter(找不到路由)
|
|
|
|
*/
|
|
|
|
export const notFoundRouter = {
|
2025-04-02 13:46:49 +08:00
|
|
|
path: '/sub-operation-service/:pathMatch(.*)',
|
2025-01-25 02:48:00 +00:00
|
|
|
name: 'notFound',
|
2025-04-02 13:46:49 +08:00
|
|
|
redirect: '/sub-operation-service/404',
|
2025-01-25 02:48:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
const router = createRouter({
|
2025-04-02 13:46:49 +08:00
|
|
|
history: createWebHistory(), // history
|
2025-01-25 02:48:00 +00:00
|
|
|
routes: constantRoutes,
|
|
|
|
});
|
|
|
|
|
2025-06-10 13:54:50 +08:00
|
|
|
router.beforeEach((to, from) => {
|
|
|
|
console.log(from.path);
|
|
|
|
console.log(to.path);
|
|
|
|
|
|
|
|
if (from.path === '/sub-operation-service/orderDetails' && to.path === '/sub-operation-service/userOrders') {
|
|
|
|
to.meta.keepAlive = true; // 从详情页返回列表页时启用缓存
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2025-01-25 02:48:00 +00:00
|
|
|
export default router;
|