search-purchase.js 646 B

123456789101112131415161718192021222324252627
  1. import SearchListApiBase from './base'
  2. import { ajaxGetSearchPurchaseList } from '../api/search-purchase'
  3. export default class SearchPurchaseListApi extends SearchListApiBase {
  4. constructor(config) {
  5. super(config)
  6. }
  7. /**
  8. * 覆写请求
  9. */
  10. async ajaxQuery(params) {
  11. const type = params._expand.type
  12. delete params._expand
  13. return ajaxGetSearchPurchaseList(type, params).then((res) => {
  14. console.log(res, 'res')
  15. let success = res?.error_code === 0
  16. return {
  17. success: success,
  18. list: res.data?.list || [],
  19. total: res.data?.count || 0,
  20. origin: res.data
  21. }
  22. })
  23. }
  24. }