develoop
yh 5 months ago
parent 695d72d132
commit f39d5d0cd6
  1. 2
      .env.production
  2. 3
      .env_1.production
  3. BIN
      dist.zip
  4. 36
      generated/core/ApiError.ts
  5. 31
      generated/core/ApiRequestOptions.ts
  6. 12
      generated/core/ApiResult.ts
  7. 221
      generated/core/CancelablePromise.ts
  8. 50
      generated/core/OpenAPI.ts
  9. 591
      generated/core/request.ts
  10. 139
      generated/index.ts
  11. 9
      generated/models/BaseResponse.ts
  12. 11
      generated/models/BaseResponse_CoursesDTO_.ts
  13. 11
      generated/models/BaseResponse_List_CourseObjectivesTreeVO_.ts
  14. 11
      generated/models/BaseResponse_List_CourseResources_.ts
  15. 11
      generated/models/BaseResponse_List_LearningRecords_.ts
  16. 11
      generated/models/BaseResponse_List_ObjectivesType_.ts
  17. 11
      generated/models/BaseResponse_List_TeacherInfVO_.ts
  18. 9
      generated/models/BaseResponse_Map_string_object_.ts
  19. 11
      generated/models/BaseResponse_ObjectiveContentKnowVO_.ts
  20. 11
      generated/models/BaseResponse_ObjectiveContents_.ts
  21. 11
      generated/models/BaseResponse_PageDTO_CoursesVO_.ts
  22. 11
      generated/models/BaseResponse_Page_.ts
  23. 11
      generated/models/BaseResponse_Page_CourseFavourDetailVO_.ts
  24. 11
      generated/models/BaseResponse_Page_CourseResources_.ts
  25. 9
      generated/models/BaseResponse_boolean_.ts
  26. 9
      generated/models/BaseResponse_long_.ts
  27. 9
      generated/models/BaseResponse_string_.ts
  28. 9
      generated/models/CommonResult.ts
  29. 11
      generated/models/CommonResult_UmsAdmin_.ts
  30. 9
      generated/models/CommonResult_string_.ts
  31. 7
      generated/models/CourseFavourAddRequest.ts
  32. 5
      generated/models/CourseFavourAllRequest.ts
  33. 33
      generated/models/CourseFavourDetailVO.ts
  34. 13
      generated/models/CourseFavourQueryRequest.ts
  35. 35
      generated/models/CourseObjectivesDTO.ts
  36. 85
      generated/models/CourseObjectivesTreeVO.ts
  37. 19
      generated/models/CourseResources.ts
  38. 7
      generated/models/CourseThumbAddRequest.ts
  39. 123
      generated/models/CoursesDTO.ts
  40. 83
      generated/models/CoursesVO.ts
  41. 14
      generated/models/Know.ts
  42. 9
      generated/models/KnowFavourAddRequest.ts
  43. 8
      generated/models/KnowQueryRequest.ts
  44. 13
      generated/models/KnowRequest.ts
  45. 7
      generated/models/KnowThumbAddRequest.ts
  46. 14
      generated/models/KnowupdateRequest.ts
  47. 33
      generated/models/LearningRecords.ts
  48. 15
      generated/models/ObjectiveContentKnowDTO.ts
  49. 31
      generated/models/ObjectiveContentKnowVO.ts
  50. 21
      generated/models/ObjectiveContents_.ts
  51. 19
      generated/models/ObjectivesType_.ts
  52. 7
      generated/models/OrderItem.ts
  53. 25
      generated/models/Page.ts
  54. 29
      generated/models/PageDTO_CoursesVO_.ts
  55. 27
      generated/models/Page_CourseFavourDetailVO_.ts
  56. 27
      generated/models/Page_CourseResources_.ts
  57. 7
      generated/models/ResourceFavourAddRequest.ts
  58. 15
      generated/models/ResourceFavourQueryRequest.ts
  59. 7
      generated/models/ResourceThumbAddRequest.ts
  60. 9
      generated/models/StudentCoursesDTO.ts
  61. 19
      generated/models/TeacherInfVO.ts
  62. 19
      generated/models/UmsAdmin.ts
  63. 13
      generated/models/UmsAdminParam.ts
  64. 41
      generated/models/UmsStudentAndTeacherDTO.ts
  65. 27
      generated/models/UpdateAdminPasswordParam.ts
  66. 184
      generated/services/CourseResourceControllerService.ts
  67. 82
      generated/services/FavourInformationControllerService.ts
  68. 97
      generated/services/KnowControllerService.ts
  69. 186
      generated/services/LearningRecordsControllerService.ts
  70. 104
      generated/services/ResourceControllerService.ts
  71. 186
      generated/services/SeCourseFavourControllerService.ts
  72. 96
      generated/services/SeCourseThumbControllerService.ts
  73. 52
      generated/services/SeKnowFavourControllerService.ts
  74. 52
      generated/services/SeKnowThumbControllerService.ts
  75. 98
      generated/services/SeResourceFavourControllerService.ts
  76. 52
      generated/services/SeResourceThumbControllerService.ts
  77. 1012
      generated/services/Service.ts
  78. 520
      generated/services/UmsAdminControllerService.ts
  79. 2
      package.json
  80. 4
      src/api/record.js
  81. 16
      src/api/user/crouse.js
  82. 6
      src/api/user/index.ts
  83. 18
      src/api/user/user.js

@ -1,3 +1,3 @@
NODE_ENV = 'production'
VITE_APP_TITLE = '无糖运营平台'
VITE_APP_BASE_API = '/prod-api'
# VITE_APP_BASE_API = '/prod-api'

@ -1,3 +1,2 @@
NODE_ENV = 'production'
VITE_APP_TITLE = '无糖运营平台'
VITE_APP_BASE_API = '/prod-api'
VITE_APP_TITLE = '无糖运营平台'

Binary file not shown.

@ -2,28 +2,24 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { ApiRequestOptions } from './ApiRequestOptions'
import type { ApiResult } from './ApiResult'
import type { ApiRequestOptions } from './ApiRequestOptions';
import type { ApiResult } from './ApiResult';
export class ApiError extends Error {
public readonly url: string
public readonly status: number
public readonly statusText: string
public readonly body: any
public readonly request: ApiRequestOptions
public readonly url: string;
public readonly status: number;
public readonly statusText: string;
public readonly body: any;
public readonly request: ApiRequestOptions;
constructor(
request: ApiRequestOptions,
response: ApiResult,
message: string,
) {
super(message)
constructor(request: ApiRequestOptions, response: ApiResult, message: string) {
super(message);
this.name = 'ApiError'
this.url = response.url
this.status = response.status
this.statusText = response.statusText
this.body = response.body
this.request = request
}
this.name = 'ApiError';
this.url = response.url;
this.status = response.status;
this.statusText = response.statusText;
this.body = response.body;
this.request = request;
}
}

@ -3,22 +3,15 @@
/* tslint:disable */
/* eslint-disable */
export type ApiRequestOptions = {
readonly method:
| 'GET'
| 'PUT'
| 'POST'
| 'DELETE'
| 'OPTIONS'
| 'HEAD'
| 'PATCH'
readonly url: string
readonly path?: Record<string, any>
readonly cookies?: Record<string, any>
readonly headers?: Record<string, any>
readonly query?: Record<string, any>
readonly formData?: Record<string, any>
readonly body?: any
readonly mediaType?: string
readonly responseHeader?: string
readonly errors?: Record<number, string>
}
readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH';
readonly url: string;
readonly path?: Record<string, any>;
readonly cookies?: Record<string, any>;
readonly headers?: Record<string, any>;
readonly query?: Record<string, any>;
readonly formData?: Record<string, any>;
readonly body?: any;
readonly mediaType?: string;
readonly responseHeader?: string;
readonly errors?: Record<number, string>;
};

@ -3,9 +3,9 @@
/* tslint:disable */
/* eslint-disable */
export type ApiResult = {
readonly url: string
readonly ok: boolean
readonly status: number
readonly statusText: string
readonly body: any
}
readonly url: string;
readonly ok: boolean;
readonly status: number;
readonly statusText: string;
readonly body: any;
};

