Commit a1b48a44452ddb4407520122605d5d5540dbd59a
1 parent
b58b17e1ee
Exists in
master
auto commit the code by alias command
Showing
3 changed files
with
9 additions
and
65 deletions
Show diff stats
src/api/prod.js
1 | import request from '@/utils/request' | 1 | import request from '@/utils/request' |
2 | import { | 2 | import { |
3 | Notification | 3 | Notification |
4 | } from 'element-ui' | 4 | } from 'element-ui' |
5 | |||
5 | // export const getPersonInfo = data => { | 6 | // export const getPersonInfo = data => { |
6 | // return service({ | 7 | // return service({ |
7 | // url: '/person_pay/getpersoninfo', | 8 | // url: '/person_pay/getpersoninfo', |
8 | // method: 'post', | 9 | // method: 'post', |
9 | // data | 10 | // data |
10 | // }) | 11 | // }) |
11 | // } | 12 | // } |
12 | 13 | ||
13 | export function fetchList(query) { | 14 | export function fetchList(query) { |
14 | // console.log('api/prod/list/ ==fetchList=== query', query); | 15 | // console.log('api/prod/list/ ==fetchList=== query', query); |
15 | const options = { | 16 | const options = { |
16 | type: 'error', | 17 | type: 'error', |
17 | message: query, | 18 | message: query, |
18 | title: '==query value ===', | 19 | title: '==query value ===', |
19 | showClose: true, | 20 | showClose: true, |
20 | duration: 4000 | 21 | duration: 4000 |
21 | } | 22 | } |
22 | Notification(options) | 23 | Notification(options) |
23 | return request({ | 24 | return request({ |
24 | url: '/yp/prod/list', | 25 | url: '/yp/prod/list', |
25 | method: 'post', | 26 | method: 'post', |
26 | params: query | 27 | params: query |
27 | }) | 28 | }) |
28 | } | 29 | } |
29 | |||
30 | // export function fetchArticle(id) { | ||
31 | // return request({ | ||
32 | // url: '/yp/article/detail', | ||
33 | // method: 'get', | ||
34 | // params: { | ||
35 | // id | ||
36 | // } | ||
37 | // }) | ||
38 | // } | ||
39 | |||
40 | // export function fetchPv(pv) { | ||
41 | // return request({ | ||
42 | // url: '/yp/article/pv', | ||
43 | // method: 'get', | ||
44 | // params: { | ||
45 | // pv | ||
46 | // } | ||
47 | // }) | ||
48 | // } | ||
49 | |||
50 | // export function createArticle(data) { | ||
51 | // return request({ | ||
52 | // url: '/yp/article/create', | ||
53 | // method: 'post', | ||
54 | // data | ||
55 | // }) | ||
56 | // } | ||
57 | |||
58 | // export function updateArticle(data) { | ||
59 | // return request({ | ||
60 | // url: '/yp/article/update', | ||
61 | // method: 'post', | ||
62 | // data | ||
63 | // }) | ||
64 | // } |
src/router/modules/prod.js
1 | /** When your routing table is too long, you can split it into small modules**/ | 1 | /** When your routing table is too long, you can split it into small modules**/ |
2 | 2 | ||
3 | import Layout from '@/layout' | 3 | import Layout from '@/layout' |
4 | 4 | ||
5 | const prodRouter = { | 5 | const prodRouter = { |
6 | path: '/prod', | 6 | path: '/prod', |
7 | component: Layout, | 7 | component: Layout, |
8 | redirect: '/prod/page', | 8 | redirect: '/prod/page', |
9 | alwaysShow: true, // will always show the root menu | 9 | alwaysShow: true, // will always show the root menu |
10 | name: 'Prod', | 10 | name: 'Prod', |
11 | meta: { | 11 | meta: { |
12 | title: 'prods.prod_menu', // 会自动被i18n替换 | 12 | title: 'prods.prod_menu', // 会自动被i18n替换 |
13 | icon: 'star', | 13 | icon: 'star', |
14 | roles: ['admin', 'assistant', 'runner', 'shoper'] // you can set roles in root nav | 14 | roles: ['admin', 'assistant', 'runner', 'shoper'] // you can set roles in root nav |
15 | }, | 15 | }, |
16 | children: [ | 16 | children: [{ |
17 | // { | 17 | path: 'list', |
18 | // path: 'page', | 18 | component: () => import('@/views/prod/list'), |
19 | // component: () => import('@/views/permission/page'), | 19 | name: 'prodList', |
20 | // name: 'ProdList', | 20 | meta: { |
21 | // meta: { | 21 | title: 'prods.prodlist', |
22 | // title: 'ProdList', | 22 | roles: ['admin', 'assistant', 'shoper', 'runner'] |
23 | // roles: ['admin', 'assistant', 'runner', 'shoper'] | ||
24 | // } | ||
25 | // }, | ||
26 | // { | ||
27 | // path: 'defined', | ||
28 | // component: () => import('@/views/permission/directive'), | ||
29 | // name: 'ProdDefiend', | ||
30 | // meta: { | ||
31 | // title: 'ProdDefiend', | ||
32 | // roles: ['admin', 'assistant', 'shoper'] | ||
33 | // } | ||
34 | // }, | ||
35 | { | ||
36 | path: 'list', | ||
37 | component: () => import('@/views/prod/list'), | ||
38 | name: 'prodList', | ||
39 | meta: { | ||
40 | title: 'prods.prodlist', | ||
41 | roles: ['admin', 'assistant', 'shoper', 'runner'] | ||
42 | } | ||
43 | } | 23 | } |
44 | ] | 24 | }] |
45 | } | 25 | } |
46 | 26 | ||
47 | export default prodRouter | 27 | export default prodRouter |
48 | 28 |
src/store/modules/prod.js
No preview for this file type