import { axios } from '@/utils/request'

// 合作商
export const sellerList = params => {
  return axios.request({
    url: `/seller/queryList`,
    method: 'post',
    data: {}
  })
}
// 重置密码
export const resetPSD = params => {
  return axios({
    url: 'sleler/user/resetPwd',
    data: params,
    method: 'POST'
  })
}

// 获取列表数据
export const getPowerUserList = params => {
  const url = `sleler/user/queryLike/${params.pageNo}/${params.pageSize}`
  delete params.pageNo
  delete params.pageSize
  return axios({
    url: url,
    data: params,
    method: 'POST'
  })
}

// 改变权限状态接口
export const updateEnableStatus = params => {
  return axios({
    url: `sleler/user/enable/${params.id}/${params.flag}`,
    data: {},
    method: 'get'
  })
}

// 删除用户接口
export const delectUserPower = params => {
  return axios({
    url: `sleler/user/delete/${params.id}`,
    data: {},
    method: 'get'
  })
}

// 新增/编辑保存接口
export const saveUserPower = params => {
  return axios({
    url: 'sleler/user/save',
    data: params,
    method: 'POST'
  })
}

// 获取角色列表接口
// export const getRoleList = params => {
//   return axios({
//     url: 'sleler/role/findAll',
//     data: params,
//     method: 'POST'
//   })
// }

// 编辑查详情
export const slelerDetails = (params) => {
  const url = `sleler/user/findById/${params.id}`
  return axios({
    url: url,
    data: params,
    method: 'get'
  })
}

// 获取用户二维码
export const qRCode = (params) => {
  const url = `customer/simpleEncodeUserInfo/${params.id}`
  return axios({
    url: url,
    data: params,
    method: 'get'
  })
}
