index.js 709 Bytes
Newer Older
1 2 3
import { post } from '@/utils/http'

const baseURL = import.meta.env.DEV ? '/api' : import.meta.env.VITE_HTTP_BASE_URL
Step_by_step's avatar
Step_by_step committed
4 5

const api = {
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
  // 首页查询
  financingCalculator(data = {}) {
    return post(`${baseURL}/app/api/app/financing/calculator`, data)
  },
  planInfo(data = {}) {
    return post(`${baseURL}/app/api/app/repayment/schedule`, data)
  },
  getFormInfo(data = {}) {
    return post(`${baseURL}/app/api/app/trial/file`, data)
  },
  saveInfo(data = {}) {
    return post(`${baseURL}/app/api/app/trial/save`, { userId: window.localStorage.getItem('userId'), ...data })
  },
  deleteInfo(data = {}) {
    return post(`${baseURL}/app/api/app/financing/remove`, data)
  }
Step_by_step's avatar
Step_by_step committed
22 23 24
};

export default api;