import axios from '@/utils/http';
const base = process.env.VUE_APP_SERVER + '/order';
const order = {
    get(id: number = 0) {
        return axios.get(`${base}/get?id=${id}`, {
        });
    },
    list(page: number = 1, params: any) {
        return axios.post(`${base}/list`, {
            page,
            page_size: 20,
            ...params,
        });
    },
    add(planId: number, method: number, params: any) {
        return axios.post(`${base}/add`, {
            plan_id: planId,
            method,
            device: 1,
            return_url: 'http://www.baidu.com',
            promo_code: '',
        });
    },
};
export default order;
