20 lines
654 B
TypeScript
20 lines
654 B
TypeScript
import { ILoginRequest } from "./dto";
|
|
import R from "./axios";
|
|
import * as CryptoJS from "crypto-js";
|
|
|
|
export const getCourseList = () => R.post("/api/course/select/all");
|
|
|
|
export const getCourseDetailById = (course_id: string) =>
|
|
R.post("/api/course/detail/select", { course_id });
|
|
|
|
export const userLogin = (p: ILoginRequest) =>
|
|
R.post("/api/user/web/auth", { ...p });
|
|
|
|
export const userState = () => R.get("/api/user/web/state");
|
|
|
|
export const sms = (phoneNumber: string | number) => {
|
|
const payload = "" + phoneNumber;
|
|
const sign = "" + CryptoJS.AES.encrypt(payload, payload);
|
|
return R.post("/api/user/web/sms", { sign, phoneNumber });
|
|
};
|