diff --git a/.env.development b/.env.development index c974c09..5a2edb5 100644 --- a/.env.development +++ b/.env.development @@ -2,8 +2,8 @@ ENV = 'development' VITE_CLI_PORT = 8088 VITE_SERVER_PORT = 8888 VITE_BASE_API = /api -//VITE_BASE_PATH = http://192.168.1.133 -VITE_BASE_PATH = http://122.9.143.61 +VITE_BASE_PATH = http://192.168.1.133 +//VITE_BASE_PATH = http://122.9.143.61 VITE_EDITOR = vscode // VITE_EDITOR = webstorm 如果使用webstorm开发且要使用dom定位到代码行功能 请先自定添加 webstorm到环境变量 再将VITE_EDITOR值修改为webstorm // 如果使用docker-compose开发模式,设置为下面的地址或本机主机IP diff --git a/src/api/common.js b/src/api/common.js index f359507..847e5f9 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -18,5 +18,12 @@ const api = { params:data }) }, + searchUserList: data => { // 搜索用户列表 + return service({ + url: '/user/search', + method: 'get', + params:data + }) + }, } export default api diff --git a/src/api/course.js b/src/api/course.js index c2f1f90..5b52c92 100644 --- a/src/api/course.js +++ b/src/api/course.js @@ -92,5 +92,19 @@ const api = { data }) }, + verifyCourse : data => { // 审核课程 + return service({ + url: '/sys-course/verify', + method: 'post', + data + }) + }, + getTeacherCourseList: data => { // 教师课程列表 + return service({ + url: '/sys-course/teacher/'+data.teacherId, + method: 'get', + params:data + }) + }, } export default api diff --git a/src/utils/custom.js b/src/utils/custom.js index e65246d..63f9766 100644 --- a/src/utils/custom.js +++ b/src/utils/custom.js @@ -146,6 +146,34 @@ const custom = { }) return data }, + getUserPosition(user_type) { // 获取用户身份 + const position_arr = ['普通用户','助教','老师', '主管']; //普通用户,助教,老师,主管 + const val_arr = [] + for(let i = 0;i< position_arr.length;i++) { + if((user_type & 0b1) === 0b1 && i === 0) { + val_arr.push(0) + } + if((user_type & 0b10) === 0b10 && i === 1){ + val_arr.push(1) + } + if((user_type & 0b100) === 0b100 && i === 2){ + val_arr.push(2) + } + if((user_type & 0b1000) === 0b1000 && i === 3){ + val_arr.push(3) + } + } + let str = '' + for(let i= 0;i