From d34b32a81457a3fca70dce4e9c209e1690b6f892 Mon Sep 17 00:00:00 2001 From: Soutfairy <1373664265@qq.com> Date: Mon, 18 Nov 2024 18:00:20 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E7=AE=A1=E7=90=86=E8=B7=AF?= =?UTF-8?q?=E7=94=B1=E5=92=8C=E6=8E=A5=E5=8F=A3=E7=BC=96=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/order/index.ts | 28 ++++++++++++++++++++++++++++ src/i18n/lang/en.ts | 1 + src/i18n/lang/zh-cn.ts | 1 + src/i18n/lang/zh-tw.ts | 1 + src/router/route.ts | 15 +++++++++++++++ 5 files changed, 46 insertions(+) create mode 100644 src/api/order/index.ts diff --git a/src/api/order/index.ts b/src/api/order/index.ts new file mode 100644 index 0000000..6e4fa1c --- /dev/null +++ b/src/api/order/index.ts @@ -0,0 +1,28 @@ +import request from '/@/utils/request'; +import { baseUrlHost } from '../baseUrlHost'; + +/** + * (不建议写成 request.post(xxx),因为这样 post 时,无法 params 与 data 同时传参) + * 注意在写get请求时,参数是params,而不是data,要标注好 + * + * 登录api接口集合 + * @method getOrderAll 获取所有订单列表 + */ + +export function orderApi() { + return { + getOrderList: (params: object) => { + return request({ + url: baseUrlHost + '/odOrder', + method: 'get', + params + }); + }, + getOrderDetail: (id: Number) => { + return request({ + url: baseUrlHost + `/odOrder/${id}`, + method: 'get', + }); + }, + }; +} diff --git a/src/i18n/lang/en.ts b/src/i18n/lang/en.ts index b035c38..71e74e0 100644 --- a/src/i18n/lang/en.ts +++ b/src/i18n/lang/en.ts @@ -10,6 +10,7 @@ export default { systemDic: 'systemDic', article: 'article', message: 'message', + order: 'order', articleDetail: 'articleDetail', addArticle: 'addArticle', editArticle: 'editArticle', diff --git a/src/i18n/lang/zh-cn.ts b/src/i18n/lang/zh-cn.ts index 8719692..2c13ff3 100644 --- a/src/i18n/lang/zh-cn.ts +++ b/src/i18n/lang/zh-cn.ts @@ -10,6 +10,7 @@ export default { systemDic: '字典管理', article: '文章管理', message: '留言管理', + order: '订单管理', articleDetail: '文章详情', addArticle: '新增文章', editArticle: '编辑文章', diff --git a/src/i18n/lang/zh-tw.ts b/src/i18n/lang/zh-tw.ts index cf32a65..76adb57 100644 --- a/src/i18n/lang/zh-tw.ts +++ b/src/i18n/lang/zh-tw.ts @@ -10,6 +10,7 @@ export default { systemDic: '字典管理', article: '文章管理', message: '聯言管理', + order: '訂單管理', articleDetail: '文章詳情', addArticle: '文章新增', editArticle: '文章編輯', diff --git a/src/router/route.ts b/src/router/route.ts index c8754bd..8956a44 100644 --- a/src/router/route.ts +++ b/src/router/route.ts @@ -232,6 +232,21 @@ export const dynamicRoutes: Array = [ icon: 'iconfont icon-fuwenbenkuang', }, }, + { + path: '/order', + name: 'order', + component: () => import('/@/views/order/index.vue'), + meta: { + title: 'message.router.order', + isLink: '', + isHide: false, + isKeepAlive: true, + isAffix: false, + isIframe: false, + roles: ['admin', 'common'], + icon: 'iconfont icon-shuju', + }, + }, { path: '/limits', name: 'limits',