|
|
@@ -1,6 +1,7 @@
|
|
|
/** ================================= 信息 - 现货商品信息 ================================**/
|
|
|
|
|
|
import APP from '@/services';
|
|
|
+import timerUtil from '@/utils/timer/timerUtil'
|
|
|
import { getUserId } from "@/services/bus/account";
|
|
|
import { getUserAccountType } from "@/services/bus/user";
|
|
|
import { commonSearch_go } from '@/services/go/index';
|
|
|
@@ -116,11 +117,12 @@ export function QueryMiddleGoodsDetail(middlegoodsid?: number): Promise<Ermcp3Mi
|
|
|
export function GetErmcpGoods(lastUpdateTime?: string): Promise<string> {
|
|
|
const param = lastUpdateTime ? { lastUpdateTime } : {}
|
|
|
return commonSearch_go('/Ermcp/GetErmcpGoods', param).then(async res => {
|
|
|
-
|
|
|
if (res.length) {
|
|
|
const result = res.reduce((acc: string, obj: Goods) => acc + obj.goodscode + ',', '')
|
|
|
// 登录的时候或者刷新的时候,需要获取一次盘面信息
|
|
|
await QueryQuoteDay(result)
|
|
|
+ // 每5分钟获取一次盘面
|
|
|
+ timerUtil.setInterval(() => QueryQuoteDay(result), 5 * 60 * 1000, 'quoteDay');
|
|
|
}
|
|
|
// console.log('查询企业风管期货商品信息', res);
|
|
|
APP.set('Goods', res)
|