123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- import { SUCCESS_CODE } from '@/constants'
- const timeout = 1000
- const dictObj: Recordable = {
- importance: [
- {
- value: 0,
- label: 'tableDemo.commonly'
- },
- {
- value: 1,
- label: 'tableDemo.good'
- },
- {
- value: 2,
- label: 'tableDemo.important'
- }
- ]
- }
- export default [
- // 字典接口
- {
- url: '/mock/dict/list',
- method: 'get',
- timeout,
- response: () => {
- return {
- code: SUCCESS_CODE,
- data: dictObj
- }
- }
- },
- // 获取某个字典
- {
- url: '/mock/dict/one',
- method: 'get',
- timeout,
- response: () => {
- return {
- code: SUCCESS_CODE,
- data: [
- {
- label: 'test1',
- value: 0
- },
- {
- label: 'test2',
- value: 1
- },
- {
- label: 'test3',
- value: 2
- }
- ]
- }
- }
- }
- ]
|