import request from '@/utils/request'
import request2 from '@/utils/request2'
import qs from 'qs'
let api = '/api-web'


// 生成链接
export function addReplacement (data) {
  return request2({
    url: api + `/replacementInstrumentCooperation/add`,
    method: 'post',
    params:{},
    requestType: 'form',
    data,

  })
}

// 生成链接
export function updateReplacement (data) {
  return request2({
    url: api + `/replacementInstrumentCooperation/update`,
    method: 'post',
    params:{},
    requestType: 'form',
    data,

  })
}

// 查询活动列表
export function getReplacementList (data) {
  return request2({
    url: api + `/replacementInstrumentCooperation/queryPage`,
    method: 'get',
    params: data,
    requestType: 'form',
  })
}

// 开启缴费
export function openPayReplacement (data) {
  return request2({
    url: api + `/replacementInstrumentCooperation/openPay`,
    method: 'post',
    params:{},
    data,
    requestType: 'form',
  })
}

// 根据声部查询品牌乐器
export function getInstrumentSoundList (data) {
  return request2({
    url: api + `/replacementInstrument/queryPage`,
    method: 'get',
    params: data,
    requestType: 'form',
  })
}

// 查询详情页列表
export function getInstrumentActivityList (data) {
  return request2({
    url: api + `/replacementInstrumentActivity/queryPage`,
    method: 'get',
    params: data,
    requestType: 'form',
  })
}

// 修改声部和乐器
export function updateInstrumentActivity (data) {
  return request2({
    url: api + `/replacementInstrumentActivity/update`,
    method: 'post',
    data,
    requestType: 'form',
  })
}

export function questionnaireUserResultQueryPage (data) {
  return request2({
    url: api + `/questionnaireUserResult/queryPage`,
    method: 'get',
    params: data,
  })
}

export function questionnaireQuestionQueryPage (data) {
  return request2({
    url: api + `/questionnaireQuestion/queryPage`,
    method: 'get',
    params: data,
  })
}


export function updateOpenFlag (data) {
  return request2({
    url: api + `/replacementInstrumentActivity/updateOpenFlag`,
    method: 'post',
    data,
    requestType: 'form',
  })
}

