mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-06 17:36:45 +08:00
43 lines
720 B
JavaScript
43 lines
720 B
JavaScript
/* 踩的相关处理*/
|
|
import ajax from '@/utils/xajax.js'
|
|
|
|
/*
|
|
*踩赞记录分页
|
|
*@param pageIndex 第几页
|
|
*@param pageSize 长度
|
|
查询条件暂时未确定
|
|
*/
|
|
const page=function(query){
|
|
return ajax.post('/xboe/m/trample/page',query);
|
|
}
|
|
|
|
/*
|
|
*踩
|
|
@param id 目前是课程id
|
|
*/
|
|
const trample=function(id){
|
|
return ajax.get(`/xboe/m/trample/trample?id=${id}`);
|
|
}
|
|
|
|
/**
|
|
* 取消
|
|
* @param {Object} id
|
|
*/
|
|
const remove=function(id){
|
|
return ajax.get(`/xboe/m/trample/remove?id=${id}`);
|
|
}
|
|
|
|
/*
|
|
查询当前用户是否已踩
|
|
@param objId 目前课程id
|
|
*/
|
|
const has=function(id){
|
|
return ajax.get(`/xboe/m/trample/has?objId=${id}`);
|
|
}
|
|
export default{
|
|
page,
|
|
trample,
|
|
remove,
|
|
has
|
|
}
|