import request from '@/services/http.request.js'

/* 获取收货地址列表 */
export function fetchAddressList(params) {
	return request({
		url: '/other/findAddress',
		method: 'GET',
		params
	})
}

/* 保存收货地址 */
export function saveAddress(data) {
	return request({
		url: '/other/saveAddress',
		method: 'POST',
		data
	})
}

/* 删除收货地址 */
export function removeAddress(params) {
	return request({
		url: '/other/deleteAddress',
		method: 'GET',
		params
	})
}

/* 设置默认收货地址 */
export function setDefaultAddress(params) {
	return request({
		url: '/other/defaultAddress',
		method: 'GET',
		params
	})
}

/* 获取用户订单分类条数 */
export function fetchUserOrderTotal(params) {
	return request({
		url: '/order/order/total',
		method: 'GET',
		params
	})
}
