| 123456789101112131415161718192021222324252627282930 |
- import { get, post } from './http';
- const apis = {
- PRE_ONE_KEY: '/api/substituteOrder/preOneKeySubmit',
- COUPON: '/api/coupon/pageMyValidCoupon',
- BILL: '/api/wallet/bill',
- };
- export const preOneKeySubmit = async () => {
- const res = await post(apis.PRE_ONE_KEY);
- return res;
- };
- export const info = async (type: string, loading = false) => {
- const res = await get('/api/wallet/getByType', { type }, { loading });
- return res.data;
- };
- export default {
- preOneKeySubmit,
- info,
- coupons: async (size = 30) => {
- const res = await post(apis.COUPON, { size }, { loading: true });
- return res.data;
- },
- bill: async (current: number, size: number, walletType: string, type: string) => {
- const res = await post(apis.BILL, { current, size, walletType, type });
- return res.data;
- },
- };
|