You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
shop-app/common/api/base.js

31 lines
791 B

/*
* @Author: ch
* @Date: 2022-04-06 17:29:13
* @LastEditors: ch
* @LastEditTime: 2022-04-15 14:17:14
* @Description: file content
*/
import {ToAsyncAwait, MsbRequestTk} from '@/common/utils';
const BASE_URL = '/mall/base';
/**
* 获取收货地址
*/
export const ApiGetAddress = () =>
ToAsyncAwait(MsbRequestTk.get(`${BASE_URL}/receiveAddress`));
/**
* 新增收货地址
*/
export const ApiPostAddress = (data) =>
ToAsyncAwait(MsbRequestTk.post(`${BASE_URL}/receiveAddress`, data));
/**
* 收货地址修改
*/
export const ApiPutAddress = (data) =>
ToAsyncAwait(MsbRequestTk.put(`${BASE_URL}/receiveAddress`, data));
/**
* 收货删除
*/
export const ApiDeleteAddress = (data) =>
ToAsyncAwait(MsbRequestTk.delete(`${BASE_URL}/receiveAddress?idList=${data.idList}`));