123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256 |
- const axios = require("@/common/axios").default;
- import qs from "qs";
- // import axios from '@/common/axios'
- const api = "/api-teacher";
- import request from "@/helpers/request";
- // 发送登录短信验证码
- const sendSmsRequest = (data) => {
- return request({
- url: "/code/sendSms",
- method: "post",
- requestType: "form",
- data,
- });
- };
- // 校验登录图形验证码
- const verifyLoginImage = (data) => {
- return request({
- url: "/code/verifyLoginImage",
- method: "post",
- requestType: "form",
- data,
- });
- };
- // 手机号密码方式登录
- const usernameLogin = (data) => {
- return axios({
- url: "/api-auth/usernameLogin",
- method: "post",
- data: qs.stringify(data),
- });
- };
- // 发送登录短信验证码
- const sendSms = (data) => {
- return axios({
- url: "/api-student/code/sendSms",
- method: "post",
- data: qs.stringify(data),
- });
- };
- // 短信验证码的方式登录
- const smsLogin = (data) => {
- return axios({
- url: "/api-auth/smsLogin",
- method: "post",
- data: qs.stringify(data),
- });
- };
- // 注册登录
- const registerAdd = (data) => {
- return axios({
- url: "/api-student/register/add",
- method: "post",
- data: qs.stringify(data),
- });
- };
- // 设置密码
- const userSetPassword = (data) => {
- return axios({
- url: "/api-auth/user/setPassword",
- method: "post",
- data: qs.stringify(data),
- });
- };
- // 检查手机号
- const queryUserByPhone = (data) => {
- return axios({
- url: "/api-auth/user/noAuth/queryUserByPhone",
- method: "get",
- params: data,
- });
- };
- // 获取课程组详情
- const getGroupDetail = (data) => {
- return axios({
- url: "/api-student/courseGroup/getGroupDetail",
- method: "get",
- params: data,
- });
- };
- // 购买课程组
- const buyCourseGroup = (data) => {
- return axios({
- url: "/api-student/courseGroup/buyCourseGroup",
- method: "post",
- data: qs.stringify(data),
- });
- };
- // 创建课程
- const createCourseGroup = (data) => {
- return axios({
- url: api + "/courseGroup/createCourseGroup",
- method: "post",
- data: data,
- });
- };
- const sysTenantAccountGet = (data) => {
- return axios({
- url: api + "/sysTenantAccount/get",
- method: "get",
- params: data,
- });
- };
- const queryTenantAccountDetail = (data) => {
- return axios({
- url: api + "/sysTenantAccount/queryTenantAccountDetail",
- method: "get",
- params: data,
- });
- };
- // 课时使用记录列表
- const teacherCourseMinutes = (data) => {
- return axios({
- url: api + "/teacherCourseSchedule/teacherCourseMinutes",
- method: "get",
- params: data,
- });
- };
- // 分页查询活动列表
- const tenantEntryActivitesList = (data) => {
- return axios({
- url: api + "/tenantEntryActivities/queryPage",
- method: "get",
- params: data,
- });
- };
- // 分页查询活动列表
- const createOrder = (data) => {
- return axios({
- url: api + "/tenantPaymentOrder/createOrder",
- method: "post",
- data: qs.stringify(data),
- });
- };
- // 订单号查询信息
- const queryByOrderNo = (data) => {
- return axios({
- url: api + "/tenantPaymentOrder/queryByOrderNo",
- method: "get",
- params: data,
- });
- };
- // 分页查询活动列表
- const queryByOrderNoAuth = (data) => {
- return axios({
- url: api + "/teacherOrder/queryByOrderNo",
- method: "get",
- params: data,
- });
- };
- // 帮助中心分类
- const helpCenterCatalogList = (data) => {
- return axios({
- url: "/api-cms/helpCenterCatalog/list",
- method: "get",
- params: data,
- });
- };
- // 帮助中心
- const helpCenterContentList = (data) => {
- return axios({
- url: "/api-cms/helpCenterContent/list",
- method: "get",
- params: data,
- });
- };
- // 获取用户基本信息
- const queryUserInfo = (data) => {
- return axios({
- url: "/api-auth/queryUserInfo",
- method: "get",
- params: data,
- });
- };
- // 获取用户基本信息
- const queryTeacherInfo = (data) => {
- return axios({
- url: api + "/teacher/queryUserInfo",
- method: "get",
- params: data,
- });
- };
- // 获取老师评价和学生评价
- const getStuAndTeaReview = (data) => {
- return axios({
- url: api + "/courseReview/getStuAndTeaReview",
- method: "get",
- params: data,
- });
- };
- // 批量添加评价
- const batchAdd = (data) => {
- return axios({
- url: api + "/courseReview/batchAdd",
- method: "post",
- data: data,
- });
- };
- // 上传文件
- const uploadFile = (data) => {
- return axios({
- url: "/api-web/uploadFile",
- method: "post",
- data: data,
- });
- };
- export {
- sendSmsRequest,
- verifyLoginImage,
- usernameLogin,
- sendSms,
- smsLogin,
- registerAdd,
- userSetPassword,
- getGroupDetail,
- buyCourseGroup,
- createCourseGroup,
- sysTenantAccountGet,
- queryTenantAccountDetail,
- helpCenterCatalogList,
- helpCenterContentList,
- teacherCourseMinutes,
- tenantEntryActivitesList,
- queryUserInfo,
- queryTeacherInfo,
- createOrder,
- queryByOrderNo,
- queryByOrderNoAuth,
- getStuAndTeaReview,
- batchAdd,
- queryUserByPhone,
- uploadFile,
- };
|