import request from '@/utils/request'

// 用户画像列表
export function listUserPortrait(params) {
  return request({
    url: '/app/user/portrait/findList',
    method: 'get',
    params
  })
}

// 获取用户疗法周期详情（cycleName: 具体周期名称）
export function getUserTreatmentCycle(userId, cycleName) {
  return request({
    url: '/app/user/portrait/treatmentCycle/' + userId,
    method: 'get',
    params: cycleName ? { cycleName } : {}
  })
}

// 批量绑定/撤销标签（contentId: 视频id集合, tagId: 标签id集合, contentType: 固定为1）
export function bindUserTag(data) {
  return request({
    url: '/app/user/portrait/bind/tag',
    method: 'post',
    data: data
  })
}

// 修改信息
export function saveEdit(data) {
  return request({
    url: '/app/user/portrait/saveEdit',
    method: 'post',
    data: data
  })
}
