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

// expertId 达人id

// 达人主页
export function expertHomePage(expertId) {
	return request(`/app/store/life/expertHomePage/${expertId}`, {}, 'POST');
}

//关注用户/取消关注
export function follow(data) {
	return request('/app/store/life/follow', data, 'POST');
}

// 内容详情
export function lifeDetail(data) {
	return request('/app/store/life/lifeDetail', data, 'POST');
}

// 内容列表
export function lifeList(data) {
	return request('/app/store/life/lifeList', data, 'POST');
}

// 一级评论列表
export function listRootComments(data) {
	return request('/app/store/life/listRootComments', data, 'POST');
}

//二级评论列表
export function listSubComments(data) {
	return request('/app/store/life/listSubComments', data, 'POST');
}

//发表评论
export function postComment(data) {
	return request('/app/store/life/postComment', data, 'POST');
}

//内容分享
export function share(data) {
	return request('/app/store/life/share', data, 'POST');
}

//内容点赞/取消点赞
export function toggleLike(data) {
	return request('/app/store/life/toggleLike', data, 'POST');
}
//内容收藏/取消收藏接口
export function toggleCollection(data) {
	return request('/app/store/life/toggleCollection', data, 'POST');
}
//评论点赞
export function toggleLikeComments(data) {
	return request('/app/store/life/toggleLikeComments', data, 'POST');
}





/** 商品评价 **/

// 新增一级评论
export function addComment(data) {
	return request('/app/store/productComment/add', data, 'POST');
}
// 点赞/取消点赞
export function like(data) {
	return request('/app/store/productComment/like', data, 'POST');
}
// 查询评论列表
export function page(data) {
	return request('/app/store/productComment/page', data, 'POST');
}
//回复评论
export function reply(data) {
	return request('/app/store/productComment/reply', data, 'POST');
}
// 查询店铺评价汇总
export function summary(storeId) {
	return request(`/app/store/productComment/store/summary/${storeId}`, data, 'GET');
}
//达人排行榜
export function listCreatorRank(data) {
	return request('/app/store/life/listCreatorRank', data, 'POST');
}