订单管理路由和接口编写
This commit is contained in:
parent
53fdad11a2
commit
d34b32a814
28
src/api/order/index.ts
Normal file
28
src/api/order/index.ts
Normal file
@ -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',
|
||||
});
|
||||
},
|
||||
};
|
||||
}
|
@ -10,6 +10,7 @@ export default {
|
||||
systemDic: 'systemDic',
|
||||
article: 'article',
|
||||
message: 'message',
|
||||
order: 'order',
|
||||
articleDetail: 'articleDetail',
|
||||
addArticle: 'addArticle',
|
||||
editArticle: 'editArticle',
|
||||
|
@ -10,6 +10,7 @@ export default {
|
||||
systemDic: '字典管理',
|
||||
article: '文章管理',
|
||||
message: '留言管理',
|
||||
order: '订单管理',
|
||||
articleDetail: '文章详情',
|
||||
addArticle: '新增文章',
|
||||
editArticle: '编辑文章',
|
||||
|
@ -10,6 +10,7 @@ export default {
|
||||
systemDic: '字典管理',
|
||||
article: '文章管理',
|
||||
message: '聯言管理',
|
||||
order: '訂單管理',
|
||||
articleDetail: '文章詳情',
|
||||
addArticle: '文章新增',
|
||||
editArticle: '文章編輯',
|
||||
|
@ -232,6 +232,21 @@ export const dynamicRoutes: Array<RouteRecordRaw> = [
|
||||
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',
|
||||
|
Loading…
Reference in New Issue
Block a user