import request from '../request'

//发现模块
const appList = {
	/**
	 * 按品类查询商家列表
	 * @param {Object} id
	 * @param {Object} params
	 */
	getTypeAppList(id,params) {
		return request({
			url: `/student/applet/customer/getCustomerListByProductId/${id}`,
			method: 'get',
			params
		})
	},
	/**
	 * 查询用户收藏列表
	 * @param {Object} params
	 */
	collectionList(params) {
		return request({
			url: '/student/applet/collection/collectionList',
			method: 'get',
			params
		})
	},
	/**
	 * 查询用户浏览记录
	 * @param {Object} params
	 */
	getBrowseRecordInfoList(params) {
		return request({
			url: '/student/applet/record/info/getBrowseRecordInfoList',
			method: 'get',
			params
		})
	},
	/**
	 * 查询品类列表
	 * @param {Object} params
	 */
	typeList(params) {
		return request({
			url: '/student/applet/product/info/list',
			method: 'get',
			params
		})
	},
	/**
	 * 收藏商家
	 * @param {Object} id
	 */
	addFavorites(id) {
		return request({
			url: `/student/applet/collection/collectionBusiness/${id}`,
			method: 'put'
		})
	},
	/**
	 * 删除收藏
	 * @param {Object} ids
	 */
	delFavorites(ids) {
		return request({
			url: `/student/applet/collection/cancelCollection/${ids}`,
			method: 'delete'
		})
	},
	/**
	 * 新增记录
	 * @param {Object} id
	 */
	BrowseRecordAdd(id) {
		return request({
			url: `/student/applet/record/info/insertBrowseRecord/${id}`,
			method: 'put'
		})
	},
	/**
	 * 删除记录
	 * @param {Object} ids
	 */
	BrowseRecordDel(ids) {
		return request({
			url: `/student/applet/record/info/${ids}`,
			method: 'delete'
		})
	},
	/**
	 * 查询轮播图列表
	 */
	getCarouselChartList() {
		return request({
			url: `/student/applet/homePage/getHomePageDataList`,
			method: 'get'
		})
	}
}


export default appList