import { Service } from '@/Service/Service';
export class AddressService {
	/**
	 * 获取用户收货地址列表
	 * GET /api/Address/GetUserAddressList
	 */
	static async GetUserAddressList(page : number) {
		return await Service.Request("/api/Address/GetUserAddressList", "GET", { page });
	}

	/**
	 * 获取用户全部收货地址列表
	 * GET /api/Address/GetUserAllAddressList
	 */
	static async GetUserAllAddressList() {
		return await Service.Request("/api/Address/GetUserAllAddressList", "GET", {});
	}

	/**
	 * 收货地址详情
	 * GET /api/Address/GetUserAddressInfo
	 */
	static async GetUserAddressInfo(addressId : string) {
		return await Service.Request("/api/Address/GetUserAddressInfo", "GET", { addressId });
	}

	/**
	 * 添加收货地址
	 * POST /api/Address/AddUserAddress
	 */
	static async AddUserAddress(data : Record<string, any>) {
		return await Service.Request("/api/Address/AddUserAddress", "POST", data);
	}

	/**
	 * 删除地址
	 * POST /api/Address/DelUserAddress
	 */
	static async DelUserAddress(data : Record<string, any>) {
		return await Service.Request("/api/Address/DelUserAddress", "POST", data);
	}
}