@ -3,128 +3,129 @@
/* tslint:disable */
/* eslint-disable */
export class CancelError extends Error {
constructor(message: string) {
super(message)
this.name = 'CancelError'
}
public get isCancelled(): boolean {
return true
}
constructor(message: string) {
super(message);
this.name = 'CancelError';
}
public get isCancelled(): boolean {
return true;
}
}
export interface OnCancel {
readonly isResolved: boolean
readonly isRejected: boolean
readonly isCancelled: boolean
readonly isResolved: boolean;
readonly isRejected: boolean;
readonly isCancelled: boolean;
(cancelHandler: () => void): void
(cancelHandler: () => void): void;
}
export class CancelablePromise<T> implements Promise<T> {
#isResolved: boolean
#isRejected: boolean
#isCancelled: boolean
readonly #cancelHandlers: (() => void)[]
readonly #promise: Promise<T>
#resolve?: (value: T | PromiseLike<T>) => void
#reject?: (reason?: any) => void
constructor(
executor: (
resolve: (value: T | PromiseLike<T>) => void,
reject: (reason?: any) => void,
onCancel: OnCancel,
) => void,
) {
this.#isResolved = false
this.#isRejected = false
this.#isCancelled = false
this.#cancelHandlers = []
this.#promise = new Promise<T>((resolve, reject) => {
this.#resolve = resolve
this.#reject = reject
const onResolve = (value: T | PromiseLike<T>): void => {
if (this.#isResolved || this.#isRejected || this.#isCancelled) {
return
}
this.#isResolved = true
if (this.#resolve) this.#resolve(value)
}
#isResolved: boolean;
#isRejected: boolean;
#isCancelled: boolean;
readonly #cancelHandlers: (() => void)[];
readonly #promise: Promise<T>;
#resolve?: (value: T | PromiseLike<T>) => void;
#reject?: (reason?: any) => void;
constructor(
executor: (
resolve: (value: T | PromiseLike<T>) => void,
reject: (reason?: any) => void,
onCancel: OnCancel
) => void
) {
this.#isResolved = false;
this.#isRejected = false;
this.#isCancelled = false;
this.#cancelHandlers = [];
this.#promise = new Promise<T>((resolve, reject) => {
this.#resolve = resolve;
this.#reject = reject;
const onResolve = (value: T | PromiseLike<T>): void => {
if (this.#isResolved || this.#isRejected || this.#isCancelled) {
return;
}
this.#isResolved = true;
if (this.#resolve) this.#resolve(value);
};
const onReject = (reason?: any): void => {
if (this.#isResolved || this.#isRejected || this.#isCancelled) {
return;
}
this.#isRejected = true;
if (this.#reject) this.#reject(reason);
};
const onCancel = (cancelHandler: () => void): void => {
if (this.#isResolved || this.#isRejected || this.#isCancelled) {
return;
}
this.#cancelHandlers.push(cancelHandler);
};
Object.defineProperty(onCancel, 'isResolved', {
get: (): boolean => this.#isResolved,
});
Object.defineProperty(onCancel, 'isRejected', {
get: (): boolean => this.#isRejected,
});
Object.defineProperty(onCancel, 'isCancelled', {
get: (): boolean => this.#isCancelled,
});
return executor(onResolve, onReject, onCancel as OnCancel);
});
}
const onReject = (reason?: any): void => {
if (this.#isResolved || this.#isRejected || this.#isCancelled) {
return
}
this.#isRejected = true
if (this.#reject) this.#reject(reason)
}
get [Symbol.toStringTag]() {
return "Cancellable Promise";
}
public then<TResult1 = T, TResult2 = never>(
onFulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null,
onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null
): Promise<TResult1 | TResult2> {
return this.#promise.then(onFulfilled, onRejected);
}
public catch<TResult = never>(
onRejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null
): Promise<T | TResult> {
return this.#promise.catch(onRejected);
}
const onCancel = (cancelHandler: () => void): void => {
public finally(onFinally?: (() => void) | null): Promise<T> {
return this.#promise.finally(onFinally);
}
public cancel(): void {
if (this.#isResolved || this.#isRejected || this.#isCancelled) {
return
return;
}
this.#cancelHandlers.push(cancelHandler)
}
Object.defineProperty(onCancel, 'isResolved', {
get: (): boolean => this.#isResolved,
})
Object.defineProperty(onCancel, 'isRejected', {
get: (): boolean => this.#isRejected,
})
Object.defineProperty(onCancel, 'isCancelled', {
get: (): boolean => this.#isCancelled,
})
return executor(onResolve, onReject, onCancel as OnCancel)
})
}
get [Symbol.toStringTag]() {
return 'Cancellable Promise'
}
public then<TResult1 = T, TResult2 = never>(
onFulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null,
onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null,
): Promise<TResult1 | TResult2> {
return this.#promise.then(onFulfilled, onRejected)
}
public catch<TResult = never>(
onRejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null,
): Promise<T | TResult> {
return this.#promise.catch(onRejected)
}
public finally(onFinally?: (() => void) | null): Promise<T> {
return this.#promise.finally(onFinally)
}
public cancel(): void {
if (this.#isResolved || this.#isRejected || this.#isCancelled) {
return
}
this.#isCancelled = true
if (this.#cancelHandlers.length) {
try {
for (const cancelHandler of this.#cancelHandlers) {
cancelHandler()
this.#isCancelled = true;
if (this.#cancelHandlers.length) {
try {
for (const cancelHandler of this.#cancelHandlers) {
cancelHandler();
}
} catch (error) {
console.warn('Cancellation threw an error', error);
return;
}
}
} catch (error) {
console.warn('Cancellation threw an error', error)
return
}
this.#cancelHandlers.length = 0;
if (this.#reject) this.#reject(new CancelError('Request aborted'));
}
this.#cancelHandlers.length = 0
if (this.#reject) this.#reject(new CancelError('Request aborted'))
}
public get isCancelled(): boolean {
return this.#isCancelled
}
public get isCancelled(): boolean {
return this.#isCancelled;
}
}

@ -2,35 +2,31 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { ApiRequestOptions } from './ApiRequestOptions';
import type { ApiRequestOptions } from './ApiRequestOptions'
// @ts-expect-error
import { GET_TKOEN } from '@/utils/token'
type Resolver<T> = (options: ApiRequestOptions) => Promise<T>
type Headers = Record<string, string>
type Resolver<T> = (options: ApiRequestOptions) => Promise<T>;
type Headers = Record<string, string>;
export type OpenAPIConfig = {
BASE: string
VERSION: string
WITH_CREDENTIALS: boolean
CREDENTIALS: 'include' | 'omit' | 'same-origin'
TOKEN?: string | Resolver<string> | undefined
USERNAME?: string | Resolver<string> | undefined
PASSWORD?: string | Resolver<string> | undefined
HEADERS?: Headers | Resolver<Headers> | undefined
ENCODE_PATH?: ((path: string) => string) | undefined
}
BASE: string;
VERSION: string;
WITH_CREDENTIALS: boolean;
CREDENTIALS: 'include' | 'omit' | 'same-origin';
TOKEN?: string | Resolver<string> | undefined;
USERNAME?: string | Resolver<string> | undefined;
PASSWORD?: string | Resolver<string> | undefined;
HEADERS?: Headers | Resolver<Headers> | undefined;
ENCODE_PATH?: ((path: string) => string) | undefined;
};
export const OpenAPI: OpenAPIConfig = {
BASE: 'http://39.106.16.162:8080',
VERSION: '1.0.0',
WITH_CREDENTIALS: false,
CREDENTIALS: 'include',
TOKEN: GET_TKOEN('TOKEN') || undefined,
USERNAME: undefined,
PASSWORD: undefined,
HEADERS: {
Authorization: 'Bearer ' + GET_TKOEN('TOKEN'),
},
ENCODE_PATH: undefined,
}
BASE: 'http://39.106.16.162:8080',
VERSION: '1.0.0',
WITH_CREDENTIALS: false,
CREDENTIALS: 'include',
TOKEN: undefined,
USERNAME: undefined,
PASSWORD: undefined,
HEADERS: undefined,
ENCODE_PATH: undefined,
};

@ -2,315 +2,286 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import axios from 'axios'
import type {
AxiosError,
AxiosRequestConfig,
AxiosResponse,
AxiosInstance,
} from 'axios'
import FormData from 'form-data'
import { ApiError } from './ApiError'
import type { ApiRequestOptions } from './ApiRequestOptions'
import type { ApiResult } from './ApiResult'
import { CancelablePromise } from './CancelablePromise'
import type { OnCancel } from './CancelablePromise'
import type { OpenAPIConfig } from './OpenAPI'
export const isDefined = <T>(
value: T | null | undefined,
): value is Exclude<T, null | undefined> => {
return value !== undefined && value !== null
}
import axios from 'axios';
import type { AxiosError, AxiosRequestConfig, AxiosResponse, AxiosInstance } from 'axios';
import FormData from 'form-data';
import { ApiError } from './ApiError';
import type { ApiRequestOptions } from './ApiRequestOptions';
import type { ApiResult } from './ApiResult';
import { CancelablePromise } from './CancelablePromise';
import type { OnCancel } from './CancelablePromise';
import type { OpenAPIConfig } from './OpenAPI';
export const isDefined = <T>(value: T | null | undefined): value is Exclude<T, null | undefined> => {
return value !== undefined && value !== null;
};
export const isString = (value: any): value is string => {
return typeof value === 'string'
}
return typeof value === 'string';
};
export const isStringWithValue = (value: any): value is string => {
return isString(value) && value !== ''
}
return isString(value) && value !== '';
};
export const isBlob = (value: any): value is Blob => {
return (
typeof value === 'object' &&
typeof value.type === 'string' &&
typeof value.stream === 'function' &&
typeof value.arrayBuffer === 'function' &&
typeof value.constructor === 'function' &&
typeof value.constructor.name === 'string' &&
/^(Blob|File)$/.test(value.constructor.name) &&
/^(Blob|File)$/.test(value[Symbol.toStringTag])
)
}
return (
typeof value === 'object' &&
typeof value.type === 'string' &&
typeof value.stream === 'function' &&
typeof value.arrayBuffer === 'function' &&
typeof value.constructor === 'function' &&
typeof value.constructor.name === 'string' &&
/^(Blob|File)$/.test(value.constructor.name) &&
/^(Blob|File)$/.test(value[Symbol.toStringTag])
);
};
export const isFormData = (value: any): value is FormData => {
return value instanceof FormData
}
return value instanceof FormData;
};
export const isSuccess = (status: number): boolean => {
return status >= 200 && status < 300
}
return status >= 200 && status < 300;
};
export const base64 = (str: string): string => {
try {
return btoa(str)
} catch (err) {
// @ts-ignore
return Buffer.from(str).toString('base64')
}
}
export const getQueryString = (params: Record<string, any>): string => {
const qs: string[] = []
const append = (key: string, value: any) => {
qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`)
}
const process = (key: string, value: any) => {
if (isDefined(value)) {
if (Array.isArray(value)) {
value.forEach((v) => {
process(key, v)
})
} else if (typeof value === 'object') {
Object.entries(value).forEach(([k, v]) => {
process(`${key}[${k}]`, v)
})
} else {
append(key, value)
}
try {
return btoa(str);
} catch (err) {
// @ts-ignore
return Buffer.from(str).toString('base64');
}
}
};
Object.entries(params).forEach(([key, value]) => {
process(key, value)
})
export const getQueryString = (params: Record<string, any>): string => {
const qs: string[] = [];
if (qs.length > 0) {
return `?${qs.join('&')}`
}
const append = (key: string, value: any) => {
qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`);
};
return ''
}
const process = (key: string, value: any) => {
if (isDefined(value)) {
if (Array.isArray(value)) {
value.forEach(v => {
process(key, v);
});
} else if (typeof value === 'object') {
Object.entries(value).forEach(([k, v]) => {
process(`${key}[${k}]`, v);
});
} else {
append(key, value);
}
}
};
const getUrl = (config: OpenAPIConfig, options: ApiRequestOptions): string => {
const encoder = config.ENCODE_PATH || encodeURI
const path = options.url
.replace('{api-version}', config.VERSION)
.replace(/{(.*?)}/g, (substring: string, group: string) => {
if (options.path?.hasOwnProperty(group)) {
return encoder(String(options.path[group]))
}
return substring
})
Object.entries(params).forEach(([key, value]) => {
process(key, value);
});
const url = `${config.BASE}${path}`
if (options.query) {
return `${url}${getQueryString(options.query)}`
}
return url
}
if (qs.length > 0) {
return `?${qs.join('&')}`;
}
export const getFormData = (
options: ApiRequestOptions,
): FormData | undefined => {
if (options.formData) {
const formData = new FormData()
return '';
};
const process = (key: string, value: any) => {
if (isString(value) || isBlob(value)) {
formData.append(key, value)
} else {
formData.append(key, JSON.stringify(value))
}
const getUrl = (config: OpenAPIConfig, options: ApiRequestOptions): string => {
const encoder = config.ENCODE_PATH || encodeURI;
const path = options.url
.replace('{api-version}', config.VERSION)
.replace(/{(.*?)}/g, (substring: string, group: string) => {
if (options.path?.hasOwnProperty(group)) {
return encoder(String(options.path[group]));
}
return substring;
});
const url = `${config.BASE}${path}`;
if (options.query) {
return `${url}${getQueryString(options.query)}`;
}
return url;
};
export const getFormData = (options: ApiRequestOptions): FormData | undefined => {
if (options.formData) {
const formData = new FormData();
const process = (key: string, value: any) => {
if (isString(value) || isBlob(value)) {
formData.append(key, value);
} else {
formData.append(key, JSON.stringify(value));
}
};
Object.entries(options.formData)
.filter(([_, value]) => isDefined(value))
.forEach(([key, value]) => {
if (Array.isArray(value)) {
value.forEach(v => process(key, v));
} else {
process(key, value);
}
});
return formData;
}
return undefined;
};
Object.entries(options.formData)
.filter(([_, value]) => isDefined(value))
.forEach(([key, value]) => {
if (Array.isArray(value)) {
value.forEach((v) => process(key, v))
} else {
process(key, value)
}
})
return formData
}
return undefined
}
type Resolver<T> = (options: ApiRequestOptions) => Promise<T>
export const resolve = async <T>(
options: ApiRequestOptions,
resolver?: T | Resolver<T>,
): Promise<T | undefined> => {
if (typeof resolver === 'function') {
return (resolver as Resolver<T>)(options)
}
return resolver
}
export const getHeaders = async (
config: OpenAPIConfig,
options: ApiRequestOptions,
formData?: FormData,
): Promise<Record<string, string>> => {
const [token, username, password, additionalHeaders] = await Promise.all([
resolve(options, config.TOKEN),
resolve(options, config.USERNAME),
resolve(options, config.PASSWORD),
resolve(options, config.HEADERS),
])
const formHeaders =
(typeof formData?.getHeaders === 'function' && formData?.getHeaders()) || {}
const headers = Object.entries({
Accept: 'application/json',
...additionalHeaders,
...options.headers,
...formHeaders,
})
type Resolver<T> = (options: ApiRequestOptions) => Promise<T>;
export const resolve = async <T>(options: ApiRequestOptions, resolver?: T | Resolver<T>): Promise<T | undefined> => {
if (typeof resolver === 'function') {
return (resolver as Resolver<T>)(options);
}
return resolver;
};
export const getHeaders = async (config: OpenAPIConfig, options: ApiRequestOptions, formData?: FormData): Promise<Record<string, string>> => {
const [token, username, password, additionalHeaders] = await Promise.all([
resolve(options, config.TOKEN),
resolve(options, config.USERNAME),
resolve(options, config.PASSWORD),
resolve(options, config.HEADERS),
]);
const formHeaders = typeof formData?.getHeaders === 'function' && formData?.getHeaders() || {}
const headers = Object.entries({
Accept: 'application/json',
...additionalHeaders,
...options.headers,
...formHeaders,
})
.filter(([_, value]) => isDefined(value))
.reduce(
(headers, [key, value]) => ({
.reduce((headers, [key, value]) => ({
...headers,
[key]: String(value),
}),
{} as Record<string, string>,
)
if (isStringWithValue(token)) {
headers['Authorization'] = `Bearer ${token}`
}
if (isStringWithValue(username) && isStringWithValue(password)) {
const credentials = base64(`${username}:${password}`)
headers['Authorization'] = `Basic ${credentials}`
}
if (options.body !== undefined) {
if (options.mediaType) {
headers['Content-Type'] = options.mediaType
} else if (isBlob(options.body)) {
headers['Content-Type'] = options.body.type || 'application/octet-stream'
} else if (isString(options.body)) {
headers['Content-Type'] = 'text/plain'
} else if (!isFormData(options.body)) {
headers['Content-Type'] = 'application/json'
}), {} as Record<string, string>);
if (isStringWithValue(token)) {
headers['Authorization'] = `Bearer ${token}`;
}
if (isStringWithValue(username) && isStringWithValue(password)) {
const credentials = base64(`${username}:${password}`);
headers['Authorization'] = `Basic ${credentials}`;
}
if (options.body !== undefined) {
if (options.mediaType) {
headers['Content-Type'] = options.mediaType;
} else if (isBlob(options.body)) {
headers['Content-Type'] = options.body.type || 'application/octet-stream';
} else if (isString(options.body)) {
headers['Content-Type'] = 'text/plain';
} else if (!isFormData(options.body)) {
headers['Content-Type'] = 'application/json';
}
}
}
return headers
}
return headers;
};
export const getRequestBody = (options: ApiRequestOptions): any => {
if (options.body) {
return options.body
}
return undefined
}
if (options.body) {
return options.body;
}
return undefined;
};
export const sendRequest = async <T>(
config: OpenAPIConfig,
options: ApiRequestOptions,
url: string,
body: any,
formData: FormData | undefined,
headers: Record<string, string>,
onCancel: OnCancel,
axiosClient: AxiosInstance,
config: OpenAPIConfig,
options: ApiRequestOptions,
url: string,
body: any,
formData: FormData | undefined,
headers: Record<string, string>,
onCancel: OnCancel,
axiosClient: AxiosInstance
): Promise<AxiosResponse<T>> => {
const source = axios.CancelToken.source()
const requestConfig: AxiosRequestConfig = {
url,
headers,
data: body ?? formData,
method: options.method,
withCredentials: config.WITH_CREDENTIALS,
withXSRFToken:
config.CREDENTIALS === 'include' ? config.WITH_CREDENTIALS : false,
cancelToken: source.token,
}
onCancel(() => source.cancel('The user aborted a request.'))
try {
return await axiosClient.request(requestConfig)
} catch (error) {
const axiosError = error as AxiosError<T>
if (axiosError.response) {
return axiosError.response
const source = axios.CancelToken.source();
const requestConfig: AxiosRequestConfig = {
url,
headers,
data: body ?? formData,
method: options.method,
withCredentials: config.WITH_CREDENTIALS,
withXSRFToken: config.CREDENTIALS === 'include' ? config.WITH_CREDENTIALS : false,
cancelToken: source.token,
};
onCancel(() => source.cancel('The user aborted a request.'));
try {
return await axiosClient.request(requestConfig);
} catch (error) {
const axiosError = error as AxiosError<T>;
if (axiosError.response) {
return axiosError.response;
}
throw error;
}
throw error
}
}
export const getResponseHeader = (
response: AxiosResponse<any>,
responseHeader?: string,
): string | undefined => {
if (responseHeader) {
const content = response.headers[responseHeader]
if (isString(content)) {
return content
};
export const getResponseHeader = (response: AxiosResponse<any>, responseHeader?: string): string | undefined => {
if (responseHeader) {
const content = response.headers[responseHeader];
if (isString(content)) {
return content;
}
}
}
return undefined
}
return undefined;
};
export const getResponseBody = (response: AxiosResponse<any>): any => {
if (response.status !== 204) {
return response.data
}
return undefined
}
export const catchErrorCodes = (
options: ApiRequestOptions,
result: ApiResult,
): void => {
const errors: Record<number, string> = {
400: 'Bad Request',
401: 'Unauthorized',
403: 'Forbidden',
404: 'Not Found',
500: 'Internal Server Error',
502: 'Bad Gateway',
503: 'Service Unavailable',
...options.errors,
}
const error = errors[result.status]
if (error) {
throw new ApiError(options, result, error)
}
if (!result.ok) {
const errorStatus = result.status ?? 'unknown'
const errorStatusText = result.statusText ?? 'unknown'
const errorBody = (() => {
try {
return JSON.stringify(result.body, null, 2)
} catch (e) {
return undefined
}
})()
throw new ApiError(
options,
result,
`Generic Error: status: ${errorStatus}; status text: ${errorStatusText}; body: ${errorBody}`,
)
}
}
if (response.status !== 204) {
return response.data;
}
return undefined;
};
export const catchErrorCodes = (options: ApiRequestOptions, result: ApiResult): void => {
const errors: Record<number, string> = {
400: 'Bad Request',
401: 'Unauthorized',
403: 'Forbidden',
404: 'Not Found',
500: 'Internal Server Error',
502: 'Bad Gateway',
503: 'Service Unavailable',
...options.errors,
}
const error = errors[result.status];
if (error) {
throw new ApiError(options, result, error);
}
if (!result.ok) {
const errorStatus = result.status ?? 'unknown';
const errorStatusText = result.statusText ?? 'unknown';
const errorBody = (() => {
try {
return JSON.stringify(result.body, null, 2);
} catch (e) {
return undefined;
}
})();
throw new ApiError(options, result,
`Generic Error: status: ${errorStatus}; status text: ${errorStatusText}; body: ${errorBody}`
);
}
};
/**
* Request method
@ -320,49 +291,33 @@ export const catchErrorCodes = (
* @returns CancelablePromise<T>
* @throws ApiError
*/
export const request = <T>(
config: OpenAPIConfig,
options: ApiRequestOptions,
axiosClient: AxiosInstance = axios,
): CancelablePromise<T> => {
return new CancelablePromise(async (resolve, reject, onCancel) => {
try {
const url = getUrl(config, options)
const formData = getFormData(options)
const body = getRequestBody(options)
const headers = await getHeaders(config, options, formData)
if (!onCancel.isCancelled) {
const response = await sendRequest<T>(
config,
options,
url,
body,
formData,
headers,
onCancel,
axiosClient,
)
const responseBody = getResponseBody(response)
const responseHeader = getResponseHeader(
response,
options.responseHeader,
)
const result: ApiResult = {
url,
ok: isSuccess(response.status),
status: response.status,
statusText: response.statusText,
body: responseHeader ?? responseBody,
export const request = <T>(config: OpenAPIConfig, options: ApiRequestOptions, axiosClient: AxiosInstance = axios): CancelablePromise<T> => {
return new CancelablePromise(async (resolve, reject, onCancel) => {
try {
const url = getUrl(config, options);
const formData = getFormData(options);
const body = getRequestBody(options);
const headers = await getHeaders(config, options, formData);
if (!onCancel.isCancelled) {
const response = await sendRequest<T>(config, options, url, body, formData, headers, onCancel, axiosClient);
const responseBody = getResponseBody(response);
const responseHeader = getResponseHeader(response, options.responseHeader);
const result: ApiResult = {
url,
ok: isSuccess(response.status),
status: response.status,
statusText: response.statusText,
body: responseHeader ?? responseBody,
};
catchErrorCodes(options, result);
resolve(result.body);
}
} catch (error) {
reject(error);
}
catchErrorCodes(options, result)
resolve(result.body)
}
} catch (error) {
reject(error)
}
})
}
});
};

@ -2,72 +2,77 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export { ApiError } from './core/ApiError'
export { CancelablePromise, CancelError } from './core/CancelablePromise'
export { OpenAPI } from './core/OpenAPI'
export type { OpenAPIConfig } from './core/OpenAPI'
export { ApiError } from './core/ApiError';
export { CancelablePromise, CancelError } from './core/CancelablePromise';
export { OpenAPI } from './core/OpenAPI';
export type { OpenAPIConfig } from './core/OpenAPI';
export type { BaseResponse } from './models/BaseResponse'
export type { BaseResponse_boolean_ } from './models/BaseResponse_boolean_'
export type { BaseResponse_CoursesDTO_ } from './models/BaseResponse_CoursesDTO_'
export type { BaseResponse_List_CourseObjectivesTreeVO_ } from './models/BaseResponse_List_CourseObjectivesTreeVO_'
export type { BaseResponse_List_CourseResources_ } from './models/BaseResponse_List_CourseResources_'
export type { BaseResponse_List_LearningRecords_ } from './models/BaseResponse_List_LearningRecords_'
export type { BaseResponse_List_ObjectivesType_ } from './models/BaseResponse_List_ObjectivesType_'
export type { BaseResponse_List_TeacherInfVO_ } from './models/BaseResponse_List_TeacherInfVO_'
export type { BaseResponse_long_ } from './models/BaseResponse_long_'
export type { BaseResponse_Map_string_object_ } from './models/BaseResponse_Map_string_object_'
export type { BaseResponse_ObjectiveContentKnowVO_ } from './models/BaseResponse_ObjectiveContentKnowVO_'
export type { BaseResponse_ObjectiveContents_ } from './models/BaseResponse_ObjectiveContents_'
export type { BaseResponse_Page_ } from './models/BaseResponse_Page_'
export type { BaseResponse_Page_CourseFavourDetailVO_ } from './models/BaseResponse_Page_CourseFavourDetailVO_'
export type { BaseResponse_Page_CourseResources_ } from './models/BaseResponse_Page_CourseResources_'
export type { BaseResponse_PageDTO_CoursesVO_ } from './models/BaseResponse_PageDTO_CoursesVO_'
export type { BaseResponse_string_ } from './models/BaseResponse_string_'
export type { CommonResult } from './models/CommonResult'
export type { CommonResult_string_ } from './models/CommonResult_string_'
export type { CommonResult_UmsAdmin_ } from './models/CommonResult_UmsAdmin_'
export type { CourseFavourAddRequest } from './models/CourseFavourAddRequest'
export type { CourseFavourAllRequest } from './models/CourseFavourAllRequest'
export type { CourseFavourDetailVO } from './models/CourseFavourDetailVO'
export type { CourseFavourQueryRequest } from './models/CourseFavourQueryRequest'
export type { CourseObjectivesDTO } from './models/CourseObjectivesDTO'
export type { CourseObjectivesTreeVO } from './models/CourseObjectivesTreeVO'
export type { CourseResources } from './models/CourseResources'
export type { CoursesDTO } from './models/CoursesDTO'
export type { CoursesVO } from './models/CoursesVO'
export type { CourseThumbAddRequest } from './models/CourseThumbAddRequest'
export type { KnowFavourAddRequest } from './models/KnowFavourAddRequest'
export type { KnowThumbAddRequest } from './models/KnowThumbAddRequest'
export type { LearningRecords } from './models/LearningRecords'
export type { ObjectiveContentKnowDTO } from './models/ObjectiveContentKnowDTO'
export type { ObjectiveContentKnowVO } from './models/ObjectiveContentKnowVO'
export type { ObjectiveContents_ } from './models/ObjectiveContents_'
export type { ObjectivesType_ } from './models/ObjectivesType_'
export type { OrderItem } from './models/OrderItem'
export type { Page } from './models/Page'
export type { Page_CourseFavourDetailVO_ } from './models/Page_CourseFavourDetailVO_'
export type { Page_CourseResources_ } from './models/Page_CourseResources_'
export type { PageDTO_CoursesVO_ } from './models/PageDTO_CoursesVO_'
export type { ResourceFavourAddRequest } from './models/ResourceFavourAddRequest'
export type { ResourceFavourQueryRequest } from './models/ResourceFavourQueryRequest'
export type { ResourceThumbAddRequest } from './models/ResourceThumbAddRequest'
export type { StudentCoursesDTO } from './models/StudentCoursesDTO'
export type { TeacherInfVO } from './models/TeacherInfVO'
export type { UmsAdmin } from './models/UmsAdmin'
export type { UmsAdminParam } from './models/UmsAdminParam'
export type { UmsStudentAndTeacherDTO } from './models/UmsStudentAndTeacherDTO'
export type { UpdateAdminPasswordParam } from './models/UpdateAdminPasswordParam'
export type { BaseResponse } from './models/BaseResponse';
export type { BaseResponse_boolean_ } from './models/BaseResponse_boolean_';
export type { BaseResponse_CoursesDTO_ } from './models/BaseResponse_CoursesDTO_';
export type { BaseResponse_List_CourseObjectivesTreeVO_ } from './models/BaseResponse_List_CourseObjectivesTreeVO_';
export type { BaseResponse_List_CourseResources_ } from './models/BaseResponse_List_CourseResources_';
export type { BaseResponse_List_LearningRecords_ } from './models/BaseResponse_List_LearningRecords_';
export type { BaseResponse_List_ObjectivesType_ } from './models/BaseResponse_List_ObjectivesType_';
export type { BaseResponse_List_TeacherInfVO_ } from './models/BaseResponse_List_TeacherInfVO_';
export type { BaseResponse_long_ } from './models/BaseResponse_long_';
export type { BaseResponse_Map_string_object_ } from './models/BaseResponse_Map_string_object_';
export type { BaseResponse_ObjectiveContentKnowVO_ } from './models/BaseResponse_ObjectiveContentKnowVO_';
export type { BaseResponse_ObjectiveContents_ } from './models/BaseResponse_ObjectiveContents_';
export type { BaseResponse_Page_ } from './models/BaseResponse_Page_';
export type { BaseResponse_Page_CourseFavourDetailVO_ } from './models/BaseResponse_Page_CourseFavourDetailVO_';
export type { BaseResponse_Page_CourseResources_ } from './models/BaseResponse_Page_CourseResources_';
export type { BaseResponse_PageDTO_CoursesVO_ } from './models/BaseResponse_PageDTO_CoursesVO_';
export type { BaseResponse_string_ } from './models/BaseResponse_string_';
export type { CommonResult } from './models/CommonResult';
export type { CommonResult_string_ } from './models/CommonResult_string_';
export type { CommonResult_UmsAdmin_ } from './models/CommonResult_UmsAdmin_';
export type { CourseFavourAddRequest } from './models/CourseFavourAddRequest';
export type { CourseFavourAllRequest } from './models/CourseFavourAllRequest';
export type { CourseFavourDetailVO } from './models/CourseFavourDetailVO';
export type { CourseFavourQueryRequest } from './models/CourseFavourQueryRequest';
export type { CourseObjectivesDTO } from './models/CourseObjectivesDTO';
export type { CourseObjectivesTreeVO } from './models/CourseObjectivesTreeVO';
export type { CourseResources } from './models/CourseResources';
export type { CoursesDTO } from './models/CoursesDTO';
export type { CoursesVO } from './models/CoursesVO';
export type { CourseThumbAddRequest } from './models/CourseThumbAddRequest';
export type { Know } from './models/Know';
export type { KnowFavourAddRequest } from './models/KnowFavourAddRequest';
export type { KnowQueryRequest } from './models/KnowQueryRequest';
export type { KnowRequest } from './models/KnowRequest';
export type { KnowThumbAddRequest } from './models/KnowThumbAddRequest';
export type { KnowupdateRequest } from './models/KnowupdateRequest';
export type { LearningRecords } from './models/LearningRecords';
export type { ObjectiveContentKnowDTO } from './models/ObjectiveContentKnowDTO';
export type { ObjectiveContentKnowVO } from './models/ObjectiveContentKnowVO';
export type { ObjectiveContents_ } from './models/ObjectiveContents_';
export type { ObjectivesType_ } from './models/ObjectivesType_';
export type { OrderItem } from './models/OrderItem';
export type { Page } from './models/Page';
export type { Page_CourseFavourDetailVO_ } from './models/Page_CourseFavourDetailVO_';
export type { Page_CourseResources_ } from './models/Page_CourseResources_';
export type { PageDTO_CoursesVO_ } from './models/PageDTO_CoursesVO_';
export type { ResourceFavourAddRequest } from './models/ResourceFavourAddRequest';
export type { ResourceFavourQueryRequest } from './models/ResourceFavourQueryRequest';
export type { ResourceThumbAddRequest } from './models/ResourceThumbAddRequest';
export type { StudentCoursesDTO } from './models/StudentCoursesDTO';
export type { TeacherInfVO } from './models/TeacherInfVO';
export type { UmsAdmin } from './models/UmsAdmin';
export type { UmsAdminParam } from './models/UmsAdminParam';
export type { UmsStudentAndTeacherDTO } from './models/UmsStudentAndTeacherDTO';
export type { UpdateAdminPasswordParam } from './models/UpdateAdminPasswordParam';
export { Service } from './services/Service'
export { CourseResourceControllerService } from './services/CourseResourceControllerService'
export { FavourInformationControllerService } from './services/FavourInformationControllerService'
export { LearningRecordsControllerService } from './services/LearningRecordsControllerService'
export { ResourceControllerService } from './services/ResourceControllerService'
export { SeCourseFavourControllerService } from './services/SeCourseFavourControllerService'
export { SeCourseThumbControllerService } from './services/SeCourseThumbControllerService'
export { SeKnowFavourControllerService } from './services/SeKnowFavourControllerService'
export { SeKnowThumbControllerService } from './services/SeKnowThumbControllerService'
export { SeResourceFavourControllerService } from './services/SeResourceFavourControllerService'
export { SeResourceThumbControllerService } from './services/SeResourceThumbControllerService'
export { UmsAdminControllerService } from './services/UmsAdminControllerService'
export { Service } from './services/Service';
export { CourseResourceControllerService } from './services/CourseResourceControllerService';
export { FavourInformationControllerService } from './services/FavourInformationControllerService';
export { KnowControllerService } from './services/KnowControllerService';
export { LearningRecordsControllerService } from './services/LearningRecordsControllerService';
export { ResourceControllerService } from './services/ResourceControllerService';
export { SeCourseFavourControllerService } from './services/SeCourseFavourControllerService';
export { SeCourseThumbControllerService } from './services/SeCourseThumbControllerService';
export { SeKnowFavourControllerService } from './services/SeKnowFavourControllerService';
export { SeKnowThumbControllerService } from './services/SeKnowThumbControllerService';
export { SeResourceFavourControllerService } from './services/SeResourceFavourControllerService';
export { SeResourceThumbControllerService } from './services/SeResourceThumbControllerService';
export { UmsAdminControllerService } from './services/UmsAdminControllerService';

@ -3,7 +3,8 @@
/* tslint:disable */
/* eslint-disable */
export type BaseResponse = {
code?: number
data?: any
message?: string
}
code?: number;
data?: any;
message?: string;
};

