import Request from '../common/request.js';
let request = new Request().http

export function getDicts(data) {
	return request('/app/common/getDicts', data, 'GET');
}


export function getCanvas() {
	return request('/app/index/getCanvas', null, 'GET');
}

export function getMenu() {
	return request('/app/index/getMenu', null, 'GET');
}

export function getIndexData(data) {
	return request('/app/index/getIndexData', data, 'GET');
}
export function getTuiArticle(data) {
	return request('/app/index/getTuiArticle', data, 'GET');
}
export function getTuiDoctor(data) {
	return request('/app/index/getTuiDoctor', data, 'GET');
}



export function getTuiDoctorOrder(data) {
	return request('/app/index/getTuiDoctorOrder', data, 'GET');
}

// 商品搜索瀑布流
export function productWaterfall(data) {
	return request('/app/product/getProductWaterfall', data, 'POST');
}

// 获取首页推荐商品
export function recommendProduct() {
	return request('/app/product/getRecommendProduct', null, 'GET');
}
// 添加购物车
export function addCart(data) {
	return request('/app/product/addCart', data, 'POST');
}
// 删除购物车
export function delCart(data) {
	return request('/app/product/delCart', data, 'POST');
}
// 改变购物车数量
export function cartNum(data) {
	return request('/app/product/cartNum', data, 'POST');
}
// 获取商品购物车数量
export function getCartCount() {
	return request('/app/product/getCartCount', null, 'GET');
}
// 获取购物车列表
export function getCarts() {
	return request('/app/product/getCarts', null, 'GET');
}

// 获取我的频道
export function getMyProductCate() {
	return request('/app/product/getMyProductCate', null, 'GET');
}
// 添加我的频道
export function channelAdd(data) {
	return request(`/app/product/channelAdd/${data}`, data, 'POST');
}
// 移除我的频道
export function channelDelete(data) {
	return request(`/app/product/channelDelete/${data}`, data, 'POST');
}

// 获取商品规格列表
export function getProductValues(data) {
	return request(`/app/product/getProductValues?productId=${data}`, data, 'GET');
}