UNPKG

isun

Version:

快速创建vue项目

17 lines (14 loc) 484 B
import Mock from 'mockjs' import { builder, getBody } from '../util' import { dicList } from '../entity' import { sortBy } from 'lodash' const info = (options) => { const body = getBody(options) const { type } = body let _data = null if (type !== '' && type !== null && type !== undefined) { _data = sortBy(dicList.filter((d) => d.type === type), (d) => d.sortNo) } return builder(_data) } Mock.mock(/\/api\/dic\/list/, 'post', info)