fix: post type

This commit is contained in:
DIYgod
2019-06-04 18:28:06 +08:00
parent 218c06f96c
commit ea508b8bc2
28 changed files with 66 additions and 75 deletions

View File

@@ -1,5 +1,4 @@
const got = require('@/utils/got');
const qs = require('querystring');
module.exports = async (ctx) => {
const link = 'https://www.icourse163.org/category/all';
@@ -13,16 +12,16 @@ module.exports = async (ctx) => {
method: 'post',
url: `https://www.icourse163.org/web/j/courseBean.getCoursePanelListByFrontCategory.rpc?csrfKey=${csrfKey}`,
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
Cookie: `NTESSTUDYSI=${csrfKey};`,
},
data: qs.stringify({
form: true,
data: {
categoryId: -1,
type: 30,
orderBy: 10,
pageIndex: 1,
pageSize: 20,
}),
},
});
const items = response.data.result.result.map((item) => {