mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-17 23:06:45 +08:00
2022年5月29日从svn移到git
This commit is contained in:
29
src/api/modules/praises.js
Normal file
29
src/api/modules/praises.js
Normal file
@@ -0,0 +1,29 @@
|
||||
/* 点赞的相关处理*/
|
||||
import ajax from '@/utils/xajax.js'
|
||||
|
||||
/*点赞
|
||||
* objType,点赞对象类型,, 1课程 2文章,3案例, 4问答
|
||||
* objId 点赞对象id
|
||||
* title 点赞对象标题
|
||||
*
|
||||
*/
|
||||
const save=function(data){
|
||||
return ajax.post('/xboe/m/praise/add',data);
|
||||
}
|
||||
// 是否已经点赞
|
||||
// objType,点赞对象类型,, 1课程 2文章,3案例, 4问答
|
||||
// objId 点赞对象id
|
||||
const has=function(objType,objId){
|
||||
return ajax.post(`/xboe/m/praise/has?objType=${objType}&objId=${objId}`)
|
||||
}
|
||||
//取消点赞
|
||||
// objType,点赞对象类型,, 1课程 2文章,3案例, 4问答
|
||||
// objId 点赞对象id
|
||||
const remove=function(objType,objId){
|
||||
return ajax.post(`/xboe/m/praise/remove?objType=${objType}&objId=${objId}`)
|
||||
}
|
||||
export default{
|
||||
save,
|
||||
remove,
|
||||
has
|
||||
}
|
||||
Reference in New Issue
Block a user