mirror of
https://github.com/zhangxiangliang/stock-api.git
synced 2025-02-02 22:43:46 +08:00
feat: 增加 网易类型搜索股票代码去重
This commit is contained in:
parent
e92ebb7690
commit
5b42824e14
@ -1,3 +1,7 @@
|
||||
|
||||
// NPM
|
||||
import { uniqBy } from 'lodash';
|
||||
|
||||
// Stocks
|
||||
import NeteaseStockTransform from "@stocks/netease/transforms/stock";
|
||||
import NeteaseCommonCodeTransform from "@stocks/netease/transforms/common-code";
|
||||
@ -94,7 +98,7 @@ const Netease: StockApi = {
|
||||
return '';
|
||||
}).filter(i => i !== '');
|
||||
|
||||
return await Netease.getStocks(codes);
|
||||
return uniqBy(await Netease.getStocks(codes), (code: Stock) => code.name);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user