@ -2,9 +2,10 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { CoursesDTO } from './CoursesDTO'
import type { CoursesDTO } from './CoursesDTO';
export type BaseResponse_CoursesDTO_ = {
code?: number
data?: CoursesDTO
message?: string
}
code?: number;
data?: CoursesDTO;
message?: string;
};

@ -2,9 +2,10 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { CourseObjectivesTreeVO } from './CourseObjectivesTreeVO'
import type { CourseObjectivesTreeVO } from './CourseObjectivesTreeVO';
export type BaseResponse_List_CourseObjectivesTreeVO_ = {
code?: number
data?: Array<CourseObjectivesTreeVO>
message?: string
}
code?: number;
data?: Array<CourseObjectivesTreeVO>;
message?: string;
};

@ -2,9 +2,10 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { CourseResources } from './CourseResources'
import type { CourseResources } from './CourseResources';
export type BaseResponse_List_CourseResources_ = {
code?: number
data?: Array<CourseResources>
message?: string
}
code?: number;
data?: Array<CourseResources>;
message?: string;
};

@ -2,9 +2,10 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { LearningRecords } from './LearningRecords'
import type { LearningRecords } from './LearningRecords';
export type BaseResponse_List_LearningRecords_ = {
code?: number
data?: Array<LearningRecords>
message?: string
}
code?: number;
data?: Array<LearningRecords>;
message?: string;
};

