daShangDao_psiWebApp/dist/assets/supplier.9e64da2f.js
97694731 1fa4f33695
Some checks failed
CI / build (18.x) (push) Failing after 37m26s
CI / build (20.x) (push) Failing after 15s
CI / deploy-preview (push) Has been skipped
CI / lint (push) Failing after 16m50s
CI / test (push) Successful in 40m41s
CI / security (push) Successful in 29m36s
多拍
2026-06-25 14:37:30 +08:00

2 lines
672 B
JavaScript

import{r}from"./request.431ecd42.js";const s="/supplier",u=e=>{const t=e==null?void 0:e.data;return t?Array.isArray(t)?{list:t,total:t.length}:{list:Array.isArray(t.list)?t.list:[],total:typeof t.total=="number"?t.total:Array.isArray(t.list)?t.list.length:0}:{list:[],total:0}},o=async({keyword:e,status:t,page:a,pageSize:n})=>{const i={keyword:e||void 0,status:t,page:a,page_size:n},l=await r.get(`${s}/list`,{params:i});return u(l)},p=async e=>{const t=await r.get(`${s}/detail/${e}`);return(t==null?void 0:t.data)||null},y=async e=>r.post(`${s}/create`,e),d=async e=>r.put(`${s}/update`,e),f=async e=>r.post(`${s}/delete`,e);export{p as a,y as c,f as d,o as f,d as u};