diff --git a/.env.development b/.env.development index ad07c38..821004f 100644 --- a/.env.development +++ b/.env.development @@ -8,4 +8,4 @@ VITE_POSITION = close VITE_EDITOR = vscode // VITE_EDITOR = webstorm 如果使用webstorm开发且要使用dom定位到代码行功能 请先自定添加 webstorm到环境变量 再将VITE_EDITOR值修改为webstorm // 如果使用docker-compose开发模式,设置为下面的地址或本机主机IP -//VITE_BASE_PATH = http://177.7.0.12 +//VITE_BASE_PATH = http://127.0.0.1 diff --git a/src/api/order/index.js b/src/api/order/index.js new file mode 100644 index 0000000..021faf8 --- /dev/null +++ b/src/api/order/index.js @@ -0,0 +1,14 @@ +import service from '@/utils/request' + +// @tag Order +// @summary 获取订单列表 +// @param {object} params +// @return {object} data +// @router get /order/list +export const list = (params) => { + return service({ + url: '/order/list', + method: 'get', + params + }) +} \ No newline at end of file diff --git a/src/pathInfo.json b/src/pathInfo.json index d74db75..0cf0b0c 100644 --- a/src/pathInfo.json +++ b/src/pathInfo.json @@ -72,5 +72,7 @@ "/src/plugin/announcement/view/info.vue": "Info", "/src/plugin/email/view/index.vue": "Email", "/src/view/goods/index.vue": "Goods", - "/src/view/goods/article/index.vue": "Article" + "/src/view/goods/article/index.vue": "Article", + "/src/view/order/index.vue": "OrderManage", + "/src/view/order/order/index.vue": "Order" } \ No newline at end of file diff --git a/src/pinia/modules/router.js b/src/pinia/modules/router.js index 33ebbc9..359f9ff 100644 --- a/src/pinia/modules/router.js +++ b/src/pinia/modules/router.js @@ -1,6 +1,6 @@ import { asyncRouterHandle } from '@/utils/asyncRouter' import { emitter } from '@/utils/bus.js' -import { asyncMenu } from '@/api/menu' +import { asyncMenu, getMenuList } from '@/api/menu' import { defineStore } from 'pinia' import { ref, watchEffect } from 'vue' import pathInfo from '@/pathInfo.json' @@ -106,8 +106,10 @@ export const useRouterStore = defineStore('router', () => { children: [] } ] - const asyncRouterRes = await asyncMenu() - const asyncRouter = asyncRouterRes.data.menus + // const asyncRouterRes = await asyncMenu() + const asyncRouterRes = await getMenuList() + // const asyncRouter = asyncRouterRes.data.menus + const asyncRouter = asyncRouterRes.data asyncRouter && asyncRouter.push({ path: 'reload', diff --git a/src/view/order/index.vue b/src/view/order/index.vue new file mode 100644 index 0000000..ccc458f --- /dev/null +++ b/src/view/order/index.vue @@ -0,0 +1,21 @@ + + + + \ No newline at end of file diff --git a/src/view/order/order/index.vue b/src/view/order/order/index.vue new file mode 100644 index 0000000..b8e0fe2 --- /dev/null +++ b/src/view/order/order/index.vue @@ -0,0 +1,92 @@ + + + \ No newline at end of file