mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-20 00:06:45 +08:00
2022年5月29日从svn移到git
This commit is contained in:
42
src/api/modules/tools.js
Normal file
42
src/api/modules/tools.js
Normal file
@@ -0,0 +1,42 @@
|
||||
/**百宝箱*/
|
||||
import ajax from '@/utils/xajax.js'
|
||||
|
||||
|
||||
/**
|
||||
* 全量树形结构数据
|
||||
* 包含数据全
|
||||
*/
|
||||
const tree = function () {
|
||||
return ajax.get(`/xboe/tools/tree-list`);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
* @param {
|
||||
* toolsType 工具类型 1课程开发教程,2开发工具下载,3课程开发模板
|
||||
* name 名称
|
||||
* } query
|
||||
* @returns
|
||||
*/
|
||||
const list=function(query) {
|
||||
return ajax.get('/xboe/tools/list',{params:query});
|
||||
}
|
||||
|
||||
/**
|
||||
* 下载
|
||||
* @param id
|
||||
* @returns
|
||||
*/
|
||||
const download=function(id) {
|
||||
let requestParam ={
|
||||
url: '/xboe/tools/download?id='+id,
|
||||
timeout: 0, // 下载不设置超时
|
||||
responseType: 'blob', // 表明返回服务器返回的数据类型
|
||||
}
|
||||
return ajax.get(requestParam);
|
||||
}
|
||||
export default {
|
||||
tree,
|
||||
list,
|
||||
download
|
||||
}
|
||||
Reference in New Issue
Block a user