@ -2,9 +2,10 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { ObjectivesType_ } from './ObjectivesType_'
import type { ObjectivesType_ } from './ObjectivesType_';
export type BaseResponse_List_ObjectivesType_ = {
code?: number
data?: Array<ObjectivesType_>
message?: string
}
code?: number;
data?: Array<ObjectivesType_>;
message?: string;
};

@ -2,9 +2,10 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { TeacherInfVO } from './TeacherInfVO'
import type { TeacherInfVO } from './TeacherInfVO';
export type BaseResponse_List_TeacherInfVO_ = {
code?: number
data?: Array<TeacherInfVO>
message?: string
}
code?: number;
data?: Array<TeacherInfVO>;
message?: string;
};

@ -3,7 +3,8 @@
/* tslint:disable */
/* eslint-disable */
export type BaseResponse_Map_string_object_ = {
code?: number
data?: any
message?: string
}
code?: number;
data?: any;
message?: string;
};

@ -2,9 +2,10 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { ObjectiveContentKnowVO } from './ObjectiveContentKnowVO'
import type { ObjectiveContentKnowVO } from './ObjectiveContentKnowVO';
export type BaseResponse_ObjectiveContentKnowVO_ = {
code?: number
data?: ObjectiveContentKnowVO
message?: string
}
code?: number;
data?: ObjectiveContentKnowVO;
message?: string;
};

@ -2,9 +2,10 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { ObjectiveContents_ } from './ObjectiveContents_'
import type { ObjectiveContents_ } from './ObjectiveContents_';
export type BaseResponse_ObjectiveContents_ = {
code?: number
data?: ObjectiveContents_
message?: string
}
code?: number;
data?: ObjectiveContents_;
message?: string;
};

@ -2,9 +2,10 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { PageDTO_CoursesVO_ } from './PageDTO_CoursesVO_'
import type { PageDTO_CoursesVO_ } from './PageDTO_CoursesVO_';
export type BaseResponse_PageDTO_CoursesVO_ = {
code?: number
data?: PageDTO_CoursesVO_
message?: string
}
code?: number;
data?: PageDTO_CoursesVO_;
message?: string;
};

@ -2,9 +2,10 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { Page } from './Page'
import type { Page } from './Page';
export type BaseResponse_Page_ = {
code?: number
data?: Page
message?: string
}
code?: number;
data?: Page;
message?: string;
};

@ -2,9 +2,10 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { Page_CourseFavourDetailVO_ } from './Page_CourseFavourDetailVO_'
import type { Page_CourseFavourDetailVO_ } from './Page_CourseFavourDetailVO_';
export type BaseResponse_Page_CourseFavourDetailVO_ = {
code?: number
data?: Page_CourseFavourDetailVO_
message?: string
}
code?: number;
data?: Page_CourseFavourDetailVO_;
message?: string;
};

@ -2,9 +2,10 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { Page_CourseResources_ } from './Page_CourseResources_'
import type { Page_CourseResources_ } from './Page_CourseResources_';
export type BaseResponse_Page_CourseResources_ = {
code?: number
data?: Page_CourseResources_
message?: string
}
code?: number;
data?: Page_CourseResources_;
message?: string;
};

@ -3,7 +3,8 @@
/* tslint:disable */
/* eslint-disable */
export type BaseResponse_boolean_ = {
code?: number
data?: boolean
message?: string
}
code?: number;
data?: boolean;
message?: string;
};

@ -3,7 +3,8 @@
/* tslint:disable */
/* eslint-disable */
export type BaseResponse_long_ = {
code?: number
data?: number
message?: string
}
code?: number;
data?: number;
message?: string;
};

@ -3,7 +3,8 @@
/* tslint:disable */
/* eslint-disable */
export type BaseResponse_string_ = {
code?: number
data?: string
message?: string
}
code?: number;
data?: string;
message?: string;
};

@ -3,7 +3,8 @@
/* tslint:disable */
/* eslint-disable */
export type CommonResult = {
code?: number
data?: any
message?: string
}
code?: number;
data?: any;
message?: string;
};

@ -2,9 +2,10 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { UmsAdmin } from './UmsAdmin'
import type { UmsAdmin } from './UmsAdmin';
export type CommonResult_UmsAdmin_ = {
code?: number
data?: UmsAdmin
message?: string
}
code?: number;
data?: UmsAdmin;
message?: string;
};

@ -3,7 +3,8 @@
/* tslint:disable */
/* eslint-disable */
export type CommonResult_string_ = {
code?: number
data?: string
message?: string
}
code?: number;
data?: string;
message?: string;
};

@ -3,6 +3,7 @@
/* tslint:disable */
/* eslint-disable */
export type CourseFavourAddRequest = {
courseId?: string
userId?: string
}
courseId?: string;
userId?: string;
};

@ -3,5 +3,6 @@
/* tslint:disable */
/* eslint-disable */
export type CourseFavourAllRequest = {
courseId?: string
}
courseId?: string;
};

@ -3,19 +3,20 @@
/* tslint:disable */
/* eslint-disable */
export type CourseFavourDetailVO = {
/**
*
*/
classhours: number
/**
*
*/
credit: number
id?: string
img?: string
name?: string
/**
* id
*/
teacher?: string
}
/**
*
*/
classhours: number;
/**
*
*/
credit: number;
id?: string;
img?: string;
name?: string;
/**
* id
*/
teacher?: string;
};

@ -3,9 +3,10 @@
/* tslint:disable */
/* eslint-disable */
export type CourseFavourQueryRequest = {
current?: number
pageSize?: number
sortField?: string
sortOrder?: string
userId?: string
}
current?: number;
pageSize?: number;
sortField?: string;
sortOrder?: string;
userId?: string;
};

@ -6,20 +6,21 @@
*
*/
export type CourseObjectivesDTO = {
/**
* id
*/
id?: string
/**
*
*/
name: string
/**
* pid
*/
pid: string
/**
*
*/
type: number
}
/**
* id
*/
id?: string;
/**
*
*/
name: string;
/**
* pid
*/
pid: string;
/**
*
*/
type: number;
};

@ -2,49 +2,50 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { ObjectiveContents_ } from './ObjectiveContents_'
import type { ObjectiveContents_ } from './ObjectiveContents_';
/**
*
*/
export type CourseObjectivesTreeVO = {
/**
*
*/
contents?: Array<ObjectiveContents_>
/**
* id
*/
courseId?: string
/**
*
*/
courseObjectivesTrees?: Array<CourseObjectivesTreeVO>
/**
*
*/
hasChild?: number
/**
*
*/
id?: string
/**
*
*/
name?: string
/**
*
*/
pid?: string
/**
* id
*/
requireid?: string
/**
*
*/
temp?: string
/**
*
*/
type?: number
}
/**
*
*/
contents?: Array<ObjectiveContents_>;
/**
* id
*/
courseId?: string;
/**
*
*/
courseObjectivesTrees?: Array<CourseObjectivesTreeVO>;
/**
*
*/
hasChild?: number;
/**
*
*/
id?: string;
/**
*
*/
name?: string;
/**
*
*/
pid?: string;
/**
* id
*/
requireid?: string;
/**
*
*/
temp?: string;
/**
*
*/
type?: number;
};

@ -3,12 +3,13 @@
/* tslint:disable */
/* eslint-disable */
export type CourseResources = {
description?: string
id?: number
img?: string
name?: string
path?: string
status?: number
tags?: string
type?: number
}
description?: string;
id?: number;
img?: string;
name?: string;
path?: string;
status?: number;
tags?: string;
type?: number;
};

@ -3,6 +3,7 @@
/* tslint:disable */
/* eslint-disable */
export type CourseThumbAddRequest = {
courseId?: string
userId?: string
}
courseId?: string;
userId?: string;
};

@ -6,64 +6,65 @@
*
*/
export type CoursesDTO = {
/**
* 1 2
*/
assessmenttype: string
/**
* 1 2 3
*/
assessmentway: string
/**
* 1 2
*/
category: string
/**
*
*/
classhours: number
/**
*
*/
code: string
/**
*
*/
createTime?: string
/**
*
*/
credit: number
/**
*
*/
description?: string
/**
* id
*/
id?: string
/**
*
*/
img?: string
/**
*
*/
name: string
/**
* 1 2 3
*/
nature: string
/**
*
*/
teacher: string
/**
*
*/
teachermethod?: string
/**
*
*/
teacherway?: string
}
/**
* 1 2
*/
assessmenttype: string;
/**
* 1 2 3
*/
assessmentway: string;
/**
* 1 2
*/
category: string;
/**
*
*/
classhours: number;
/**
*
*/
code: string;
/**
*
*/
createTime?: string;
/**
*
*/
credit: number;
/**
*
*/
description?: string;
/**
* id
*/
id?: string;
/**
*
*/
img: string;
/**
*
*/
name: string;
/**
* 1 2 3
*/
nature: string;
/**
*
*/
teacher: string;
/**
*
*/
teachermethod?: string;
/**
*
*/
teacherway?: string;
};

