mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-14 21:36:42 +08:00
提交合并后的结果
This commit is contained in:
@@ -47,7 +47,7 @@ const formRequest=axios.create({
|
||||
Promise.reject(error)
|
||||
});
|
||||
formRequest.interceptors.response.use(res => {
|
||||
console.log(res);
|
||||
//console.log(res);
|
||||
const code = res.data.status || 200;
|
||||
if(code===200){
|
||||
return res.data
|
||||
|
||||
42
src/api/boe/courseRecord.js
Normal file
42
src/api/boe/courseRecord.js
Normal file
@@ -0,0 +1,42 @@
|
||||
/**我的授课记录*/
|
||||
import ajax from '@/api/boe/boeApiAjax.js'
|
||||
import axios from 'axios'
|
||||
import { getToken } from '@/utils/token'
|
||||
const baseURL = process.env.VUE_APP_BOE_BASE_API;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 导出授课记录
|
||||
*
|
||||
* @param {Object} kid
|
||||
*/
|
||||
const courseRecordExport = function(data) {
|
||||
return axios.request({
|
||||
baseURL,
|
||||
url: '/b1/system/teacher/teacher-course-export',
|
||||
method: 'post',
|
||||
data:data,
|
||||
headers:{'Content-Type':'application/json;charset=utf-8'},
|
||||
responseType: 'blob'
|
||||
})
|
||||
|
||||
// return ajax.postJson('/b1/system/teacher/teacher-course-export',data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 授课记录列表
|
||||
*
|
||||
* @param {Object} kid
|
||||
*/
|
||||
const courseRecordList = function(data) {
|
||||
return ajax.postJson('/b1/system/teacher/teacher-course-list',data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
export default {
|
||||
courseRecordExport,
|
||||
courseRecordList
|
||||
|
||||
}
|
||||
@@ -136,8 +136,28 @@ const teacherSystem = function(id) {
|
||||
return ajax.postJson('/b1/system/teacher/delete-model-teacher',data);
|
||||
}
|
||||
|
||||
//以下是新增加的两个接口,只是修改4个字段内容
|
||||
/**
|
||||
* @param {Object} data
|
||||
* {
|
||||
teacher_user_id:用户的kid,
|
||||
courses:'擅长的课程',
|
||||
photo:"",
|
||||
expertise:'',
|
||||
work:''
|
||||
}
|
||||
*/
|
||||
const simpleUpdate = function(data) {
|
||||
return ajax.postJson('/b1/system/teacher/update-teacher',data);
|
||||
}
|
||||
|
||||
const simpleInfo = function(kid) {
|
||||
return ajax.postJson('/b1/system/teacher/teacher-info',{teacher_user_id:kid});
|
||||
}
|
||||
|
||||
export default {
|
||||
simpleUpdate,
|
||||
simpleInfo,
|
||||
editTeacher,
|
||||
teacherSystem,
|
||||
teacherInfo,
|
||||
|
||||
@@ -32,7 +32,8 @@ const refreshToken = function(token){
|
||||
|
||||
// boe登录
|
||||
const boeLogin = function(token){
|
||||
return ajax.post('/xboe/account/boelogin',{token:token});
|
||||
//return ajax.post('/xboe/account/boelogin',{token:token});
|
||||
return ajax.post('/xboe/account/boenewlogin',{token:token});
|
||||
}
|
||||
|
||||
export default{
|
||||
|
||||
@@ -119,6 +119,40 @@ const ids=function (data){
|
||||
return ajax.postJson('/xboe/m/boe/cases/ids',data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置和取消优秀案例
|
||||
* @param{
|
||||
* id 案例id
|
||||
* excellent true、设置 false 取消
|
||||
* }
|
||||
* */
|
||||
const excellent=function(data){
|
||||
return ajax.post('/xboe/m/boe/cases/excellent',data)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*我的案例
|
||||
* @param{
|
||||
* pageIndex
|
||||
* pageSize
|
||||
* }
|
||||
* */
|
||||
const mylist=function (query){
|
||||
return ajax.post('/xboe/m/boe/cases/mylist',query);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出
|
||||
* @param{
|
||||
* pageIndex
|
||||
* pageSize
|
||||
* }
|
||||
* */
|
||||
const exportCases=function (query){
|
||||
return ajax.post('/xboe/m/boe/cases/export',query);
|
||||
}
|
||||
|
||||
export default {
|
||||
indexList,
|
||||
queryList,
|
||||
@@ -133,5 +167,8 @@ export default {
|
||||
queryComments,
|
||||
majorTypes,
|
||||
details,
|
||||
ids
|
||||
ids,
|
||||
excellent,
|
||||
mylist,
|
||||
exportCases
|
||||
}
|
||||
|
||||
@@ -281,6 +281,7 @@ const auditList = function(query) {
|
||||
return ajax.post('/xboe/m/course/manage/audit-pagelist', query);
|
||||
}
|
||||
|
||||
|
||||
/**教师需要审核的课程列表*/
|
||||
const teacherAuditList = function(query) {
|
||||
return ajax.post('/xboe/m/course/audit/teacher-course', query);
|
||||
|
||||
@@ -32,8 +32,8 @@ const update = function(data) {
|
||||
}
|
||||
/* 编辑详情 */
|
||||
const detail = function(id) {
|
||||
return ajax.get('/xboe/m/exam/paper/query?id=' + id);
|
||||
}
|
||||
return ajax.get('/xboe/m/exam/paper/query?id=' + id);
|
||||
}
|
||||
|
||||
/* 试卷批量导入计算
|
||||
* num 数目
|
||||
|
||||
13
src/api/modules/popup.js
Normal file
13
src/api/modules/popup.js
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
import ajax from '@/utils/xajax.js'
|
||||
|
||||
/**
|
||||
* @param {Object} device 不包含的平台, 1表pc, 2表移动端
|
||||
*/
|
||||
const findByNoDevice=function (device){
|
||||
return ajax.get('/xboe/m/popup/user?device='+device);
|
||||
}
|
||||
|
||||
export default {
|
||||
findByNoDevice
|
||||
}
|
||||
@@ -9,6 +9,11 @@ const findByName = function(name) {
|
||||
return ajax.get('/xboe/teacher/name?name=' + name);
|
||||
}
|
||||
|
||||
|
||||
const updateTeacher=function(data){
|
||||
return ajax.postJson('/xboe/teacher/update-teacher',data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id得到教师的显示信息,只是几个基本的显示字段
|
||||
* @param {Object} id
|
||||
@@ -17,6 +22,11 @@ const getInfoById = function(id) {
|
||||
return ajax.get('/xboe/teacher/simple?id=' + id);
|
||||
}
|
||||
|
||||
const detailTeacher=function (id){
|
||||
return ajax.get('/xboe/teacher/detail-teacher?id='+id);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param {
|
||||
@@ -213,5 +223,7 @@ export default {
|
||||
start,
|
||||
end,
|
||||
exports,
|
||||
syncUpdate
|
||||
syncUpdate,
|
||||
detailTeacher,
|
||||
updateTeacher
|
||||
}
|
||||
|
||||
@@ -54,6 +54,16 @@ const exports=function (query){
|
||||
return ajax.post('/xboe/m/exam/alone/answer/export',query,{responseType: 'blob'});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param{
|
||||
* id 考试id
|
||||
* enabled true 上架 false 下架
|
||||
* }
|
||||
* */
|
||||
const enabled=function(query){
|
||||
return ajax.post('/xboe/m/exam/test/enabled',query);
|
||||
}
|
||||
|
||||
export default {
|
||||
detail,
|
||||
update,
|
||||
@@ -61,5 +71,6 @@ export default {
|
||||
save,
|
||||
querylist,
|
||||
pulish,
|
||||
exports
|
||||
exports,
|
||||
enabled
|
||||
}
|
||||
|
||||
18
src/api/system/whiteuser.js
Normal file
18
src/api/system/whiteuser.js
Normal file
@@ -0,0 +1,18 @@
|
||||
import ajax from '@/utils/xajax.js'
|
||||
|
||||
|
||||
/**
|
||||
* 查询白名单
|
||||
* @param {
|
||||
* env:'开发环境'
|
||||
* } data
|
||||
* @returns
|
||||
*/
|
||||
const getList =function(env) {
|
||||
return ajax.post('/xboe/sys/whiteuser/codes',env);
|
||||
}
|
||||
|
||||
|
||||
export default{
|
||||
getList
|
||||
}
|
||||
Reference in New Issue
Block a user