chenjj 4 місяців тому
батько
коміт
8b20a5ac66

+ 21 - 14
src/router/index.js

@@ -67,6 +67,13 @@ export const constantRoutes = [
         component: () => import('@/views/index'),
         name: 'Index',
         meta: { title: '首页', icon: 'dashboard', affix: true }
+      },
+      {
+        path: '/order-details',
+        component: () => import('@/views/order/details/index'),
+        name: 'orderDetails',
+        hidden: true,
+        meta: { title: '订单详情', activeMenu: '/order/order-manage' }
       }
     ]
   },
@@ -158,20 +165,20 @@ export const dynamicRoutes = [
       }
     ]
   },
-  {
-    path: '/order/order-details',
-    component: Layout,
-    hidden: true,
-    permissions: ['order:manage:list'],
-    children: [
-      {
-        path: 'index/:orderId(\\d+)',
-        component: () => import('@/views/order/details/index'),
-        name: 'Data',
-        meta: { title: '订单详情', activeMenu: '/order/order-manage' }
-      }
-    ]
-  }
+  // {
+  //   path: '/order/order-details',
+  //   component: Layout,
+  //   hidden: true,
+  //   permissions: ['*'],
+  //   children: [
+  //     {
+  //       path: 'index/:orderId(\\d+)',
+  //       component: () => import('@/views/order/details/index'),
+  //       name: 'Data',
+  //       meta: { title: '订单详情', activeMenu: '/order/order-manage' }
+  //     }
+  //   ]
+  // }
 ]
 
 const router = createRouter({

+ 1 - 1
src/views/order/details/index.vue

@@ -52,7 +52,7 @@ const detailsData = ref({})
 const getDetails = async()=> {
     try {
         
-        const res = await orderInfo(route.params.orderId);
+        const res = await orderInfo(route.query.id);
         console.log('res',res);
         detailsData.value = res.data;
     } catch (error) {

+ 7 - 1
src/views/order/manage/index.vue

@@ -116,8 +116,14 @@ const listPageData = reactive({
             key: 'details',
             func: (row) => {
                 console.log(row)
-                router.push("/order/order-details/index/" + row.mainOrderId);
+                // router.push("/order/order-details/" + row.mainOrderId);
                 // openDialog(row)
+
+                router.push({
+                    path:"/order-details",
+                    query: {id:row.mainOrderId}
+                });
+
             }
         },
         // {