@ -6,44 +6,45 @@
* VO实体
*/
export type CoursesVO = {
/**
*
*/
classhours: number
/**
*
*/
credit: number
/**
*
*/
description: string
/**
* id
*/
id?: string
/**
*
*/
img?: string
/**
*
*/
name: string
/**
*
*/
teacher?: string
/**
*
*/
totalHours: number
/**
*
*/
totalKnow: number
/**
*
*/
totalchapter: number
}
/**
*
*/
classhours: number;
/**
*
*/
credit: number;
/**
*
*/
description: string;
/**
* id
*/
id?: string;
/**
*
*/
img?: string;
/**
*
*/
name: string;
/**
*
*/
teacher?: string;
/**
*
*/
totalHours: number;
/**
*
*/
totalKnow: number;
/**
*
*/
totalchapter: number;
};

@ -0,0 +1,14 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type Know = {
content?: string;
hour?: number;
id?: number;
img?: string;
info?: string;
name?: string;
resourceid?: string;
};

@ -3,7 +3,8 @@
/* tslint:disable */
/* eslint-disable */
export type KnowFavourAddRequest = {
courseId?: string
knowId?: string
userId?: string
}
courseId?: string;
knowId?: string;
userId?: string;
};

@ -0,0 +1,8 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type KnowQueryRequest = {
name?: string;
};

@ -0,0 +1,13 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type KnowRequest = {
content?: string;
hour?: number;
img?: string;
info?: string;
name?: string;
resourceid?: string;
};

@ -3,6 +3,7 @@
/* tslint:disable */
/* eslint-disable */
export type KnowThumbAddRequest = {
knowId?: number
userId?: string
}
knowId?: number;
userId?: string;
};

@ -0,0 +1,14 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type KnowupdateRequest = {
content?: string;
hour?: number;
id?: number;
img?: string;
info?: string;
name?: string;
resourceid?: string;
};

@ -3,19 +3,20 @@
/* tslint:disable */
/* eslint-disable */
export type LearningRecords = {
accessTime?: string
address?: string
chapterId?: string
content?: string
coursesId?: string
download?: string
id?: string
isCompleted?: string
knowledgePointId?: string
open?: string
parentNode?: string
resourceId?: string
status?: string
type?: string
userId?: string
}
accessTime?: string;
address?: string;
chapterId?: string;
content?: string;
coursesId?: string;
download?: string;
id?: string;
isCompleted?: string;
knowledgePointId?: string;
open?: string;
parentNode?: string;
resourceId?: string;
status?: string;
type?: string;
userId?: string;
};

@ -6,10 +6,11 @@
*
*/
export type ObjectiveContentKnowDTO = {
/**
*
*/
id?: string
know?: string
objectiveOrContent?: string
}
/**
*
*/
id?: string;
know?: string;
objectiveOrContent?: string;
};

@ -6,18 +6,19 @@
* VO实体
*/
export type ObjectiveContentKnowVO = {
contentKnowsData?: Array<ObjectiveContentKnowVO>
/**
*
*/
knowsNumber?: number
/**
*
*/
knowsTime?: number
objectiveOrContent?: string
/**
*
*/
persent?: string
}
contentKnowsData?: Array<ObjectiveContentKnowVO>;
/**
*
*/
knowsNumber?: number;
/**
*
*/
knowsTime?: number;
objectiveOrContent?: string;
/**
*
*/
persent?: string;
};

@ -3,13 +3,14 @@
/* tslint:disable */
/* eslint-disable */
export type ObjectiveContents_ = {
/**
*
*/
content: string
id?: string
/**
* id
*/
objectiveId: string
}
/**
*
*/
content: string;
id?: string;
/**
* id
*/
objectiveId: string;
};

@ -3,12 +3,13 @@
/* tslint:disable */
/* eslint-disable */
export type ObjectivesType_ = {
/**
* 使
*/
id?: number
/**
*
*/
typeName: string
}
/**
* 使
*/
id?: number;
/**
*
*/
typeName: string;
};

@ -3,6 +3,7 @@
/* tslint:disable */
/* eslint-disable */
export type OrderItem = {
asc?: boolean
column?: string
}
asc?: boolean;
column?: string;
};

@ -2,16 +2,17 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { OrderItem } from './OrderItem'
import type { OrderItem } from './OrderItem';
export type Page = {
countId?: string
current?: number
maxLimit?: number
optimizeCountSql?: boolean
orders?: Array<OrderItem>
pages?: number
records?: Array<any>
searchCount?: boolean
size?: number
total?: number
}
countId?: string;
current?: number;
maxLimit?: number;
optimizeCountSql?: boolean;
orders?: Array<OrderItem>;
pages?: number;
records?: Array<any>;
searchCount?: boolean;
size?: number;
total?: number;
};

@ -2,21 +2,22 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { CoursesVO } from './CoursesVO'
import type { CoursesVO } from './CoursesVO';
/**
*
*/
export type PageDTO_CoursesVO_ = {
/**
*
*/
list?: Array<CoursesVO>
/**
*
*/
pages?: number
/**
*
*/
total?: number
}
/**
*
*/
list?: Array<CoursesVO>;
/**
*
*/
pages?: number;
/**
*
*/
total?: number;
};

@ -2,17 +2,18 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { CourseFavourDetailVO } from './CourseFavourDetailVO'
import type { OrderItem } from './OrderItem'
import type { CourseFavourDetailVO } from './CourseFavourDetailVO';
import type { OrderItem } from './OrderItem';
export type Page_CourseFavourDetailVO_ = {
countId?: string
current?: number
maxLimit?: number
optimizeCountSql?: boolean
orders?: Array<OrderItem>
pages?: number
records?: Array<CourseFavourDetailVO>
searchCount?: boolean
size?: number
total?: number
}
countId?: string;
current?: number;
maxLimit?: number;
optimizeCountSql?: boolean;
orders?: Array<OrderItem>;
pages?: number;
records?: Array<CourseFavourDetailVO>;
searchCount?: boolean;
size?: number;
total?: number;
};

@ -2,17 +2,18 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { CourseResources } from './CourseResources'
import type { OrderItem } from './OrderItem'
import type { CourseResources } from './CourseResources';
import type { OrderItem } from './OrderItem';
export type Page_CourseResources_ = {
countId?: string
current?: number
maxLimit?: number
optimizeCountSql?: boolean
orders?: Array<OrderItem>
pages?: number
records?: Array<CourseResources>
searchCount?: boolean
size?: number
total?: number
}
countId?: string;
current?: number;
maxLimit?: number;
optimizeCountSql?: boolean;
orders?: Array<OrderItem>;
pages?: number;
records?: Array<CourseResources>;
searchCount?: boolean;
size?: number;
total?: number;
};

@ -3,6 +3,7 @@
/* tslint:disable */
/* eslint-disable */
export type ResourceFavourAddRequest = {
resourceId?: number
userId?: string
}
resourceId?: number;
userId?: string;
};

@ -3,10 +3,11 @@
/* tslint:disable */
/* eslint-disable */
export type ResourceFavourQueryRequest = {
current?: number
pageSize?: number
sortField?: string
sortOrder?: string
type?: number
userId?: string
}
current?: number;
pageSize?: number;
sortField?: string;
sortOrder?: string;
type?: number;
userId?: string;
};

@ -3,6 +3,7 @@
/* tslint:disable */
/* eslint-disable */
export type ResourceThumbAddRequest = {
resourceId?: number
userId?: string
}
resourceId?: number;
userId?: string;
};

@ -6,7 +6,8 @@
*
*/
export type StudentCoursesDTO = {
course?: string
id?: string
student?: string
}
course?: string;
id?: string;
student?: string;
};

@ -6,12 +6,13 @@
* VO实体
*/
export type TeacherInfVO = {
/**
* name
*/
name?: string
/**
* username
*/
username?: string
}
/**
* name
*/
name?: string;
/**
* username
*/
username?: string;
};

@ -3,12 +3,13 @@
/* tslint:disable */
/* eslint-disable */
export type UmsAdmin = {
createTime?: string
icon?: string
id?: number
nickName?: string
password?: string
phone?: string
status?: number
username?: string
}
createTime?: string;
icon?: string;
id?: number;
nickName?: string;
password?: string;
phone?: string;
status?: number;
username?: string;
};

@ -3,9 +3,10 @@
/* tslint:disable */
/* eslint-disable */
export type UmsAdminParam = {
icon?: string
nickName?: string
password?: string
phone?: string
username?: string
}
icon?: string;
nickName?: string;
password?: string;
phone?: string;
username?: string;
};

@ -3,23 +3,24 @@
/* tslint:disable */
/* eslint-disable */
export type UmsStudentAndTeacherDTO = {
birthday?: string
className?: string
degree?: string
education?: string
emergencyContact?: string
faculty?: string
id?: number
joinWorkTime?: string
major?: string
name?: string
nationality?: string
number?: string
phone?: string
politicalStatus?: string
profession?: string
professionalTitle?: string
roleId?: number
sex?: string
yearAge?: string
}
birthday?: string;
className?: string;
degree?: string;
education?: string;
emergencyContact?: string;
faculty?: string;
id?: number;
joinWorkTime?: string;
major?: string;
name?: string;
nationality?: string;
number?: string;
phone?: string;
politicalStatus?: string;
profession?: string;
professionalTitle?: string;
roleId?: number;
sex?: string;
yearAge?: string;
};

@ -3,16 +3,17 @@
/* tslint:disable */
/* eslint-disable */
export type UpdateAdminPasswordParam = {
/**
*
*/
newPassword: string
/**
*
*/
oldPassword: string
/**
*
*/
username: string
}
/**
*
*/
newPassword: string;
/**
*
*/
oldPassword: string;
/**
*
*/
username: string;
};

@ -2,97 +2,97 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { BaseResponse_List_CourseResources_ } from '../models/BaseResponse_List_CourseResources_'
import type { BaseResponse_Page_ } from '../models/BaseResponse_Page_'
import type { BaseResponse_string_ } from '../models/BaseResponse_string_'
import type { CourseResources } from '../models/CourseResources'
import type { CancelablePromise } from '../core/CancelablePromise'
import { OpenAPI } from '../core/OpenAPI'
import { request as __request } from '../core/request'
import type { BaseResponse_List_CourseResources_ } from '../models/BaseResponse_List_CourseResources_';
import type { BaseResponse_Page_ } from '../models/BaseResponse_Page_';
import type { BaseResponse_string_ } from '../models/BaseResponse_string_';
import type { CourseResources } from '../models/CourseResources';
import type { CancelablePromise } from '../core/CancelablePromise';
import { OpenAPI } from '../core/OpenAPI';
import { request as __request } from '../core/request';
export class CourseResourceControllerService {
/**
* All
* @returns BaseResponse_List_CourseResources_ OK
* @throws ApiError
*/
public static allUsingGet1(): CancelablePromise<BaseResponse_List_CourseResources_> {
return __request(OpenAPI, {
method: 'GET',
url: '/courses/all',
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
})
}
/**
* deleteRecords
* @param ids ids
* @returns BaseResponse_string_ OK
* @throws ApiError
*/
public static deleteRecordsUsingDelete1(
ids: Array<number>,
): CancelablePromise<BaseResponse_string_> {
return __request(OpenAPI, {
method: 'DELETE',
url: '/courses/delete',
query: {
ids: ids,
},
errors: {
401: `Unauthorized`,
403: `Forbidden`,
},
})
}
/**
* getAll
* @param pagenum pagenum
* @param pagesize pagesize
* @param type type
* @returns BaseResponse_Page_ OK
* @throws ApiError
*/
public static getAllUsingGet1(
pagenum: number = 1,
pagesize: number = 10,
type?: string,
): CancelablePromise<BaseResponse_Page_> {
return __request(OpenAPI, {
method: 'GET',
url: '/courses/getall',
query: {
pagenum: pagenum,
pagesize: pagesize,
type: type,
},
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
})
}
/**
* saveCourseResource
* @param courseResources courseResources
* @returns BaseResponse_string_ OK
* @throws ApiError
*/
public static saveCourseResourceUsingGet1(
courseResources: CourseResources,
): CancelablePromise<BaseResponse_string_> {
return __request(OpenAPI, {
method: 'GET',
url: '/courses/save',
body: courseResources,
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
})
}
/**
* All
* @returns BaseResponse_List_CourseResources_ OK
* @throws ApiError
*/
public static allUsingGet1(): CancelablePromise<BaseResponse_List_CourseResources_> {
return __request(OpenAPI, {
method: 'GET',
url: '/api/courses/all',
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
});
}
/**
* deleteRecords
* @param ids ids
* @returns BaseResponse_string_ OK
* @throws ApiError
*/
public static deleteRecordsUsingDelete1(
ids: Array<number>,
): CancelablePromise<BaseResponse_string_> {
return __request(OpenAPI, {
method: 'DELETE',
url: '/api/courses/delete',
query: {
'ids': ids,
},
errors: {
401: `Unauthorized`,
403: `Forbidden`,
},
});
}
/**
* getAll
* @param pagenum pagenum
* @param pagesize pagesize
* @param type type
* @returns BaseResponse_Page_ OK
* @throws ApiError
*/
public static getAllUsingGet1(
pagenum: number = 1,
pagesize: number = 10,
type?: string,
): CancelablePromise<BaseResponse_Page_> {
return __request(OpenAPI, {
method: 'GET',
url: '/api/courses/getall',
query: {
'pagenum': pagenum,
'pagesize': pagesize,
'type': type,
},
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
});
}
/**
* saveCourseResource
* @param courseResources courseResources
* @returns BaseResponse_string_ OK
* @throws ApiError
*/
public static saveCourseResourceUsingGet1(
courseResources: CourseResources,
): CancelablePromise<BaseResponse_string_> {
return __request(OpenAPI, {
method: 'GET',
url: '/api/courses/save',
body: courseResources,
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
});
}
}

