import request from '@/utils/request.js'

// 作品详情
export const ysgc_detail = (data = {}) => {
  return request({
    url: '/ysgc/zp/detail',
    data,
  })
}

// 作品评论列表
export const ysgc_evaluate = (data = {}) => {
  return request({
    url: '/ysgc/zp_evaluate/index',
    data,
  })
}

// 作品评论添加
export const ysgc_addEvaluate = (data = {}) => {
  return request({
    url: '/ysgc/zp_evaluate/add',
    data: {
      issubmit: "1",
      ysgc_zp_evaluate: {
        yze_user_realname: data.yze_user_realname,
        yze_content: data.yze_content,
        yz_id: data.yz_id,
        yze_star: data.yze_star,
        yze_type: "1"

      }
    }
  })
}

//点赞
export const jszp_like_add = (data = {}) =>
  request({
    url: '/ysgc/zp_like/add',
    data: {
      issubmit: "1",
      ysgc_zp_like: {
        yzl_keyword: data.yzl_keyword,
        yz_id: data.yz_id
      }
    }
  })

export const jszp_like_del = (data = {}) =>
  request({
    url: '/ysgc/zp_like/delete',
    data: {
      yzl_id: data.yzl_id,
      yz_id: data.yz_id
    }
  })
//收藏
export const jszp_fav_add = (data = {}) =>
  request({
    url: '/ysgc/zp_fav/add',
    data: {
      issubmit: "1",
      ysgc_zp_fav: {
        yzf_keyword: data.yzf_keyword,
        yz_id: data.yz_id
      }
    }
  })
export const jszp_fav_del = (data = {}) =>
  request({
    url: '/ysgc/zp_fav/delete',
    data: {
      yzf_id: data.yzf_id,
      yz_id: data.yz_id
    }
  })
//用户信息
export const userInfoDetail = (data = {}) => {
  return request({
    url: '/user/main/user_info',
    data
  })
}

//关注// 关注接口
export const zxxx_attention_add = (data = {}) => {
  return request({
    url: "/user/watch/add",
    data,
  });
}

// 取消关注
export const zxxx_attention_del = (data = {}) => {
  return request({
    url: "/user/watch/delete",
    data,
  });
}
