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

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

export function adminShopList(data, urlType = 'account') {
	return request({
		url: `${urlType}/admin/shopInfo`,
		method: "get",
		data: {
			...data
		}
	})
}


/**
 * 修改店铺详情
 * @returns
 */
export function editShopInfo(data, urlType = 'account') {
	return request({
		url: `${urlType}/admin/shopInfo`,
		method: "PUT",
		data: {
			...data
		}
	})
}

/**
 * 获取当前店铺拓展参数
 * @returns
 */
export function getShopExtend(data, urlType = 'account') {
	return request({
		url: `${urlType}/admin/shopExtend`,
		method: "GET",
		data: {
			...data
		}
	})
}

/**
 * 获取当前店铺拓展参数
 * @returns
 */
export function editShopExtend(data, urlType = 'account') {
	return request({
		url: `${urlType}/admin/shopExtend`,
		method: "PUT",
		data: {
			...data
		}
	})
}

/**
 * 获取门店列表
 * @returns
 */
export function getShopList(data, urlType = 'account') {
	return request({
		url: `${urlType}/admin/shopInfo/branchList`,
		method: "GET",
		data: {
			...data
		}
	})
}