@ -2,46 +2,46 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { BaseResponse_Page_CourseResources_ } from '../models/BaseResponse_Page_CourseResources_'
import type { CancelablePromise } from '../core/CancelablePromise'
import { OpenAPI } from '../core/OpenAPI'
import { request as __request } from '../core/request'
import type { BaseResponse_Page_CourseResources_ } from '../models/BaseResponse_Page_CourseResources_';
import type { CancelablePromise } from '../core/CancelablePromise';
import { OpenAPI } from '../core/OpenAPI';
import { request as __request } from '../core/request';
export class FavourInformationControllerService {
/**
* getInformation2
* @param resourceIdList resourceIdList
* @param type type
* @param current
* @param pageSize
* @param sortField
* @param sortOrder
* @returns BaseResponse_Page_CourseResources_ OK
* @throws ApiError
*/
public static getInformation2UsingGet1(
resourceIdList: Array<number>,
type: number,
current?: number,
pageSize?: number,
sortField?: string,
sortOrder?: string,
): CancelablePromise<BaseResponse_Page_CourseResources_> {
return __request(OpenAPI, {
method: 'GET',
url: '/Favour/get',
query: {
current: current,
pageSize: pageSize,
sortField: sortField,
sortOrder: sortOrder,
resourceIdList: resourceIdList,
type: type,
},
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
})
}
/**
* getInformation2
* @param resourceIdList resourceIdList
* @param type type
* @param current
* @param pageSize
* @param sortField
* @param sortOrder
* @returns BaseResponse_Page_CourseResources_ OK
* @throws ApiError
*/
public static getInformation2UsingGet1(
resourceIdList: Array<number>,
type: number,
current?: number,
pageSize?: number,
sortField?: string,
sortOrder?: string,
): CancelablePromise<BaseResponse_Page_CourseResources_> {
return __request(OpenAPI, {
method: 'GET',
url: '/api/Favour/get',
query: {
'current': current,
'pageSize': pageSize,
'sortField': sortField,
'sortOrder': sortOrder,
'resourceIdList': resourceIdList,
'type': type,
},
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
});
}
}

@ -0,0 +1,97 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { Know } from '../models/Know';
import type { KnowQueryRequest } from '../models/KnowQueryRequest';
import type { KnowRequest } from '../models/KnowRequest';
import type { KnowupdateRequest } from '../models/KnowupdateRequest';
import type { CancelablePromise } from '../core/CancelablePromise';
import { OpenAPI } from '../core/OpenAPI';
import { request as __request } from '../core/request';
export class KnowControllerService {
/**
* add
* @param knowAddRequest knowAddRequest
* @returns boolean OK
* @returns any Created
* @throws ApiError
*/
public static addUsingPost1(
knowAddRequest: KnowRequest,
): CancelablePromise<boolean | any> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/know/add',
body: knowAddRequest,
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
});
}
/**
* deleteKnow
* @param ids ids
* @returns number OK
* @returns any Created
* @throws ApiError
*/
public static deleteKnowUsingPost1(
ids: Array<number>,
): CancelablePromise<number | any> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/know/delete',
body: ids,
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
});
}
/**
* query
* @param knowQueryRequest knowQueryRequest
* @returns Know OK
* @returns any Created
* @throws ApiError
*/
public static queryUsingPost1(
knowQueryRequest: KnowQueryRequest,
): CancelablePromise<Array<Know> | any> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/know/query',
body: knowQueryRequest,
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
});
}
/**
* update
* @param knowAddRequest knowAddRequest
* @returns boolean OK
* @returns any Created
* @throws ApiError
*/
public static updateUsingPost1(
knowAddRequest: KnowupdateRequest,
): CancelablePromise<boolean | any> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/know/update',
body: knowAddRequest,
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
});
}
}

@ -2,98 +2,98 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { BaseResponse_List_LearningRecords_ } from '../models/BaseResponse_List_LearningRecords_'
import type { BaseResponse_Page_ } from '../models/BaseResponse_Page_'
import type { BaseResponse_string_ } from '../models/BaseResponse_string_'
import type { LearningRecords } from '../models/LearningRecords'
import type { CancelablePromise } from '../core/CancelablePromise'
import { OpenAPI } from '../core/OpenAPI'
import { request as __request } from '../core/request'
import type { BaseResponse_List_LearningRecords_ } from '../models/BaseResponse_List_LearningRecords_';
import type { BaseResponse_Page_ } from '../models/BaseResponse_Page_';
import type { BaseResponse_string_ } from '../models/BaseResponse_string_';
import type { LearningRecords } from '../models/LearningRecords';
import type { CancelablePromise } from '../core/CancelablePromise';
import { OpenAPI } from '../core/OpenAPI';
import { request as __request } from '../core/request';
export class LearningRecordsControllerService {
/**
* All
* @returns BaseResponse_List_LearningRecords_ OK
* @throws ApiError
*/
public static allUsingGet3(): CancelablePromise<BaseResponse_List_LearningRecords_> {
return __request(OpenAPI, {
method: 'GET',
url: '/learningrecords/all',
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
})
}
/**
* deleteRecords
* @param ids ids
* @returns BaseResponse_string_ OK
* @throws ApiError
*/
public static deleteRecordsUsingDelete3(
ids: Array<number>,
): CancelablePromise<BaseResponse_string_> {
return __request(OpenAPI, {
method: 'DELETE',
url: '/learningrecords/delete',
query: {
ids: ids,
},
errors: {
401: `Unauthorized`,
403: `Forbidden`,
},
})
}
/**
* getAll
* @param userId userId
* @param pagenum pagenum
* @param pagesize pagesize
* @returns BaseResponse_Page_ OK
* @throws ApiError
*/
public static getAllUsingGet3(
userId: string,
pagenum: number = 1,
pagesize: number = 10,
): CancelablePromise<BaseResponse_Page_> {
return __request(OpenAPI, {
method: 'GET',
url: '/learningrecords/getall',
query: {
pagenum: pagenum,
pagesize: pagesize,
userId: userId,
},
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
})
}
/**
* saveRecords
* @param learningRecords learningRecords
* @returns BaseResponse_string_ OK
* @returns any Created
* @throws ApiError
*/
public static saveRecordsUsingPost1(
learningRecords: LearningRecords,
): CancelablePromise<BaseResponse_string_ | any> {
return __request(OpenAPI, {
method: 'POST',
url: '/learningrecords/saverecords',
body: learningRecords,
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
})
}
/**
* All
* @returns BaseResponse_List_LearningRecords_ OK
* @throws ApiError
*/
public static allUsingGet3(): CancelablePromise<BaseResponse_List_LearningRecords_> {
return __request(OpenAPI, {
method: 'GET',
url: '/api/learningrecords/all',
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
});
}
/**
* deleteRecords
* @param ids ids
* @returns BaseResponse_string_ OK
* @throws ApiError
*/
public static deleteRecordsUsingDelete3(
ids: Array<number>,
): CancelablePromise<BaseResponse_string_> {
return __request(OpenAPI, {
method: 'DELETE',
url: '/api/learningrecords/delete',
query: {
'ids': ids,
},
errors: {
401: `Unauthorized`,
403: `Forbidden`,
},
});
}
/**
* getAll
* @param userId userId
* @param pagenum pagenum
* @param pagesize pagesize
* @returns BaseResponse_Page_ OK
* @throws ApiError
*/
public static getAllUsingGet3(
userId: string,
pagenum: number = 1,
pagesize: number = 10,
): CancelablePromise<BaseResponse_Page_> {
return __request(OpenAPI, {
method: 'GET',
url: '/api/learningrecords/getall',
query: {
'pagenum': pagenum,
'pagesize': pagesize,
'userId': userId,
},
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
});
}
/**
* saveRecords
* @param learningRecords learningRecords
* @returns BaseResponse_string_ OK
* @returns any Created
* @throws ApiError
*/
public static saveRecordsUsingPost1(
learningRecords: LearningRecords,
): CancelablePromise<BaseResponse_string_ | any> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/learningrecords/saverecords',
body: learningRecords,
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
});
}
}

@ -2,57 +2,57 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { BaseResponse_string_ } from '../models/BaseResponse_string_'
import type { CancelablePromise } from '../core/CancelablePromise'
import { OpenAPI } from '../core/OpenAPI'
import { request as __request } from '../core/request'
import type { BaseResponse_string_ } from '../models/BaseResponse_string_';
import type { CancelablePromise } from '../core/CancelablePromise';
import { OpenAPI } from '../core/OpenAPI';
import { request as __request } from '../core/request';
export class ResourceControllerService {
/**
* download
* @param id Id
* @param path path
* @returns BaseResponse_string_ OK
* @throws ApiError
*/
public static downloadUsingGet1(
id: string,
path: string,
): CancelablePromise<BaseResponse_string_> {
return __request(OpenAPI, {
method: 'GET',
url: '/download',
query: {
Id: id,
path: path,
},
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
})
}
/**
* upload
* @param file file
* @returns BaseResponse_string_ OK
* @returns any Created
* @throws ApiError
*/
public static uploadUsingPost1(
file?: Blob,
): CancelablePromise<BaseResponse_string_ | any> {
return __request(OpenAPI, {
method: 'POST',
url: '/upload',
formData: {
file: file,
},
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
})
}
/**
* download
* @param id Id
* @param path path
* @returns BaseResponse_string_ OK
* @throws ApiError
*/
public static downloadUsingGet1(
id: string,
path: string,
): CancelablePromise<BaseResponse_string_> {
return __request(OpenAPI, {
method: 'GET',
url: '/download',
query: {
'Id': id,
'path': path,
},
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
});
}
/**
* upload
* @param file file
* @returns BaseResponse_string_ OK
* @returns any Created
* @throws ApiError
*/
public static uploadUsingPost1(
file?: Blob,
): CancelablePromise<BaseResponse_string_ | any> {
return __request(OpenAPI, {
method: 'POST',
url: '/upload',
formData: {
'file': file,
},
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
});
}
}

@ -2,98 +2,98 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { BaseResponse_boolean_ } from '../models/BaseResponse_boolean_'
import type { BaseResponse_long_ } from '../models/BaseResponse_long_'
import type { BaseResponse_Page_CourseFavourDetailVO_ } from '../models/BaseResponse_Page_CourseFavourDetailVO_'
import type { CourseFavourAddRequest } from '../models/CourseFavourAddRequest'
import type { CourseFavourAllRequest } from '../models/CourseFavourAllRequest'
import type { CourseFavourQueryRequest } from '../models/CourseFavourQueryRequest'
import type { CancelablePromise } from '../core/CancelablePromise'
import { OpenAPI } from '../core/OpenAPI'
import { request as __request } from '../core/request'
import type { BaseResponse_boolean_ } from '../models/BaseResponse_boolean_';
import type { BaseResponse_long_ } from '../models/BaseResponse_long_';
import type { BaseResponse_Page_CourseFavourDetailVO_ } from '../models/BaseResponse_Page_CourseFavourDetailVO_';
import type { CourseFavourAddRequest } from '../models/CourseFavourAddRequest';
import type { CourseFavourAllRequest } from '../models/CourseFavourAllRequest';
import type { CourseFavourQueryRequest } from '../models/CourseFavourQueryRequest';
import type { CancelablePromise } from '../core/CancelablePromise';
import { OpenAPI } from '../core/OpenAPI';
import { request as __request } from '../core/request';
export class SeCourseFavourControllerService {
/**
* doFavour
* @param courseFavourAddRequest courseFavourAddRequest
* @returns BaseResponse_boolean_ OK
* @returns any Created
* @throws ApiError
*/
public static doFavourUsingPost1(
courseFavourAddRequest: CourseFavourAddRequest,
): CancelablePromise<BaseResponse_boolean_ | any> {
return __request(OpenAPI, {
method: 'POST',
url: '/course_favour/add',
body: courseFavourAddRequest,
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
})
}
/**
* favourCount
* @param courseFavourAddRequest courseFavourAddRequest
* @returns BaseResponse_long_ OK
* @returns any Created
* @throws ApiError
*/
public static favourCountUsingPost1(
courseFavourAddRequest: CourseFavourAddRequest,
): CancelablePromise<BaseResponse_long_ | any> {
return __request(OpenAPI, {
method: 'POST',
url: '/course_favour/count',
body: courseFavourAddRequest,
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
})
}
/**
* courseCount
* @param courseFavourAllRequest courseFavourAllRequest
* @returns BaseResponse_long_ OK
* @returns any Created
* @throws ApiError
*/
public static courseCountUsingPost1(
courseFavourAllRequest: CourseFavourAllRequest,
): CancelablePromise<BaseResponse_long_ | any> {
return __request(OpenAPI, {
method: 'POST',
url: '/course_favour/countAll',
body: courseFavourAllRequest,
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
})
}
/**
* listPostByPage
* @param courseFavourQueryRequest courseFavourQueryRequest
* @returns BaseResponse_Page_CourseFavourDetailVO_ OK
* @returns any Created
* @throws ApiError
*/
public static listPostByPageUsingPost1(
courseFavourQueryRequest: CourseFavourQueryRequest,
): CancelablePromise<BaseResponse_Page_CourseFavourDetailVO_ | any> {
return __request(OpenAPI, {
method: 'POST',
url: '/course_favour/list/page',
body: courseFavourQueryRequest,
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
})
}
/**
* doFavour
* @param courseFavourAddRequest courseFavourAddRequest
* @returns BaseResponse_boolean_ OK
* @returns any Created
* @throws ApiError
*/
public static doFavourUsingPost1(
courseFavourAddRequest: CourseFavourAddRequest,
): CancelablePromise<BaseResponse_boolean_ | any> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/course_favour/add',
body: courseFavourAddRequest,
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
});
}
/**
* favourCount
* @param courseFavourAddRequest courseFavourAddRequest
* @returns BaseResponse_long_ OK
* @returns any Created
* @throws ApiError
*/
public static favourCountUsingPost1(
courseFavourAddRequest: CourseFavourAddRequest,
): CancelablePromise<BaseResponse_long_ | any> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/course_favour/count',
body: courseFavourAddRequest,
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
});
}
/**
* courseCount
* @param courseFavourAllRequest courseFavourAllRequest
* @returns BaseResponse_long_ OK
* @returns any Created
* @throws ApiError
*/
public static courseCountUsingPost1(
courseFavourAllRequest: CourseFavourAllRequest,
): CancelablePromise<BaseResponse_long_ | any> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/course_favour/countAll',
body: courseFavourAllRequest,
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
});
}
/**
* listPostByPage
* @param courseFavourQueryRequest courseFavourQueryRequest
* @returns BaseResponse_Page_CourseFavourDetailVO_ OK
* @returns any Created
* @throws ApiError
*/
public static listPostByPageUsingPost1(
courseFavourQueryRequest: CourseFavourQueryRequest,
): CancelablePromise<BaseResponse_Page_CourseFavourDetailVO_ | any> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/course_favour/list/page',
body: courseFavourQueryRequest,
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
});
}
}

