import request from '@/utils/request'

// list
export function getList(query) {
	return request({
		url: `/shian/cpxx/list`,
		method: 'get',
		params: query
	})
}
// info
export function getinfo(id) {
	return request({
		url: `/shian/cpxx/${id}`,
		method: 'get'
	})
}
//根据产品id获得评分
export function gardeFood(data){
	return request({
		url:`/shian/evaluation/findByProductId?productId=${data}`,
		method:'get',
	})
}
//根据食品生产产品的社会信用代码关联社会评价表
export function prejectData(e){
	return request({
		url:`/shian/cpxx/getgrade?code=${e}`,
		method:'get',
	})
}
//获取食品列表
export function foodList(data){
	return request({
		url:'/shianliaoning/remote/getSourceInfo',
		method:'post',
		data
	})
}
//获取食品详情
export function foodListDetails(data){
	return request({
		url:'/shianliaoning/remote/getFoodList',
		method:'post',
		data
	})
}
//获取食品检测信息
export function foodDetectionMsg(data){
	return request({
		url:'/shianliaoning/remote/getFoodDetection',
		method:'post',
		data
	})
}
//根据溯源码获取生产网点列表
export function productionList(id){
	return request({
		url:`/shianliaoning/remote/getProductionPoint?sourceCode=${id}`,
		method:'get',
	})
}
//根据溯源码获取销售网点列表
export function marketList(id){
	return request({
		url:`/shianliaoning/remote/getSalePoint?sourceCode=${id}`,
		method:'get',
	})
}
//根据溯源码查询合格证
export function queryCertificate(data){
	return request({
		url:`/shianliaoning/remote/findCertification`,
		method:'post',
		data
	})
}
