UNPKG

test-iki-mini-app

Version:

ứng dựng bán hàng trên mini app z a l o

43 lines (40 loc) 980 B
import { callApi } from "../api/index.jsx"; import { constants as c } from "../constants/index.jsx"; const changePaymentOrder = (data, order_code) => { return callApi( `/customer/${c.STORE_CODE}/carts/orders/change_payment_method/${order_code}`, "put", data ); }; const getOrdersList = (params) => { return callApi( `/customer/${c.STORE_CODE}/carts/orders${params ? `?${params}` : ""}`, "get", null ); }; const getOrdersDetail = (orderCode) => { return callApi( `/customer/${c.STORE_CODE}/carts/orders/${orderCode}`, "get", null ); }; const cancelOrder = (data) => { return callApi(`/customer/${c.STORE_CODE}/carts/orders/cancel`, "post", data); }; const getRecordsOrder = (orderCode) => { return callApi( `/customer/${c.STORE_CODE}/carts/orders/status_records/${orderCode}`, "get", null ); }; export const order = { changePaymentOrder, getOrdersList, getOrdersDetail, cancelOrder, getRecordsOrder, };