Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

小程序能只调用指定分类及其子分类的文章吗? #9

Open
yescool opened this issue Dec 14, 2017 · 4 comments
Open

小程序能只调用指定分类及其子分类的文章吗? #9

yescool opened this issue Dec 14, 2017 · 4 comments

Comments

@yescool
Copy link

yescool commented Dec 14, 2017

你好,这个小程序能只调用指定分类及其子分类的文章吗?

@iamxjb
Copy link
Owner

iamxjb commented Dec 15, 2017

可以,参考list页面

@yescool
Copy link
Author

yescool commented Dec 16, 2017

可以大体分享下实现的思路吗?要修改什么文件?

@iamxjb
Copy link
Owner

iamxjb commented Dec 18, 2017

可以,需要改api.js里的代码,加上分类参数即可
getPosts: function (obj) {
var url = HOST_URI + 'posts?per_page=' + pageCount+'&orderby=date&order=desc&page=' + obj.page&categories=1,2,3‘;

"1,2,3 "代表分类的id

@yescool
Copy link
Author

yescool commented Jan 1, 2018

修改成这段代码列表就读不出来了,变成网络错误,这是哪里的问题呢?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants