mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-11 03:46:44 +08:00
合并分支
This commit is contained in:
@@ -6,8 +6,8 @@ import ajax from '@/utils/xajax.js'
|
||||
* orderField
|
||||
* orderAsc
|
||||
*/
|
||||
const indexList = function(query) {
|
||||
return ajax.post('/xboe/m/boe/cases/case-random', query);
|
||||
const indexList = function (query) {
|
||||
return ajax.post('/xboe/m/boe/cases/case-random', query);
|
||||
}
|
||||
/*
|
||||
*案例分页搜索查询 是否推荐
|
||||
@@ -19,9 +19,12 @@ const indexList = function(query) {
|
||||
*@param(String) majorType 专业分类
|
||||
* @param(String) majorDomain 专业领域
|
||||
*/
|
||||
const queryList = function(query) {
|
||||
return ajax.post('/xboe/m/boe/cases/queryList', query);
|
||||
}
|
||||
const queryList = function (query) {
|
||||
return ajax.post('/xboe/m/boe/cases/queryList', query);
|
||||
}
|
||||
const queryListV2 = function (query) {
|
||||
return ajax.postJson('/xboe/m/boe/cases/queryListV2', query);
|
||||
}
|
||||
/* 案例分页搜索查询 是否置顶
|
||||
*@param(String) keyWord 关键词
|
||||
@param(Boolean) isTop 是否置顶 true或false
|
||||
@@ -29,74 +32,74 @@ const queryList = function(query) {
|
||||
*@param(String) majorType 专业分类
|
||||
* @param(String) majorDomain 专业领域
|
||||
*/
|
||||
const isTopList = function(query) {
|
||||
return ajax.post('/xboe/m/boe/cases/isTopList', query);
|
||||
}
|
||||
/* 设置置顶 取消置顶
|
||||
@param(String) id
|
||||
@param(Integer) isTop 是否置顶 0:未置顶,1:已置顶
|
||||
*/
|
||||
const updateTop = function(id, isTop) {
|
||||
return ajax.get(`/xboe/m/boe/cases/updateTop?id=${id}&isTop=${isTop}`);
|
||||
}
|
||||
/* 删除案例
|
||||
*param(String) id 案例的id
|
||||
*/
|
||||
const del = function(id) {
|
||||
return ajax.get('/xboe/m/boe/cases/delete?id=' + id);
|
||||
}
|
||||
/*案例详情
|
||||
@param(String) id 案例的id
|
||||
@param(Boolean) addView 是否增加浏览量
|
||||
*/
|
||||
const detail = function(id,addView) {
|
||||
let pars='id=' + id;
|
||||
if(addView){
|
||||
pars+='&addView='+addView
|
||||
}
|
||||
return ajax.get('/xboe/m/boe/cases/detail?'+pars);
|
||||
}
|
||||
/*推荐
|
||||
*@param (String) id 案例的id
|
||||
*@param (String) title 案例的标题
|
||||
*@param (String) acceptAid 受众id
|
||||
*@param (String) recommentThat 推荐说明
|
||||
*/
|
||||
const savaRecommend = function(data) {
|
||||
return ajax.post('/xboe/m/boe/recommend/save', data);
|
||||
}
|
||||
/* 推荐列表
|
||||
*没有参数
|
||||
*/
|
||||
const query = function() {
|
||||
return ajax.get('/xboe/m/boe/recommend/query');
|
||||
const isTopList = function (query) {
|
||||
return ajax.post('/xboe/m/boe/cases/isTopList', query);
|
||||
}
|
||||
/* 设置置顶 取消置顶
|
||||
@param(String) id
|
||||
@param(Integer) isTop 是否置顶 0:未置顶,1:已置顶
|
||||
*/
|
||||
const updateTop = function (id, isTop) {
|
||||
return ajax.get(`/xboe/m/boe/cases/updateTop?id=${id}&isTop=${isTop}`);
|
||||
}
|
||||
/* 删除案例
|
||||
*param(String) id 案例的id
|
||||
*/
|
||||
const del = function (id) {
|
||||
return ajax.get('/xboe/m/boe/cases/delete?id=' + id);
|
||||
}
|
||||
/*案例详情
|
||||
@param(String) id 案例的id
|
||||
@param(Boolean) addView 是否增加浏览量
|
||||
*/
|
||||
const detail = function (id, addView) {
|
||||
let pars = 'id=' + id;
|
||||
if (addView) {
|
||||
pars += '&addView=' + addView
|
||||
}
|
||||
return ajax.get('/xboe/m/boe/cases/detail?' + pars);
|
||||
}
|
||||
/*推荐
|
||||
*@param (String) id 案例的id
|
||||
*@param (String) title 案例的标题
|
||||
*@param (String) acceptAid 受众id
|
||||
*@param (String) recommentThat 推荐说明
|
||||
*/
|
||||
const savaRecommend = function (data) {
|
||||
return ajax.post('/xboe/m/boe/recommend/save', data);
|
||||
}
|
||||
/* 推荐列表
|
||||
*没有参数
|
||||
*/
|
||||
const query = function () {
|
||||
return ajax.get('/xboe/m/boe/recommend/query');
|
||||
}
|
||||
/*
|
||||
*作者排行榜
|
||||
@param pageSize 长度
|
||||
*/
|
||||
const usernameList= function(pageSize){
|
||||
return ajax.get(`/xboe/m/boe/cases/usernamelist?pageSize=${pageSize}`);
|
||||
const usernameList = function (pageSize) {
|
||||
return ajax.get(`/xboe/m/boe/cases/usernamelist?pageSize=${pageSize}`);
|
||||
}
|
||||
/*
|
||||
人气榜
|
||||
@param pageSize 长度
|
||||
*/
|
||||
const queryPraises=function(pageSize){
|
||||
return ajax.get(`/xboe/m/boe/cases/query-praises?pageSize=${pageSize}`);
|
||||
const queryPraises = function (pageSize) {
|
||||
return ajax.get(`/xboe/m/boe/cases/query-praises?pageSize=${pageSize}`);
|
||||
}
|
||||
/*
|
||||
好评榜
|
||||
@param pageSize 长度
|
||||
*/
|
||||
const queryComments=function(pageSize){
|
||||
return ajax.get(`/xboe/m/boe/cases/query-comments?pageSize=${pageSize}`);
|
||||
const queryComments = function (pageSize) {
|
||||
return ajax.get(`/xboe/m/boe/cases/query-comments?pageSize=${pageSize}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* 专业分类
|
||||
* */
|
||||
const majorTypes=function (){
|
||||
const majorTypes = function () {
|
||||
return ajax.get('/xboe/m/boe/cases/majorTypes');
|
||||
}
|
||||
/**
|
||||
@@ -115,8 +118,8 @@ const details = function (id, addView) {
|
||||
* ids
|
||||
* }
|
||||
* */
|
||||
const ids=function (data){
|
||||
return ajax.postJson('/xboe/m/boe/cases/ids',data);
|
||||
const ids = function (data) {
|
||||
return ajax.postJson('/xboe/m/boe/cases/ids', data);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -126,8 +129,8 @@ const ids=function (data){
|
||||
* excellent true、设置 false 取消
|
||||
* }
|
||||
* */
|
||||
const excellent=function(data){
|
||||
return ajax.post('/xboe/m/boe/cases/excellent',data)
|
||||
const excellent = function (data) {
|
||||
return ajax.post('/xboe/m/boe/cases/excellent', data)
|
||||
}
|
||||
|
||||
|
||||
@@ -138,8 +141,8 @@ const excellent=function(data){
|
||||
* pageSize
|
||||
* }
|
||||
* */
|
||||
const mylist=function (query){
|
||||
return ajax.post('/xboe/m/boe/cases/mylist',query);
|
||||
const mylist = function (query) {
|
||||
return ajax.post('/xboe/m/boe/cases/mylist', query);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -149,26 +152,56 @@ const mylist=function (query){
|
||||
* pageSize
|
||||
* }
|
||||
* */
|
||||
const exportCases=function (query){
|
||||
return ajax.post('/xboe/m/boe/cases/export',query);
|
||||
const exportCases = function (query) {
|
||||
return ajax.post('/xboe/m/boe/cases/export', query);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出案例后加的
|
||||
* */
|
||||
const exports = function (query) {
|
||||
return ajax.post('/xboe/m/boe/cases/exportCase', query, { responseType: 'blob' });
|
||||
}
|
||||
/**
|
||||
* @param
|
||||
* 记录查看开始时间
|
||||
* caseRecommendId读取的案例的id
|
||||
*/
|
||||
const startReadTimer = (caseRecommendId) => ajax.get(`/xboe/m/boe/cases/recommend/startRead?caseRecommendId=${caseRecommendId}`);
|
||||
|
||||
/**
|
||||
* @param
|
||||
* 记录查看结束时间
|
||||
* data{
|
||||
* caseId [案例id]
|
||||
* browseDuration [浏览时间秒]
|
||||
* }
|
||||
*/
|
||||
const endReadTimer = (data)=> ajax.postJson('/xboe/m/boe/cases/recommend/recordBrowseDuration',data)
|
||||
|
||||
|
||||
|
||||
|
||||
export default {
|
||||
indexList,
|
||||
queryList,
|
||||
isTopList,
|
||||
updateTop,
|
||||
del,
|
||||
detail,
|
||||
savaRecommend,
|
||||
query,
|
||||
usernameList,
|
||||
queryPraises,
|
||||
queryComments,
|
||||
indexList,
|
||||
queryList,
|
||||
queryListV2,
|
||||
isTopList,
|
||||
updateTop,
|
||||
del,
|
||||
detail,
|
||||
savaRecommend,
|
||||
query,
|
||||
usernameList,
|
||||
queryPraises,
|
||||
queryComments,
|
||||
majorTypes,
|
||||
details,
|
||||
ids,
|
||||
excellent,
|
||||
mylist,
|
||||
exportCases
|
||||
exportCases,
|
||||
exports,
|
||||
startReadTimer,
|
||||
endReadTimer
|
||||
}
|
||||
|
||||
@@ -40,8 +40,8 @@ const pageList = function(query) {
|
||||
* 课程的详细信息
|
||||
* @param {String} id
|
||||
*/
|
||||
const detail = function(id,preview) {
|
||||
return ajax.get(`/xboe/m/course/portal/detail?id=${id}&preview=${preview}`);
|
||||
const detail = function(id,preview,course=false) {
|
||||
return ajax.get(`/xboe/m/course/portal/detail?id=${id}&preview=${preview}&course=${course}`);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -8,6 +8,12 @@ import ajax from '@/utils/xajax.js'
|
||||
const cases=function (type){
|
||||
return ajax.get('/xboe/portal/index/cases?type='+type);
|
||||
}
|
||||
/**
|
||||
* 首页新改的推荐案例
|
||||
* */
|
||||
const newCases=function (){
|
||||
return ajax.get('/xboe/portal/index/casesV2');
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页文章排行榜
|
||||
@@ -45,5 +51,6 @@ export default {
|
||||
articleViews,
|
||||
qaAnswers,
|
||||
articlelist,
|
||||
courselist
|
||||
courselist,
|
||||
newCases
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user