freeCodeCamp/curriculum/challenges/chinese/10-coding-interview-prep/take-home-projects/build-a-wikipedia-viewer.md

18 lines
1.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

---
id: bd7158d8c442eddfaeb5bd19
title: 构建Wikipedia查看器
challengeType: 3
videoUrl: ''
dashedName: build-a-wikipedia-viewer
---
# --description--
**目标:** 构建一个功能类似于此的[CodePen.io](https://codepen.io)应用程序: [https](https://codepen.io/freeCodeCamp/full/wGqEga/) **** [//codepen.io/freeCodeCamp/full/wGqEga/](https://codepen.io) 。完成以下[用户故事](https://en.wikipedia.org/wiki/User_story) 。使用您需要的任何库或API。给它你自己的个人风格。 **用户故事:** 我可以在搜索框中搜索维基百科条目,并查看生成的维基百科条目。 **用户故事:** 我可以单击按钮查看随机的Wikipedia条目。 提示1这是一个可用于获取随机维基百科文章的URL `https://en.wikipedia.org/wiki/Special:Random` `https://en.wikipedia.org/wiki/Special:Random` :Random。 提示2这是使用维基百科API的条目 `https://www.mediawiki.org/wiki/API:Main_page` `https://www.mediawiki.org/wiki/API:Main_page` `https://www.mediawiki.org/wiki/API:Main_page` 。 提示3使用此[链接](https://en.wikipedia.org/wiki/Special:ApiSandbox#action=query&titles=Main%20Page&prop=revisions&rvprop=content&format=jsonfm)试验维基百科的API。如果卡住请记得使用[Read-Search-Ask](https://forum.freecodecamp.org/t/how-to-get-help-when-you-are-stuck-coding/19514) 。完成后单击“我已完成此挑战”按钮并包含指向CodePen的链接。您可以通过Facebook上的朋友分享您的项目反馈。
# --solutions--
```js
// solution required
```