// 引入 request 文件
import request from '@/common/api/request.js'

import {urlAccount,urlProduct,urlOrder} from '@/common/api/apiPrve.js'

//获取商品列表数据
export const APIproductqueryProduct = (data) => {
	return request({
		url: urlProduct + '/user/product/miniApp/home/queryProduct',
		method: 'get',
		data: data
	})
}

//小程序点餐-热销商品查询
export const productminiApphotsquery = (data) => {
	return request({
		url: urlProduct + '/user/product/miniApp/hots/query',
		method: 'get',
		data: data
	})
}

//小程序点餐-分组商品列表
export const APIgroupquery = (data) => {
	return request({
		url: urlProduct + '/user/product/miniApp/group/query',
		method: 'get',
		data: data
	})
}

//小程序点餐-分组商品列表
export const APIminiAppinfo = (data) => {
	return request({
		url: urlProduct + '/user/product/miniApp/info/' + data,
		method: 'get'
	})
}

//小程序点餐-分组商品列表
export const APIminiAppskuinfo = (data) => {
	return request({
		url: urlProduct + '/user/product/miniApp/sku/info',
		method: 'get',
		data: data
	})
}

//获取相关推荐商品
export const productRelated = (data) => {
	return request({
		url: urlProduct + '/user/product/related/'+data.id,
		method: 'get',
		data: data
	})
}

//获取相关推荐商品
export const getConsStock = (data) => {
	return request({
		url: urlProduct + '/user/product/consStock',
		method: 'get',
		data: data
	})
}

