import request from '@/utils/request'
import { upFilse} from '@/utils/request';

// 获取用户信息
export function getUserInfo(data) {
	return request({
		url: '/api/userinfo',
		method: 'get',
		data
	});
}

// 用户分享图
export function spreadBanner(data) {
	return request({
		url: '/api/spread/banner',
		method: 'get',
		data
	});
}

// 获取地址列表
export function getAddressList(data) {
	return request({
		url: '/api/address/list',
		method: 'get',
		data
	});
}
// 修改地址
export function addressEdit(data) {
	return request({
		url: '/api/address/edit',
		method: 'post',
		data
	});
}
// 删除地址
export function addressDel(data) {
	return request({
		url: '/api/address/del',
		method: 'post',
		data
	});
}
// 设为默认地址
export function setAddressDefault(data) {
	return request({
		url: '/api/address/default/set',
		method: 'post',
		data
	});
}
// 上传文件
export function uploads(data){
	return upFilse({
		url:'/api/upload/image',
		method:'post',
		data
	});
}
