daShangDao_psiWebApp/dist/assets/car.d628b48e.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
812 B
JavaScript

import{r as a}from"./request.eff82867.js";const r="/car",c=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}},l=async({keyword:e,page:t,pageSize:s})=>{const n={keyword:e||void 0,page:t,page_size:s},o=await a.get(`${r}/list`,{params:n});return c(o)},u=async e=>{const t=await a.get(`${r}/detail/${e}`);return(t==null?void 0:t.data)||null},d=async e=>a.post(`${r}/create`,e),p=async e=>a.put(`${r}/update`,e),y=async e=>{const t=new FormData;return t.append("id",String(e)),a.delete(`${r}/delete`,{data:t})},f=async e=>a.post(`${r}/shop/create`,e),h=async e=>a.post(`${r}/shop/delete`,e);export{u as a,h as b,d as c,y as d,f as e,l as f,p as u};