mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-11 03:46:47 +08:00
2022年5月29日 从svn移到git
This commit is contained in:
24
api/modules/searchterm.js
Normal file
24
api/modules/searchterm.js
Normal file
@@ -0,0 +1,24 @@
|
||||
/**搜索词处理*/
|
||||
import ajax from '@/utils/xajax.js'
|
||||
/*
|
||||
查看当前模块的热门搜索词
|
||||
@param pageSize 查看几条
|
||||
@param type 类型 1课程 2文章 3案例 4问答
|
||||
默认按搜索次数高的排在前面
|
||||
如果类型不传默认查所有
|
||||
*/
|
||||
const list=function(pageSize,type){
|
||||
return ajax.get(`/xboe/m/searchterms/tops?num=${pageSize}&type=${type}`);
|
||||
}
|
||||
/*
|
||||
添加热门搜索词
|
||||
@param keyword 搜索词
|
||||
@param type 类型 1课程 2文章 3案例 4问答
|
||||
*/
|
||||
const save=function(data){
|
||||
return ajax.post('/xboe/m/searchterms/save',data);
|
||||
}
|
||||
export default{
|
||||
list,
|
||||
save
|
||||
}
|
||||
Reference in New Issue
Block a user