mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-11 20:06:47 +08:00
feat:合并
This commit is contained in:
19
src/api/activity.js
Normal file
19
src/api/activity.js
Normal file
@@ -0,0 +1,19 @@
|
||||
import http from "./config";
|
||||
|
||||
//获取活动信息接口
|
||||
export const getActivity = (obj) => http.get('/activity', { params: obj });
|
||||
|
||||
//创建活动接口
|
||||
export const createActivity = (obj) => http.post('/activity/createActivity', obj);
|
||||
|
||||
//删除活动接口
|
||||
export const deleteActivity = (obj) => http.post('/activity/deleteActivity', { params: obj });
|
||||
|
||||
//修改活动接口
|
||||
export const updateActivity = (obj) => http.post('/activity/updateActivity', obj);
|
||||
|
||||
//修改活动是否为必修接口
|
||||
export const updateActivityToCompulsory = (obj) => http.post('/activity/updateActivityToCompulsory', { params: obj });
|
||||
|
||||
//修改活动是否为选修接口
|
||||
export const updateActivityToElective = (obj) => http.post('/activity/updateActivityToElective', { params: obj });
|
||||
@@ -16,6 +16,8 @@ http.interceptors.request.use(
|
||||
config.headers.token = token;
|
||||
} else {
|
||||
console.log("当前请求页面无token,请执行操作!!!")
|
||||
// 此处测试默认配置token
|
||||
config.headers.token = "123456";
|
||||
}
|
||||
return config;
|
||||
},
|
||||
|
||||
13
src/api/discuss.js
Normal file
13
src/api/discuss.js
Normal file
@@ -0,0 +1,13 @@
|
||||
import http from "./config";
|
||||
|
||||
//创建讨论
|
||||
export const createDiscuss = (obj) => http.post('/discuss/createDiscuss', obj);
|
||||
|
||||
//获取讨论信息接口
|
||||
export const getDiscussDetail = (obj) => http.post('/discuss/getDiscussDetail', { params: obj });
|
||||
|
||||
//删除讨论接口
|
||||
export const deleteDiscuss = (obj) => http.post('/discuss/deleteDiscuss', { params: obj });
|
||||
|
||||
//修改讨论接口
|
||||
export const updateDiscuss = (obj) => http.post('/discuss/updateDiscuss', { params: obj });
|
||||
@@ -51,13 +51,21 @@ export const createProject = (obj) => http.post('/admin/project/edit', {
|
||||
"name": obj.name,
|
||||
"notice": obj.notice,
|
||||
"noticeFlag": obj.noticeFlag,
|
||||
"parentId": obj.parentId,
|
||||
"picUrl": obj.picUrl,
|
||||
"projectId": obj.projectId,
|
||||
"remark": obj.remark,
|
||||
"sourceBelongId": obj.sourceBelongId,
|
||||
"status": obj.status,
|
||||
"systemId": obj.systemId,
|
||||
"templateId": obj.templateId,
|
||||
"type": obj.type
|
||||
})
|
||||
|
||||
// 创建多层项目
|
||||
export const createStoreyProject = () => http.post('/admin/project/edit', {
|
||||
|
||||
})
|
||||
|
||||
// 获取项目列表
|
||||
export const getProjectList = () => http.post('/admin/project/list', {
|
||||
|
||||
})
|
||||
63
src/api/indexEval.js
Normal file
63
src/api/indexEval.js
Normal file
@@ -0,0 +1,63 @@
|
||||
import http from "./config";
|
||||
// import qs from 'qs';
|
||||
|
||||
|
||||
/**
|
||||
* 接口传参数方式(get)
|
||||
* axios.get('/user', {
|
||||
* params: {
|
||||
* id: 12345,
|
||||
* name: user
|
||||
* }
|
||||
* }).then(res => console.log(res))
|
||||
*
|
||||
* 接口传参三种方式(post/put/patch)
|
||||
*
|
||||
* 1.'Content-Type'= 'multipart/form-data',传参格式为 formData。
|
||||
* (全局请求头:'Content-Type'= 'application/x-www-form-urlencoded')
|
||||
* (request的Header:'Content-Type'= 'multipart/form-data')
|
||||
* var formData=new FormData();
|
||||
* formData.append('user',123456);formData.append('pass',12345678);
|
||||
* axios.post("/notice",formData).then()
|
||||
*
|
||||
* 2.'Content-Type'= 'application/x-www-form-urlencoded',传参格式为 query 形式,使用$qs.stringify。
|
||||
* (全局请求头:'Content-Type'= 'application/x-www-form-urlencoded')
|
||||
* (request的Header:'Content-Type'= 'application/x-www-form-urlencoded')
|
||||
* let data = {"code":"1234","name":"yyyy"};
|
||||
* axios.post(`${this.$url}/test/testRequest`,qs.stringify({data})).then()
|
||||
*
|
||||
* 3.'Content-Type'= 'application/json,传参格式为 raw (JSON格式)。
|
||||
* (全局请求头:'Content-Type'= 'application/x-www-form-urlencoded')
|
||||
* (request的Header:'Content-Type'= 'application/json;charset=UTF-8')
|
||||
* let data = {"code":"1234","name":"yyyy"}
|
||||
* axios.post(`${this.$url}/test/testRequest`,data).then()
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
// 接口-请求
|
||||
|
||||
//创建测评
|
||||
export const createEvaluation = (obj) => http.post('/evaluation/createEvaluation', obj,);
|
||||
|
||||
//上传组件
|
||||
export const fileUp = (obj) => http.post('/file/upload', obj,);
|
||||
|
||||
//删除测评信息
|
||||
export const deleteEvaluationById = (obj) => http.post('/evaluation/deleteEvaluationById', { params: obj })
|
||||
|
||||
|
||||
//根据ID获取测评信息详情
|
||||
export const queryEvaluationDetailById = (obj) => http.post('/evaluation/queryEvaluationDetailById', { params: obj })
|
||||
|
||||
//修改测评信息
|
||||
export const updateEvaluation = (obj) => http.post('/evaluation/updateEvaluation', obj)
|
||||
|
||||
|
||||
// 测试方法
|
||||
// import * as api from '../../api/index'
|
||||
// api.getLearnPath({}).then(res => {
|
||||
// console.log(res)
|
||||
// }).catch(err => {
|
||||
// console.log(err)
|
||||
// })
|
||||
60
src/api/indexInvist.js
Normal file
60
src/api/indexInvist.js
Normal file
@@ -0,0 +1,60 @@
|
||||
import http from "./config";
|
||||
// import qs from 'qs';
|
||||
|
||||
|
||||
/**
|
||||
* 接口传参数方式(get)
|
||||
* axios.get('/user', {
|
||||
* params: {
|
||||
* id: 12345,
|
||||
* name: user
|
||||
* }
|
||||
* }).then(res => console.log(res))
|
||||
*
|
||||
* 接口传参三种方式(post/put/patch)
|
||||
*
|
||||
* 1.'Content-Type'= 'multipart/form-data',传参格式为 formData。
|
||||
* (全局请求头:'Content-Type'= 'application/x-www-form-urlencoded')
|
||||
* (request的Header:'Content-Type'= 'multipart/form-data')
|
||||
* var formData=new FormData();
|
||||
* formData.append('user',123456);formData.append('pass',12345678);
|
||||
* axios.post("/notice",formData).then()
|
||||
*
|
||||
* 2.'Content-Type'= 'application/x-www-form-urlencoded',传参格式为 query 形式,使用$qs.stringify。
|
||||
* (全局请求头:'Content-Type'= 'application/x-www-form-urlencoded')
|
||||
* (request的Header:'Content-Type'= 'application/x-www-form-urlencoded')
|
||||
* let data = {"code":"1234","name":"yyyy"};
|
||||
* axios.post(`${this.$url}/test/testRequest`,qs.stringify({data})).then()
|
||||
*
|
||||
* 3.'Content-Type'= 'application/json,传参格式为 raw (JSON格式)。
|
||||
* (全局请求头:'Content-Type'= 'application/x-www-form-urlencoded')
|
||||
* (request的Header:'Content-Type'= 'application/json;charset=UTF-8')
|
||||
* let data = {"code":"1234","name":"yyyy"}
|
||||
* axios.post(`${this.$url}/test/testRequest`,data).then()
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
// 接口-请求
|
||||
|
||||
//创建评估
|
||||
export const createAppraiseMessage = (obj) => http.post('/survey/createAppraiseMessage', obj,);
|
||||
|
||||
//删除评估信息
|
||||
export const deleteAppraise = (obj) => http.post('/survey/deleteAppraise', { params: obj })
|
||||
|
||||
|
||||
//根据ID获取评估信息详情
|
||||
export const queryAppraiseDetailById = (obj) => http.post('/survey/queryAppraiseDetailById', { params: obj })
|
||||
|
||||
//修改评估信息
|
||||
export const updateAppraiseMessage = (obj) => http.post('/survey/updateAppraiseMessage', obj)
|
||||
|
||||
|
||||
// 测试方法
|
||||
// import * as api from '../../api/index'
|
||||
// api.getLearnPath({}).then(res => {
|
||||
// console.log(res)
|
||||
// }).catch(err => {
|
||||
// console.log(err)
|
||||
// })
|
||||
13
src/api/indexLiveBroadcast.js
Normal file
13
src/api/indexLiveBroadcast.js
Normal file
@@ -0,0 +1,13 @@
|
||||
import http from "./config";
|
||||
|
||||
//根据直播Id获取直播信息 query参数
|
||||
export const getLiveBroadcastInfor = (obj) => http.get('/liveBroadcast', { params: obj })
|
||||
|
||||
//创建直播接口
|
||||
export const createLiveBroadcast = (obj) => http.post('/liveBroadcast/createLiveBroadcast', obj)
|
||||
|
||||
//直播信息删除接口
|
||||
export const deleteLiveBroadcast = (obj) => http.post('/liveBroadcast/deleteLiveBroadcast', obj)
|
||||
|
||||
//直播信息修改接口
|
||||
export const updateLiveBroadcastMessage = (obj) => http.post('/liveBroadcast/updateLiveBroadcastMessage', obj)
|
||||
0
src/api/indexVote.js
Normal file
0
src/api/indexVote.js
Normal file
8
src/api/level.js
Normal file
8
src/api/level.js
Normal file
@@ -0,0 +1,8 @@
|
||||
import http from "./config";
|
||||
|
||||
//新建或编辑关卡
|
||||
export const editChapter = (obj) => http.post('/admin/router/editChapter', obj, {
|
||||
headers: {
|
||||
'token': '123'
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user