Skip to content

Commit 4d8840c

Browse files
committed
add comments
1 parent d8db3fa commit 4d8840c

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎src/models/metadata/YoudaoTranslateData.js‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ class YoudaoTranslateData {
1515
if (cache) {
1616
return cache;
1717
}
18+
/**
19+
* 特别重要,必读!
20+
* CODELF 用的是有道翻译 API 的免费套餐,1小时仅有1K的请求次数限制!
21+
* 所以,如果你想二次开发,请单独申请自己的有道翻译 API 的 KEY,否则会直接影响 CODELF 的用户。
22+
* 有道翻译 API 申请参看: http://fanyi.youdao.com/openapi?path=data-mode
23+
*/
1824
const url = `//fanyi.youdao.com/openapi.do?callback=?&keyfrom=Codelf&key=2023743559&type=data&doctype=jsonp&version=1.1&q=${val}`;
1925
const data = await JSONP(url, {callbackName: 'youdaoFanyiRequestCallback'});
2026
try{

0 commit comments

Comments
 (0)