daShangDao_psiWebApp/dist/assets/supplier.61ab50af.js
凌尛 e3e3204354
Some checks failed
CI / build (18.x) (push) Failing after 16m52s
CI / build (20.x) (push) Failing after 13m36s
CI / deploy-preview (push) Has been skipped
CI / lint (push) Failing after 1m34s
CI / test (push) Failing after 34s
CI / security (push) Failing after 1m35s
提交代码
2026-06-22 10:25:21 +08:00

2 lines
672 B
JavaScript

import{r}from"./request.eff82867.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};