@ -2,53 +2,53 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { BaseResponse_boolean_ } from '../models/BaseResponse_boolean_'
import type { BaseResponse_long_ } from '../models/BaseResponse_long_'
import type { CourseThumbAddRequest } from '../models/CourseThumbAddRequest'
import type { CancelablePromise } from '../core/CancelablePromise'
import { OpenAPI } from '../core/OpenAPI'
import { request as __request } from '../core/request'
import type { BaseResponse_boolean_ } from '../models/BaseResponse_boolean_';
import type { BaseResponse_long_ } from '../models/BaseResponse_long_';
import type { CourseThumbAddRequest } from '../models/CourseThumbAddRequest';
import type { CancelablePromise } from '../core/CancelablePromise';
import { OpenAPI } from '../core/OpenAPI';
import { request as __request } from '../core/request';
export class SeCourseThumbControllerService {
/**
* doThumb
* @param courseThumbAddRequest courseThumbAddRequest
* @returns BaseResponse_boolean_ OK
* @returns any Created
* @throws ApiError
*/
public static doThumbUsingPost1(
courseThumbAddRequest: CourseThumbAddRequest,
): CancelablePromise<BaseResponse_boolean_ | any> {
return __request(OpenAPI, {
method: 'POST',
url: '/course_thumb/',
body: courseThumbAddRequest,
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
})
}
/**
* thumbCount
* @param courseThumbAddRequest courseThumbAddRequest
* @returns BaseResponse_long_ OK
* @returns any Created
* @throws ApiError
*/
public static thumbCountUsingPost1(
courseThumbAddRequest: CourseThumbAddRequest,
): CancelablePromise<BaseResponse_long_ | any> {
return __request(OpenAPI, {
method: 'POST',
url: '/course_thumb/count',
body: courseThumbAddRequest,
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
})
}
/**
* doThumb
* @param courseThumbAddRequest courseThumbAddRequest
* @returns BaseResponse_boolean_ OK
* @returns any Created
* @throws ApiError
*/
public static doThumbUsingPost1(
courseThumbAddRequest: CourseThumbAddRequest,
): CancelablePromise<BaseResponse_boolean_ | any> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/course_thumb/',
body: courseThumbAddRequest,
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
});
}
/**
* thumbCount
* @param courseThumbAddRequest courseThumbAddRequest
* @returns BaseResponse_long_ OK
* @returns any Created
* @throws ApiError
*/
public static thumbCountUsingPost1(
courseThumbAddRequest: CourseThumbAddRequest,
): CancelablePromise<BaseResponse_long_ | any> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/course_thumb/count',
body: courseThumbAddRequest,
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
});
}
}

@ -2,31 +2,31 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { BaseResponse_boolean_ } from '../models/BaseResponse_boolean_'
import type { KnowFavourAddRequest } from '../models/KnowFavourAddRequest'
import type { CancelablePromise } from '../core/CancelablePromise'
import { OpenAPI } from '../core/OpenAPI'
import { request as __request } from '../core/request'
import type { BaseResponse_boolean_ } from '../models/BaseResponse_boolean_';
import type { KnowFavourAddRequest } from '../models/KnowFavourAddRequest';
import type { CancelablePromise } from '../core/CancelablePromise';
import { OpenAPI } from '../core/OpenAPI';
import { request as __request } from '../core/request';
export class SeKnowFavourControllerService {
/**
* doFavour
* @param knowFavourAddRequest knowFavourAddRequest
* @returns BaseResponse_boolean_ OK
* @returns any Created
* @throws ApiError
*/
public static doFavourUsingPost3(
knowFavourAddRequest: KnowFavourAddRequest,
): CancelablePromise<BaseResponse_boolean_ | any> {
return __request(OpenAPI, {
method: 'POST',
url: '/know_favour/add',
body: knowFavourAddRequest,
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
})
}
/**
* doFavour
* @param knowFavourAddRequest knowFavourAddRequest
* @returns BaseResponse_boolean_ OK
* @returns any Created
* @throws ApiError
*/
public static doFavourUsingPost3(
knowFavourAddRequest: KnowFavourAddRequest,
): CancelablePromise<BaseResponse_boolean_ | any> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/know_favour/add',
body: knowFavourAddRequest,
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
});
}
}

@ -2,31 +2,31 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { BaseResponse_boolean_ } from '../models/BaseResponse_boolean_'
import type { KnowThumbAddRequest } from '../models/KnowThumbAddRequest'
import type { CancelablePromise } from '../core/CancelablePromise'
import { OpenAPI } from '../core/OpenAPI'
import { request as __request } from '../core/request'
import type { BaseResponse_boolean_ } from '../models/BaseResponse_boolean_';
import type { KnowThumbAddRequest } from '../models/KnowThumbAddRequest';
import type { CancelablePromise } from '../core/CancelablePromise';
import { OpenAPI } from '../core/OpenAPI';
import { request as __request } from '../core/request';
export class SeKnowThumbControllerService {
/**
* doThumb
* @param knowThumbAddRequest knowThumbAddRequest
* @returns BaseResponse_boolean_ OK
* @returns any Created
* @throws ApiError
*/
public static doThumbUsingPost3(
knowThumbAddRequest: KnowThumbAddRequest,
): CancelablePromise<BaseResponse_boolean_ | any> {
return __request(OpenAPI, {
method: 'POST',
url: '/know_thumb/add',
body: knowThumbAddRequest,
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
})
}
/**
* doThumb
* @param knowThumbAddRequest knowThumbAddRequest
* @returns BaseResponse_boolean_ OK
* @returns any Created
* @throws ApiError
*/
public static doThumbUsingPost3(
knowThumbAddRequest: KnowThumbAddRequest,
): CancelablePromise<BaseResponse_boolean_ | any> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/know_thumb/add',
body: knowThumbAddRequest,
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
});
}
}

@ -2,54 +2,54 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { BaseResponse_boolean_ } from '../models/BaseResponse_boolean_'
import type { BaseResponse_Page_CourseResources_ } from '../models/BaseResponse_Page_CourseResources_'
import type { ResourceFavourAddRequest } from '../models/ResourceFavourAddRequest'
import type { ResourceFavourQueryRequest } from '../models/ResourceFavourQueryRequest'
import type { CancelablePromise } from '../core/CancelablePromise'
import { OpenAPI } from '../core/OpenAPI'
import { request as __request } from '../core/request'
import type { BaseResponse_boolean_ } from '../models/BaseResponse_boolean_';
import type { BaseResponse_Page_CourseResources_ } from '../models/BaseResponse_Page_CourseResources_';
import type { ResourceFavourAddRequest } from '../models/ResourceFavourAddRequest';
import type { ResourceFavourQueryRequest } from '../models/ResourceFavourQueryRequest';
import type { CancelablePromise } from '../core/CancelablePromise';
import { OpenAPI } from '../core/OpenAPI';
import { request as __request } from '../core/request';
export class SeResourceFavourControllerService {
/**
* doFavour
* @param resourceFavourAddRequest resourceFavourAddRequest
* @returns BaseResponse_boolean_ OK
* @returns any Created
* @throws ApiError
*/
public static doFavourUsingPost5(
resourceFavourAddRequest: ResourceFavourAddRequest,
): CancelablePromise<BaseResponse_boolean_ | any> {
return __request(OpenAPI, {
method: 'POST',
url: '/resource_favour/add',
body: resourceFavourAddRequest,
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
})
}
/**
* listPostByPage
* @param resourceFavourQueryRequest resourceFavourQueryRequest
* @returns BaseResponse_Page_CourseResources_ OK
* @returns any Created
* @throws ApiError
*/
public static listPostByPageUsingPost3(
resourceFavourQueryRequest: ResourceFavourQueryRequest,
): CancelablePromise<BaseResponse_Page_CourseResources_ | any> {
return __request(OpenAPI, {
method: 'POST',
url: '/resource_favour/list/page',
body: resourceFavourQueryRequest,
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
})
}
/**
* doFavour
* @param resourceFavourAddRequest resourceFavourAddRequest
* @returns BaseResponse_boolean_ OK
* @returns any Created
* @throws ApiError
*/
public static doFavourUsingPost5(
resourceFavourAddRequest: ResourceFavourAddRequest,
): CancelablePromise<BaseResponse_boolean_ | any> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/resource_favour/add',
body: resourceFavourAddRequest,
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
});
}
/**
* listPostByPage
* @param resourceFavourQueryRequest resourceFavourQueryRequest
* @returns BaseResponse_Page_CourseResources_ OK
* @returns any Created
* @throws ApiError
*/
public static listPostByPageUsingPost3(
resourceFavourQueryRequest: ResourceFavourQueryRequest,
): CancelablePromise<BaseResponse_Page_CourseResources_ | any> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/resource_favour/list/page',
body: resourceFavourQueryRequest,
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
});
}
}

@ -2,31 +2,31 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { BaseResponse_boolean_ } from '../models/BaseResponse_boolean_'
import type { ResourceThumbAddRequest } from '../models/ResourceThumbAddRequest'
import type { CancelablePromise } from '../core/CancelablePromise'
import { OpenAPI } from '../core/OpenAPI'
import { request as __request } from '../core/request'
import type { BaseResponse_boolean_ } from '../models/BaseResponse_boolean_';
import type { ResourceThumbAddRequest } from '../models/ResourceThumbAddRequest';
import type { CancelablePromise } from '../core/CancelablePromise';
import { OpenAPI } from '../core/OpenAPI';
import { request as __request } from '../core/request';
export class SeResourceThumbControllerService {
/**
* doThumb
* @param resourceThumbAddRequest resourceThumbAddRequest
* @returns BaseResponse_boolean_ OK
* @returns any Created
* @throws ApiError
*/
public static doThumbUsingPost5(
resourceThumbAddRequest: ResourceThumbAddRequest,
): CancelablePromise<BaseResponse_boolean_ | any> {
return __request(OpenAPI, {
method: 'POST',
url: '/resource_thumb/add',
body: resourceThumbAddRequest,
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
})
}
/**
* doThumb
* @param resourceThumbAddRequest resourceThumbAddRequest
* @returns BaseResponse_boolean_ OK
* @returns any Created
* @throws ApiError
*/
public static doThumbUsingPost5(
resourceThumbAddRequest: ResourceThumbAddRequest,
): CancelablePromise<BaseResponse_boolean_ | any> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/resource_thumb/add',
body: resourceThumbAddRequest,
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
});
}
}

File diff suppressed because it is too large Load Diff

