Skip to content

Commit

Permalink
feat:#8 选择样式模板,完成首页博客列表-验证API
Browse files Browse the repository at this point in the history
  • Loading branch information
terwer committed Aug 2, 2022
1 parent 21f4c49 commit c64a40b
Show file tree
Hide file tree
Showing 3 changed files with 490 additions and 365 deletions.
8 changes: 4 additions & 4 deletions lib/metaweblog/metaWeblogApiAdaptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ export class MetaWeblogApiAdaptor implements IApi {
*/
public async getRecentPosts(numOfPosts: number): Promise<Array<any>> {
let result: Array<Post> = []
const cnblogsPosts = await this.metaWeblog.getRecentPosts(this.appkey, this.username, this.password, numOfPosts);
for (let i = 0; i < cnblogsPosts.length; i++) {
const cnblogsPost = cnblogsPosts[i]
const blogPosts = await this.metaWeblog.getRecentPosts(this.appkey, this.username, this.password, numOfPosts);
for (let i = 0; i < blogPosts.length; i++) {
const blogPost = blogPosts[i]

// 适配公共属性
let commonPost = new Post()
commonPost.title = cnblogsPost.title
commonPost.title = blogPost.title
result.push(commonPost)
}

Expand Down
Loading

0 comments on commit c64a40b

Please sign in to comment.