Sfoglia il codice sorgente

登录查询所有市场交易参数配置

li.shaoyi 3 anni fa
parent
commit
c8b986b943

+ 1 - 7
src/services/bus/index.ts

@@ -1,4 +1,3 @@
-import { TradeMode } from '@/common/constants/enumCommon';
 import APP from '@/services';
 import { isAllEnum } from '@/services/bus/allEnum';
 import { isLogin } from '@/services/bus/login';
@@ -13,7 +12,6 @@ import { queryMarketRun, QueryMarketsByLoginID } from '../go/commonMarket';
 import { GetErmcpGoods, QueryDeliveryGoodsDetail } from '../go/ermcp/goodsInfo';
 import { getTaAccount } from '../go/TaAccount';
 import { queryWrMarketTradeConfig } from '../go/wrtrade';
-import { getMarketByTradeMode } from './market';
 
 /**
  * 全局数据刷新
@@ -38,11 +36,7 @@ export async function globalDataRefresh(): Promise<string> {
             } else {
                 // token校验成功 马上轮询
                 checkTokenAction();
-                await Promise.all([GetErmcpGoods(), GetPCMenus(), QueryTableDefine(), LoginQuery(), QueryDeliveryGoodsDetail(), getTaAccount(), queryMarketRun(), QueryMarketsByLoginID()])
-                const marketInfo = getMarketByTradeMode(TradeMode.WarehouseReceiptTrade);
-                if (marketInfo) {
-                    await queryWrMarketTradeConfig({ marketid: marketInfo.marketid })
-                }
+                await Promise.all([GetErmcpGoods(), GetPCMenus(), QueryTableDefine(), LoginQuery(), QueryDeliveryGoodsDetail(), getTaAccount(), queryMarketRun(), QueryMarketsByLoginID(), queryWrMarketTradeConfig()])
             }
         } else {
             // 重置数据中心数据

+ 1 - 7
src/services/bus/login.ts

@@ -1,7 +1,6 @@
 import APP from '@/services';
 import timerUtil from '@/utils/timer/timerUtil'
 import { isAllEnum } from '@/services/bus/allEnum';
-import { TradeMode } from '@/common/constants/enumCommon';
 import { checkTokenAction } from '@/services/bus/token';
 import { getAllEnums, GetPCMenus, getServerTime, queryErrorInfos, QueryTableDefine } from '@/services/go/commonService/index';
 import { GetErmcpGoods, QueryDeliveryGoodsDetail } from '@/services/go/ermcp/goodsInfo';
@@ -13,7 +12,6 @@ import { queryWrMarketTradeConfig } from '../go/wrtrade';
 import { logoutResponse } from '../socket/login';
 import { loginAction } from '../socket/login/index';
 import { LoginResponse } from '../socket/login/interface/index';
-import { getMarketByTradeMode } from './market';
 import Router from '@/router';
 
 export const logout = (): void => {
@@ -33,11 +31,7 @@ export const login = async (logidCode: string, password: string, byteArr: Uint8A
         const loginData = await loginAction(account, password, byteArr, isEncryt);
         // localstorage 缓存登录信息,处理页面刷新
         setLoginData(loginData);
-        await Promise.all([GetErmcpGoods(), GetPCMenus(), QueryTableDefine(), getServerTime(), LoginQuery(), QueryDeliveryGoodsDetail(), getTaAccount(), queryMarketRun(), QueryMarketsByLoginID()])
-        const marketInfo = getMarketByTradeMode(TradeMode.WarehouseReceiptTrade);
-        if (marketInfo) {
-            await queryWrMarketTradeConfig({ marketid: marketInfo.marketid })
-        }
+        await Promise.all([GetErmcpGoods(), GetPCMenus(), QueryTableDefine(), getServerTime(), LoginQuery(), QueryDeliveryGoodsDetail(), getTaAccount(), queryMarketRun(), QueryMarketsByLoginID(), queryWrMarketTradeConfig()])
 
         // await GetPCMenus();
         // await QueryTableDefine();

+ 1 - 1
src/services/go/wrtrade/index.ts

@@ -180,7 +180,7 @@ export function queryWrBsGoodsInfo(goodsid: number): Promise<WrBsGoodsInfo[]> {
  * 查询市场交易参数配置 /WrTrade2/QueryWrMarketTradeConfig
  * @param req
  */
-export function queryWrMarketTradeConfig(req: QueryWrMarketTradeConfigReq): Promise<string> {
+export function queryWrMarketTradeConfig(req?: QueryWrMarketTradeConfigReq): Promise<string> {
     return commonSearch_go('/WrTrade2/QueryWrMarketTradeConfig', req).then(res => {
         APP.set('rules', res)
         return 'ok'