@ -2,265 +2,265 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { BaseResponse_List_TeacherInfVO_ } from '../models/BaseResponse_List_TeacherInfVO_'
import type { CommonResult } from '../models/CommonResult'
import type { CommonResult_string_ } from '../models/CommonResult_string_'
import type { CommonResult_UmsAdmin_ } from '../models/CommonResult_UmsAdmin_'
import type { UmsAdmin } from '../models/UmsAdmin'
import type { UmsAdminParam } from '../models/UmsAdminParam'
import type { UmsStudentAndTeacherDTO } from '../models/UmsStudentAndTeacherDTO'
import type { UpdateAdminPasswordParam } from '../models/UpdateAdminPasswordParam'
import type { CancelablePromise } from '../core/CancelablePromise'
import { OpenAPI } from '../core/OpenAPI'
import { request as __request } from '../core/request'
import type { BaseResponse_List_TeacherInfVO_ } from '../models/BaseResponse_List_TeacherInfVO_';
import type { CommonResult } from '../models/CommonResult';
import type { CommonResult_string_ } from '../models/CommonResult_string_';
import type { CommonResult_UmsAdmin_ } from '../models/CommonResult_UmsAdmin_';
import type { UmsAdmin } from '../models/UmsAdmin';
import type { UmsAdminParam } from '../models/UmsAdminParam';
import type { UmsStudentAndTeacherDTO } from '../models/UmsStudentAndTeacherDTO';
import type { UpdateAdminPasswordParam } from '../models/UpdateAdminPasswordParam';
import type { CancelablePromise } from '../core/CancelablePromise';
import { OpenAPI } from '../core/OpenAPI';
import { request as __request } from '../core/request';
export class UmsAdminControllerService {
/**
*
* @param phone phone
* @returns CommonResult_string_ OK
* @returns any Created
* @throws ApiError
*/
public static sendVerifyCodeUsingPost1(
phone: string,
): CancelablePromise<CommonResult_string_ | any> {
return __request(OpenAPI, {
method: 'POST',
url: '/user/code',
query: {
phone: phone,
},
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
})
}
/**
* username和name
* @returns BaseResponse_List_TeacherInfVO_ OK
* @throws ApiError
*/
public static getTeacherInfListUsingGet1(): CancelablePromise<BaseResponse_List_TeacherInfVO_> {
return __request(OpenAPI, {
method: 'GET',
url: '/user/get_teacherinf_list',
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
})
}
/**
*
* @param name
* @returns CommonResult OK
* @throws ApiError
*/
public static getAdminInfoUsingGet1(
name?: string,
): CancelablePromise<CommonResult> {
return __request(OpenAPI, {
method: 'GET',
url: '/user/info',
query: {
name: name,
},
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
})
}
/**
* token
* @param umsAdmin umsAdmin
* @returns CommonResult OK
* @returns any Created
* @throws ApiError
*/
public static loginUsingPost1(
umsAdmin: UmsAdmin,
): CancelablePromise<CommonResult | any> {
return __request(OpenAPI, {
method: 'POST',
url: '/user/login',
body: umsAdmin,
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
})
}
/**
*
* @param id id
* @returns CommonResult OK
* @returns any Created
* @throws ApiError
*/
public static getByIdPersonalInfoUsingPost1(
id: string,
): CancelablePromise<CommonResult | any> {
return __request(OpenAPI, {
method: 'POST',
url: '/user/personal/info',
query: {
id: id,
},
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
})
}
/**
* token
* @param phone phone
* @returns CommonResult OK
* @returns any Created
* @throws ApiError
*/
public static phoneLoginUsingPost1(
phone: string,
): CancelablePromise<CommonResult | any> {
return __request(OpenAPI, {
method: 'POST',
url: '/user/phone/login',
query: {
phone: phone,
},
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
})
}
/**
*
* @param umsAdminParam umsAdminParam
* @returns CommonResult_UmsAdmin_ OK
* @returns any Created
* @throws ApiError
*/
public static phoneRegisterUsingPost1(
umsAdminParam: UmsAdminParam,
): CancelablePromise<CommonResult_UmsAdmin_ | any> {
return __request(OpenAPI, {
method: 'POST',
url: '/user/phone/register',
body: umsAdminParam,
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
})
}
/**
* token
* @returns CommonResult OK
* @throws ApiError
*/
public static refreshTokenUsingGet1(): CancelablePromise<CommonResult> {
return __request(OpenAPI, {
method: 'GET',
url: '/user/refreshToken',
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
})
}
/**
*
* @param umsAdminParam umsAdminParam
* @returns CommonResult_UmsAdmin_ OK
* @returns any Created
* @throws ApiError
*/
public static registerUsingPost1(
umsAdminParam: UmsAdminParam,
): CancelablePromise<CommonResult_UmsAdmin_ | any> {
return __request(OpenAPI, {
method: 'POST',
url: '/user/register',
body: umsAdminParam,
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
})
}
/**
*
* @param umsadmin umsadmin
* @returns CommonResult OK
* @returns any Created
* @throws ApiError
*/
public static updateUmsUsingPost1(
umsadmin: UmsAdmin,
): CancelablePromise<CommonResult | any> {
return __request(OpenAPI, {
method: 'POST',
url: '/user/update',
body: umsadmin,
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
})
}
/**
*
* @param umsStudentAndTeacherDto umsStudentAndTeacherDTO
* @returns CommonResult OK
* @returns any Created
* @throws ApiError
*/
public static updatePersonalInfoUsingPost1(
umsStudentAndTeacherDto: UmsStudentAndTeacherDTO,
): CancelablePromise<CommonResult | any> {
return __request(OpenAPI, {
method: 'POST',
url: '/user/update/PersonalInfo',
body: umsStudentAndTeacherDto,
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
})
}
/**
*
* @param updatePasswordParam updatePasswordParam
* @returns CommonResult OK
* @returns any Created
* @throws ApiError
*/
public static updatePasswordUsingPost1(
updatePasswordParam: UpdateAdminPasswordParam,
): CancelablePromise<CommonResult | any> {
return __request(OpenAPI, {
method: 'POST',
url: '/user/updatePassword',
body: updatePasswordParam,
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
})
}
/**
*
* @param phone phone
* @returns CommonResult_string_ OK
* @returns any Created
* @throws ApiError
*/
public static sendVerifyCodeUsingPost1(
phone: string,
): CancelablePromise<CommonResult_string_ | any> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/user/code',
query: {
'phone': phone,
},
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
});
}
/**
* username和name
* @returns BaseResponse_List_TeacherInfVO_ OK
* @throws ApiError
*/
public static getTeacherInfListUsingGet1(): CancelablePromise<BaseResponse_List_TeacherInfVO_> {
return __request(OpenAPI, {
method: 'GET',
url: '/api/user/get_teacherinf_list',
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
});
}
/**
*
* @param name
* @returns CommonResult OK
* @throws ApiError
*/
public static getAdminInfoUsingGet1(
name?: string,
): CancelablePromise<CommonResult> {
return __request(OpenAPI, {
method: 'GET',
url: '/api/user/info',
query: {
'name': name,
},
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
});
}
/**
* token
* @param umsAdmin umsAdmin
* @returns CommonResult OK
* @returns any Created
* @throws ApiError
*/
public static loginUsingPost1(
umsAdmin: UmsAdmin,
): CancelablePromise<CommonResult | any> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/user/login',
body: umsAdmin,
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
});
}
/**
*
* @param id id
* @returns CommonResult OK
* @returns any Created
* @throws ApiError
*/
public static getByIdPersonalInfoUsingPost1(
id: string,
): CancelablePromise<CommonResult | any> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/user/personal/info',
query: {
'id': id,
},
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
});
}
/**
* token
* @param phone phone
* @returns CommonResult OK
* @returns any Created
* @throws ApiError
*/
public static phoneLoginUsingPost1(
phone: string,
): CancelablePromise<CommonResult | any> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/user/phone/login',
query: {
'phone': phone,
},
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
});
}
/**
*
* @param umsAdminParam umsAdminParam
* @returns CommonResult_UmsAdmin_ OK
* @returns any Created
* @throws ApiError
*/
public static phoneRegisterUsingPost1(
umsAdminParam: UmsAdminParam,
): CancelablePromise<CommonResult_UmsAdmin_ | any> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/user/phone/register',
body: umsAdminParam,
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
});
}
/**
* token
* @returns CommonResult OK
* @throws ApiError
*/
public static refreshTokenUsingGet1(): CancelablePromise<CommonResult> {
return __request(OpenAPI, {
method: 'GET',
url: '/api/user/refreshToken',
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
});
}
/**
*
* @param umsAdminParam umsAdminParam
* @returns CommonResult_UmsAdmin_ OK
* @returns any Created
* @throws ApiError
*/
public static registerUsingPost1(
umsAdminParam: UmsAdminParam,
): CancelablePromise<CommonResult_UmsAdmin_ | any> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/user/register',
body: umsAdminParam,
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
});
}
/**
*
* @param umsadmin umsadmin
* @returns CommonResult OK
* @returns any Created
* @throws ApiError
*/
public static updateUmsUsingPost1(
umsadmin: UmsAdmin,
): CancelablePromise<CommonResult | any> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/user/update',
body: umsadmin,
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
});
}
/**
*
* @param umsStudentAndTeacherDto umsStudentAndTeacherDTO
* @returns CommonResult OK
* @returns any Created
* @throws ApiError
*/
public static updatePersonalInfoUsingPost1(
umsStudentAndTeacherDto: UmsStudentAndTeacherDTO,
): CancelablePromise<CommonResult | any> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/user/update/PersonalInfo',
body: umsStudentAndTeacherDto,
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
});
}
/**
*
* @param updatePasswordParam updatePasswordParam
* @returns CommonResult OK
* @returns any Created
* @throws ApiError
*/
public static updatePasswordUsingPost1(
updatePasswordParam: UpdateAdminPasswordParam,
): CancelablePromise<CommonResult | any> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/user/updatePassword',
body: updatePasswordParam,
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
});
}
}

@ -5,7 +5,7 @@
"type": "module",
"scripts": {
"dev": "vite --open",
"build": "vue-tsc && vite build",
"build": "vite build",
"preview": "vite preview",
"build:test": "vue-tsc && vite build --mode test",
"build:pro": "vue-tsc && vite build --mode production",

@ -1,8 +1,8 @@
import request from '@/utils/request'
//获取浏览记录列表
export const getRecordListService = (params) =>
request.get('/learningrecords/getall', { params })
request.get('/api/learningrecords/getall', { params })
//删除浏览记录
export function DelRecordService(ids) {
return request.delete(`h/learningrecords/delete?ids=${ids}`)
return request.delete(`h//api/learningrecords/delete?ids=${ids}`)
}

@ -1,35 +1,35 @@
import request from '@/utils/request'
// 获取课程列表
export const getCourseListApi = (params) => {
return request.get('/coursesteacher/page', {
return request.get('/api/coursesteacher/page', {
params,
})
}
// 编辑课程
export const editCourseApi = (params) => {
return request.put('/coursesteacher', params)
return request.put('/api/coursesteacher', params)
}
// 添加课程
export const addCourseApi = (data) => {
return request.post(`/coursesteacher/addcourse`, data)
return request.post(`/api/coursesteacher/addcourse`, data)
}
// 获取课程详情
export const getCourseDetailApi = (id) => {
return request.get(`/coursesteacher/${id}`)
return request.get(`/api/coursesteacher/${id}`)
}
// 删除课程
export const deleteCourseApi = (id) => {
return request.delete(`/coursesteacher/${id}`)
return request.delete(`/api/coursesteacher/${id}`)
}
// 获取课程id
export const getCourseObjectApi = (id) => {
return request.get(`/course_objectives/list/${id}`)
return request.get(`/api/course_objectives/list/${id}`)
}
// 获取教师列表
export const getTeacherListApi = () => {
return request.get('/user/get_teacherinf_list')
return request.get('/api/user/get_teacherinf_list')
}
export const fnNameGet = (params) => {
@ -44,7 +44,7 @@ export const getPageCourses = (data) => {
console.log(data.pageSize)
// return request.get(`/courses/index`,data)
return request.get(
`/coursesteacher/index?page=${data.page}&pageSize=${data.pageSize}`,
`/api/coursesteacher/index?page=${data.page}&pageSize=${data.pageSize}`,
)
}
// {id:1}

@ -3,9 +3,9 @@ import { loginType, loginResponseType, userInfoType } from './types'
//项目用户相关的请求地址
enum API {
LOGIN_URL = '/user/login',
USERINFO_URL = '/user/info',
LOGOUT_URL = '/user/logout',
LOGIN_URL = '/api/user/login',
USERINFO_URL = '/api/user/info',
LOGOUT_URL = '/api/user/logout',
}
// 用户登录
export const reqLogin = (data: loginType) =>

@ -1,48 +1,48 @@
import request from '@/utils/request'
//账号登录接口
export const userLoginService = (loginData) => {
return request.post('/user/login', loginData, {
return request.post('/api/user/login', loginData, {
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
})
}
//手机号登录接口
export const userPhoneLoginService = (phones) => {
return request.post('/user/phone/login?phone=' + phones)
return request.post('/api/user/phone/login?phone=' + phones)
}
//账号注册接口
export const userRegisterService = (jsonData) => {
return request.post('/user/register', jsonData, {
return request.post('/api/user/register', jsonData, {
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
})
}
//手机号注册接口
export const userPhoneRegisterService = (jsonData) => {
return request.post('/user/phone/register', jsonData, {
return request.post('/api/user/phone/register', jsonData, {
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
})
}
//手机号验证码请求
export const userCodeRegisterService = (phoness) => {
return request.post('/user/code?phone=' + phoness)
return request.post('/api/user/code?phone=' + phoness)
}
//用户信息接口
export const userGetInfoService = (token) =>
request.get('/user/info', {
request.get('/api/user/info', {
headers: { Authorization: `Bearer ${token}` },
})
//修改用户信息
export const userChangeService = (jsonData) => {
return request.post('/user/update', jsonData, {
return request.post('/api/user/update', jsonData, {
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
})
}
//获取身份信息
export const userIdenService = (id) => {
return request.post('/user/personal/info?id=' + id)
return request.post('/api/user/personal/info?id=' + id)
}
//修改身份信息
export const userIdenChangeService = (dataToSend) => {
return request.post('/user/update/PersonalInfo', dataToSend, {
return request.post('/api/user/update/PersonalInfo', dataToSend, {
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
})
}

Loading…
Cancel
Save