data_center/public/admin/assets/shop.f9351e07.js

2 lines
1.7 KiB
JavaScript

import{t as g,$ as l}from"./@vue.e015a8ce.js";import{r}from"./index.5e3e9263.js";function L(t){const{page:a=1,size:c=15,fetchFun:i,params:o={},firstLoading:p=!1}=t,u=Object.assign({},g(o)),n=l({page:a,size:c,loading:p,count:0,lists:[],extend:{}}),s=()=>(n.loading=!0,i({page:n.page,limit:n.size,...o}).then(e=>(n.count=e==null?void 0:e.count,n.lists=e==null?void 0:e.lists,n.extend=e==null?void 0:e.extend,Promise.resolve(e))).catch(e=>Promise.reject(e)).finally(()=>{n.loading=!1}));return{pager:n,getLists:s,resetParams:()=>{Object.keys(u).forEach(e=>{o[e]=u[e]}),s()},resetPage:()=>{n.page=1,s()}}}function y(t){return r.get({url:"/shop.product/productLst",params:t})}function A(t){return r.get({url:"/shop.product/categoryLlist",params:t})}function P(t){return r.get({url:"/shop.product/productMerSelect",params:t})}function b(t){return r.get({url:"/shop.product/productLstFilter",params:t})}function O(t){return r.get({url:"/shop.product/labelLoption",params:t})}function j(t){return r.get({url:"/shop.user/lst",params:t})}function x(t){return r.get({url:"/shop.user/groupLst",params:t})}function G(t){return r.get({url:"/shop.user/labelLst",params:t})}function S(t){return r.get({url:"/shop.merchant/lst",params:t})}function F(t){return r.get({url:"/shop.merchant/typeOptions",params:t})}function v(t){return r.get({url:"/shop.merchant/categoryOptions",params:t})}function z(t){return r.get({url:"/shop.merchant/cityGetArea",params:t})}function k(t){return r.get({url:"/shop.merchant/cityGetStreet",params:t})}function q(t){return r.get({url:"/shop.merchant/count",params:t})}export{k as a,q as b,A as c,v as d,z as e,S as f,O as g,x as h,G as i,j,b as l,P as m,y as p,F as t,L as u};