/*
 * @Author: wj 1454560336@qq.com
 * @Date: 2023-12-22 14:17:16
 * @LastEditors: wenjie 1454560336@qq.com
 * @LastEditTime: 2024-03-25 19:30:59
 * @FilePath: \admin-manage\src\api\study.js
 * @Description: 
 * 
 * Copyright (c) 2023 by ${git_name_email}, All Rights Reserved. 
 */
import request from '@/utils/request'
// 栏目列表
export function getList(params) {
  return request({
    url: '/zswl-cloud-shop/column/search',
    method: 'get',
    params
  })
}

//获取所有栏目
export function getAllColumn(params) {
  return request({
    url: '/zswl-cloud-shop/column/data',
    method: 'get',
    params
  })
}

// 层级详情
export function get(params) {
    return request({
      url: '/zswl-cloud-shop/column/get',
      method: 'get',
      params
    })
}

// 详情
export function detail(params) {
    return request({
      url: '/zswl-cloud-shop/column/detail',
      method: 'get',
      params
    })
}

// 删除
export function del(params) {
    return request({
      url: '/zswl-cloud-shop/column/del',
      method: 'get',
      params
    })
}

// 新增编辑栏目
export function addOrUpdate(data) {
    return request({
      url: '/zswl-cloud-shop/column/addOrUpdate',
      method: 'post',
      data
    })
}

// 获取社区标签列表
export function getTabList(params) {
    return request({
      url: '/zswl-cloud-shop/community/search',
      method: 'get',
      params
    })
}

// 新增编辑社区标签
export function addOrUpdateTab(data) {
  return request({
    url: '/zswl-cloud-shop/community/addOrUpdate',
    method: 'post',
    data
  })
}

// 删除社区标签
export function delTab(params) {
  return request({
    url: '/zswl-cloud-shop/community/del',
    method: 'get',
    params
  })
}

// 社区标签选择
export function getTab(params) {
  return request({
    url: '/zswl-cloud-shop/community/get',
    method: 'get',
    params
  })
}


// 获取社区列表
export function getCommunityList(params) {
  return request({
    url: '/zswl-cloud-shop/communityItem/search',
    method: 'get',
    params
  })
}

// 新增编辑
export function addOrUpdateCommunity(data) {
  return request({
    url: '/zswl-cloud-shop/communityItem/addOrUpdate',
    method: 'post',
    data
  })
}

// 置顶
export function top(params) {
  return request({
    url: '/zswl-cloud-shop/communityItem/top',
    method: 'get',
    params
  })
}

// 显示隐藏
export function operate(params) {
  return request({
    url: '/zswl-cloud-shop/communityItem/operate',
    method: 'get',
    params
  })
}

// 删除帖子
export function delCommunity(params) {
  return request({
    url: '/zswl-cloud-shop/communityItem/del',
    method: 'get',
    params
  })
}

// 帖子详情
export function detailCommunity(params) {
  return request({
    url: '/zswl-cloud-shop/communityItem/webDetail',
    method: 'get',
    params
  })
}

// 题库列表
export function paperList(params) {
  return request({
    url: '/zswl-cloud-shop/paper/search',
    method: 'get',
    params
  })
}

// 试卷发布、取消发布
export function publish(params) {
  return request({
    url: '/zswl-cloud-shop/paper/publish',
    method: 'get',
    params
  })
}

// 删除题库
export function delPaper(params) {
  return request({
    url: '/zswl-cloud-shop/paper/delPaper',
    method: 'get',
    params
  })
}

// 添加、修改题库
export function addOrUpdatePaper(data) {
  return request({
    url: '/zswl-cloud-shop/paper/addOrUpdate',
    method: 'post',
    data
  })
}

// 获取试题
export function getTestList(params) {
  return request({
    url: '/zswl-cloud-shop/paperQuestions/search',
    method: 'get',
    params
  })
}

// 添加、修改试题
export function addOrUpdateQuestions(data) {
  return request({
    url: '/zswl-cloud-shop/paperQuestions/addOrUpdate',
    method: 'post',
    data
  })
}

// 删除试题
export function delQuestions(params) {
  return request({
    url: '/zswl-cloud-shop/paperQuestions/del',
    method: 'get',
    params
  })
}

// 课程列表
export function courseList(params) {
  return request({
    url: '/zswl-cloud-shop/course/search',
    method: 'get',
    params
  })
}

// 课程发布
export function operateByStatus(params) {
  return request({
    url: '/zswl-cloud-shop/course/operateByStatus',
    method: 'get',
    params
  })
}

// 课程显示隐藏
export function operateByState(params) {
  return request({
    url: '/zswl-cloud-shop/course/operateByState',
    method: 'get',
    params
  })
}

// 课程删除
export function delCourse(params) {
  return request({
    url: '/zswl-cloud-shop/course/del',
    method: 'get',
    params
  })
}

// 课程删除
export function courseDetail(params) {
  return request({
    url: '/zswl-cloud-shop/course/detail',
    method: 'get',
    params
  })
}

// 课程添加编辑
export function addOrUpdateCourse(data) {
  return request({
    url: '/zswl-cloud-shop/course/addOrUpdate',
    method: 'post',
    data
  })
}

// 获取结果配置
export function getResult(params) {
  return request({
    url: '/zswl-cloud-shop/paperResult/search',
    method: 'get',
    params
  })
}

// 结果配置
export function setResult(data) {
  return request({
    url: '/zswl-cloud-shop/paperResult/addOrUpdate',
    method: 'post',
    data
  })
}


// 预约列表
export function reservationLog(params) {
  return request({
    url: '/zswl-cloud-shop/reservationLog/search',
    method: 'get',
    params
  })
}

// 预约状态修改
export function reservationOperate(params) {
  return request({
    url: '/zswl-cloud-shop/reservationLog/operate',
    method: 'get',
    params
  })
}
// 获取包括id得栏目
// community/getAll
export function getAllColumnId(params) {
  return request({
    url: '/zswl-cloud-shop/community/getAll',
    method: 'get',
    params
  })
}