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

42 lines
1015 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 info (data = {}, headers = {}) {
return await (new Http()).post({
url: config.apiList.info,
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;
}
}