freeCodeCamp/curriculum/challenges/chinese/06-information-security-and.../information-security-and-qu.../stock-price-checker.chinese.md

53 lines
2.3 KiB
Markdown
Raw Normal View History

---
id: 587d824a367417b2b2512c44
title: Stock Price Checker
challengeType: 4
isRequired: true
videoUrl: ''
localeTitle: 股票价格检查
---
## Description
<section id="description">构建一个功能类似于此的完整堆栈JavaScript应用程序 <a href="https://giant-chronometer.glitch.me/" target="_blank">https</a> <a href="https://giant-chronometer.glitch.me/" target="_blank">//giant-chronometer.glitch.me/</a> 。在这个项目上工作将涉及您在我们的入门项目上在Glitch上编写代码。完成此项目后您可以将公共故障网址到应用程序的主页复制到此屏幕进行测试您可以选择在另一个平台上编写项目但必须公开显示我们的测试。使用<a href="https://glitch.com/#!/import/github/freeCodeCamp/boilerplate-project-stockchecker/">此链接</a>在Glitch上启动此项目或在GitHub上克隆<a href="https://github.com/freeCodeCamp/boilerplate-project-stockchecker/">此存储库</a> 如果您使用Glitch请记住将项目链接保存到安全的地方 </section>
## Instructions
<section id="instructions">
</section>
## Tests
<section id='tests'>
```yml
tests:
- text: 将内容安全策略设置为仅允许从服务器加载脚本和css。
testString: ''
- text: 我可以使用包含纳斯达克股票代码的表格数据获得/ api /股票价格并收回一个对象stockData。
testString: ''
- text: 在stockData中我可以看到股票字符串股票代码价格字符串格式的小数和喜欢int
testString: ''
- text: 我也可以传递像trueboolean这样的字段来将我的喜欢添加到股票中。每个IP应该只接受1个。
testString: ''
- text: 如果我传递2只股票则返回对象将是一个包含股票信息的数组。而不是喜欢它将显示两者上的rel_likes两只股票之间的差异
testString: ''
- text: 获得当前价格的一个好方法是使用以下外部API用您的股票替换“GOOG”https//finance.google.com/finance/infoq = NASDAQ3AOGOOG
testString: ''
- text: 所有5个功能测试都已完成并通过。
testString: ''
```
</section>
## Challenge Seed
<section id='challengeSeed'>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>