123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- import { CRequest } from "./request"
- import Global from "@/common/global"
- const proxyApi = Global.getIsDev ? '/api' : 'https://open.luojigou.vip/'
- /**
- * @description 列表查询学段-不包含禁用状态
- * @url /gamecontest/admin/semester/list
- *
- */
- export async function getSectionExcludState () {
- return CRequest<API.ResponseFormat>(`/gamecontest/admin/semester/list`, {
- method: "GET"
- })
- }
- /**
- * @description 创建学段
- * @url /gamecontest/admin/semester/save
- * @method post
- *
- */
- export async function addSection (
- params: {
- semesterName: string,
- semesterDescription: string
- },
- options?: any
- ) {
- return CRequest<API.ResponseFormat>(`/gamecontest/admin/semester/save`, {
- method: "POST",
- data: params,
- ...options
- })
- }
- /**
- * @description 更新学段
- * @url /gamecontest/admin/semester/update
- * @method put
- *
- */
- export async function updateSection (
- params: Partial<Pick<API.Section, "semesterName" | "semesterDescription" | "id">>,
- options?: any
- ) {
- return CRequest<API.ResponseFormat>(`/gamecontest/admin/semester/update`, {
- method: "PUT",
- data: params,
- ...options
- })
- }
- /**
- * @description 操作学段
- * @param status -1 删除 0 禁用 1 正常
- */
- export async function opSection (
- params: {
- id: string,
- status: API.SectionState
- },
- ) {
- return CRequest<API.ResponseFormat>(`/gamecontest/admin/semester/status`, {
- method: "PUT",
- params: params,
- })
- }
|