2 lines
3.0 KiB
JavaScript
2 lines
3.0 KiB
JavaScript
import{a as n}from"./axios-QLjAsgXu.js";import{E as r,A as o}from"./index-F1El3hcz.js";let i=localStorage.getItem("TRADE_USER")?JSON.parse(localStorage.getItem("TRADE_USER")).expire:{};const e=n.create({baseURL:"https://multi-store.lihaink",timeout:3e4});e.interceptors.request.use(t=>{let a=Math.floor(new Date().getTime()/1e3);return i&&a>i&&(r({message:"登录过期,请重新登录",type:"warning"}),localStorage.removeItem("TRADE_USER"),o.replace("/login")),t},t=>Promise.reject(t));e.interceptors.response.use(t=>t.data.code!=1?(r({message:t.data.message,type:"warning"}),Promise.reject(t.data.message)):t.data,t=>Promise.reject(t));function c(t){return e.get("/statistics/user",{params:t})}function _(t){return e.get("/api/dataview/order_statistics",{params:t})}function d(t){return e.get("/statistics/sales_ranking",{params:t})}function p(t){return e.get("/api/dataview/curr_day_order_amount",{params:t})}function g(t){return e.get("/statistics/product_count",{params:t})}function l(t){return e.get("/statistics/index",{params:t})}function f(t){return e.get("/statistics/user_trade_count",{params:t})}function m(t){return e.get("/api/dataview/product_category_list",{params:t})}function A(t){return e.get("/api/dataview/product_list",{params:t})}function w(t){return e.get("/api/dataview/merchant_list",{params:t})}function v(t){return e.get("/api/dataview/order_list",{params:t})}function h(t){return e.get("/api/dataview/order_list_count_title",{params:t})}function k(t){return e.get("/api/dataview/refund_order_list",{params:t})}function y(t){return e.get("/api/dataview/take_order_list",{params:t})}function E(t){return e.get("/api/dataview/take_order_count_title",{params:t})}function R(t){return e.get("/api/dataview/financial_record_title",{params:t})}function S(t){return e.get("/api/dataview/financial_record",{params:t})}function x(t){return e.get("/api/dataview/product_status_filter",{params:t})}function P(t){return e.get("/api/dataview/financial_record_detail/1",{params:t})}function T(t){return e.get("/api/dataview/financial_record_detail/2",{params:t})}function U(t){return e.get("/api/dataview/bill_list",{params:t})}function C(t){return e.get("/api/dataview/withdraw_list",{params:t})}function D(t){return e.get("/statistics/street_currday_order_count",{params:t})}function b(t){return e.post("/api/dataview/login",t)}function j(t){return e.post("/api/dataview/mechant_login",t)}function L(t){return e.get("/api/dataview/merchant_count_main",{params:t})}function I(t){return e.get("/statistics/order_user_num_count",{params:t})}function N(t){return e.get("/api/dataview/merchant_product_ranking",{params:t})}function O(t){return e.get("/api/dataview/merchant_product_visit",{params:t})}function q(t){return e.get("/api/dataview/merchant_product_cart",{params:t})}function M(t){return e.get("/api/dataview/merchant",{params:t})}export{U as A,P as B,T as C,j as D,b as E,g as a,l as b,d as c,_ as d,f as e,p as f,c as g,m as h,A as i,M as j,L as k,N as l,w as m,O as n,I as o,x as p,q,v as r,D as s,h as t,k as u,y as v,E as w,R as x,S as y,C as z};
|