Files
learning-system-portal/src/api/modules/tools.js
2022-05-29 18:56:34 +08:00

43 lines
793 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**百宝箱*/
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
}