import request from '@/utils/request';

/**
 *@description 动态评论 - 查询列表
 */
export function clientCommentList(data) {
  return request({
    url: '/maintain/client/comment/page',
    method: 'get',
    data: data,
    headers: {
      'content-type': 'application/x-www-form-urlencoded',
    },
  });
}

// 动态评论 - 新增
export function addClientComment(data) {
  return request({
    url: `/maintain/client/comment/add`,
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json',
    },
  });
}

/**
 *@description 订单通知接口 - 查看是否有系统新消息
 */
export function getIsHaveNewInform(data) {
  return request({
    url: '/maintain/new/inform',
    method: 'get',
    data: data,
    headers: {
      'content-type': 'application/x-www-form-urlencoded',
    },
  });
}

/**
 *@description 订单通知接口 - 获取用户的订单通知列表
 */
export function getOrderInform(data) {
  return request({
    url: '/maintain/order/inform',
    method: 'get',
    data: data,
    headers: {
      'content-type': 'application/x-www-form-urlencoded',
    },
  });
}

/**
 *@description 订单通知接口 - 获取用户的评价通知列表
 */
export function getOrderCommentInform(data) {
  return request({
    url: '/maintain/comment/inform',
    method: 'get',
    data: data,
    headers: {
      'content-type': 'application/x-www-form-urlencoded',
    },
  });
}

/**
 *@description 订单通知接口 - 获取用户的点赞回复通知列表
 */
export function getEvaluateInform(data) {
  return request({
    url: '/maintain/evaluate/inform',
    method: 'get',
    data: data,
    headers: {
      'content-type': 'application/x-www-form-urlencoded',
    },
  });
}

/**
 *@description 订单通知接口 - 获取用户的优惠券通知列表
 */
export function getCouponInform(data) {
  return request({
    url: '/maintain/coupon/inform',
    method: 'get',
    data: data,
    headers: {
      'content-type': 'application/x-www-form-urlencoded',
    },
  });
}

/**
 *@description 订单通知接口 - 将新系统通知标识未读改为已读
 */
export function clearInformFlag(data) {
  return request({
    url: '/maintain/system/inform/flag',
    method: 'PUT',
    data: data,
    headers: {
      'content-type': 'application/x-www-form-urlencoded',
    },
  });
}
