|
|
@@ -5,12 +5,10 @@ import { handlePriceColor } from '@/filters'
|
|
|
import { queryMemberGoodsLimitConfig } from '@/services/api/common'
|
|
|
import { getTodayAccountConfigInfo } from '@/services/api/account'
|
|
|
import { queryErmcpGoods, queryQuoteDay } from '@/services/api/goods'
|
|
|
-import { queryQuoteGoodsList } from '@/services/api/swap'
|
|
|
import { wordArrayToUint8Array } from '@/services/websocket/package/crypto'
|
|
|
import { decodeProto } from '@/services/websocket/package/package50/proto'
|
|
|
import { defineStore } from '../store'
|
|
|
import { useAccountStore } from './account'
|
|
|
-import { useUserStore } from './user'
|
|
|
import CryptoJS from 'crypto-js'
|
|
|
import eventBus from '@/services/bus'
|
|
|
import moment from 'moment'
|
|
|
@@ -35,7 +33,6 @@ export const useFuturesStore = defineStore(() => {
|
|
|
goodsList: <(Model.GoodsRsp & Partial<Model.MemberGoodsLimitConfigRsp>)[]>[], // 商品列表
|
|
|
quotationList: <Model.GoodsQuote[]>[], // 行情列表
|
|
|
selectedGoodsId: <number | undefined>undefined, // 当前选中的商品ID
|
|
|
- quoteGoodsList: <(Model.QuoteGoodsListRsp & Partial<Model.MemberGoodsLimitConfigRsp>)[]>[], // 挂牌点价商品列表
|
|
|
})
|
|
|
|
|
|
// 指定市场ID的商品列表
|
|
|
@@ -75,12 +72,10 @@ export const useFuturesStore = defineStore(() => {
|
|
|
const getGoodsList = async () => {
|
|
|
state.loading = true
|
|
|
state.goodsList = []
|
|
|
- state.quoteGoodsList = []
|
|
|
state.quotationList = []
|
|
|
timerTask.clearTimeout('quoteDay')
|
|
|
|
|
|
const accountStore = useAccountStore()
|
|
|
- const userStore = useUserStore()
|
|
|
// 任务 #5511
|
|
|
const { data: accountConfig } = await getTodayAccountConfigInfo()
|
|
|
// 任务 #5197
|
|
|
@@ -90,12 +85,6 @@ export const useFuturesStore = defineStore(() => {
|
|
|
}
|
|
|
})
|
|
|
const { data: goodsList } = await queryErmcpGoods()
|
|
|
- const { data: qGoodsList } = await queryQuoteGoodsList({
|
|
|
- data: {
|
|
|
- usertype: userStore.userType ?? 0,
|
|
|
- marketids: '10101'
|
|
|
- }
|
|
|
- })
|
|
|
|
|
|
for (let i = 0; i < goodsList.length; i++) {
|
|
|
const item = goodsList[i]
|
|
|
@@ -135,24 +124,6 @@ export const useFuturesStore = defineStore(() => {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
- /// 挂牌点价商品
|
|
|
- for (let i = 0; i < qGoodsList.length; i++) {
|
|
|
- const item = qGoodsList[i]
|
|
|
- const limit = limitConfig.find((e) => e.goodsid === item.goodsid)
|
|
|
-
|
|
|
- // 跳过不显示的商品
|
|
|
- if (limit?.isnodisplay) {
|
|
|
- continue
|
|
|
- }
|
|
|
-
|
|
|
- // 组合商品属性
|
|
|
- state.quoteGoodsList.push({
|
|
|
- ...item,
|
|
|
- iscannotbuy: limit?.iscannotbuy ?? 0,
|
|
|
- iscannotsell: limit?.iscannotsell ?? 0
|
|
|
- })
|
|
|
- }
|
|
|
-
|
|
|
// 待优化
|
|
|
getQuoteDay().then(() => {
|
|
|
dataCompletedCallback.forEach((callback) => callback())
|