import https from '@/plugins/luch-request_0.0.7/request'

/** *
 * 商品详情 m
 */
export const getDetail = data => {
	return https.get('/goods/detail', data)
}

// =====================  B 端 ========================

/** *
 * 获取分类的商品 b
 */
export const getCategoryGoodsB = data => {
	return https.get('/category/goods-list', data)
}

/** *
 * 商品-列表 b
 */
export const getListB = data => {
	return https.get('/goods/list', data)
}

/** *
 * 商品-查看 b
 */
export const getDetailB = data => {
	return https.get('/goods/detail', data)
}

/** *
 * 商品-添加 b
 */
export const addB = data => {
	return https.post('/goods/add', data)
}

/** *
 * 商品-删除 b
 */
export const delB = data => {
	return https.get('/goods/delete', data)
}

/** *
 * 商品-修改 b
 */
export const updateB = data => {
	return https.post('/goods/update', data)
}

/** *
 * 商品-上下架 b
 */
export const changeStatusB = data => {
	return https.get('/goods/change-status', data)
}

/** *
 * 商品-查看短链接 b
 */
export const shortUrlB = data => {
	return https.get('/goods/short-url', data)
}

/** *
 * 商品-发送链接 b
 */
export const sendShortUrlB = data => {
	return https.get('/goods/send-short-url', data)
}

/** *
 * 商品用途-列表（无分页） b
 */
export const usageListB = data => {
	return https.get('/usage/list', data)
}

/** *
 * 商品分类-列表（无分页） b
 */
export const categoryListB = data => {
	return https.get('/category/list', data)
}

/** *
 * 商品分类-查看 b
 */
export const categoryDetB = data => {
	return https.get('/category/detail', data)
}

/** *
 * 商品分类-添加 b
 */
export const categoryAddB = data => {
	return https.post('/category/add', data)
}

/** *
 * 商品分类-更新 b
 */
export const categoryUpdateB = data => {
	return https.post('/category/update', data)
}

/** *
 * 商品分类-更新 b
 */
export const categoryDelB = data => {
	return https.get('/category/delete', data)
}

/** *
 * 商品分类-启用停用 b
 */
export const categoryStatusB = data => {
	return https.get('/category/change-status', data)
}

/** *
 * 商品管理-运费设置 b
 */
export const freightSet = data => {
	return https.get('/merchant/freight-setting', data)
}

/** *
 * 商品管理-涨价设置 b
 */
export const getRise = data => {
	return https.get('/goods/setting', data)
}

/** *
 * 商品管理-更新涨价 b
 */
export const updateRise = data => {
	return https.post('/goods/update-rise', data)
}
