Files
ClassContent/历届学生/fontendsix/项目练习/上课项目/uniapp-project/service/indexService.js
2024-09-27 02:06:13 +08:00

34 lines
818 B
JavaScript

import Http from "@/http";
import config from "@/config"
export default class indexService {
async home (data = {}, headers = {}) {
return await (new Http()).get({
url: config.apiList.home,
data: data,
headers: headers
})
}
async classList (data = {}, headers = {}) {
return await (new Http()).get({
url: config.apiList.classList,
data: data,
headers: headers
})
}
async type (data = {}, headers = {}) {
let res = await (new Http()).get({
url: config.apiList.type,
data: data,
headers: headers
});
res.principal.forEach((v,i) => {
v.into = `title${i}`
v.content = []
});
return res;
}
}