import http from '@/http/http.js'
const request = http.request

/**
 * 获取店铺用户概述信息
 * @returns
 */
export function shopUserSummary(data, urlType = 'account') {
	return request({
		url: `${urlType}/admin/shopUser/summary`,
		method: "GET",
		data: {
			...data
		}
	})
}

/**
 * 获取店铺用户列表
 * @returns
 */
export function shopUserList(data, urlType = 'account') {
	return request({
		url: `${urlType}/admin/shopUser`,
		method: "GET",
		data: {
			...data
		}
	})
}

/**
 * 获取店铺用户详情
 * @returns
 */
export function shopUserDetail(data, urlType = 'account') {
	return request({
		url: `${urlType}/admin/shopUser/detail`,
		method: "GET",
		data: {
			...data
		}
	})
}

/**
 * 获取店铺用户新增
 * @returns
 */
export function shopUserAdd(data, urlType = 'account') {
	return request({
		url: `${urlType}/admin/shopUser`,
		method: "POST",
		data: {
			...data
		}
	})
}

/**
 * 店铺用户修改
 * @returns
 */
export function shopUserPut(data, urlType = 'account') {
	return request({
		url: `${urlType}/admin/shopUser`,
		method: "PUT",
		data: {
			...data
		}
	})
}

/**
 * 店铺用户余额修改
 * @returns
 */
export function shopUserMoney(data, urlType = 'account') {
	return request({
		url: `${urlType}/admin/shopUser/money`,
		method: "PUT",
		data: {
			...data
		}
	})
}
