mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-19 15:56:45 +08:00
43 lines
793 B
JavaScript
43 lines
793 B
JavaScript
/**百宝箱*/
|
||
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
|
||
}
|