getDict.js 335 B

1234567891011121314151617181920
  1. import request from '@/utils/request'
  2. import {
  3. list2
  4. } from '@/api/dict.js'
  5. const getDict = function getDict(type,code) {
  6. return new Promise((resolve, reject) => {
  7. list2({
  8. paterCode: type,
  9. code:code
  10. })
  11. .then(res => {
  12. resolve(res.data)
  13. }).catch(error => {
  14. reject(error)
  15. })
  16. })
  17. }
  18. export default getDict