li.shaoyi 2 тижнів тому
батько
коміт
64db510eca

+ 9 - 8
src/packages/digital/views/contract/components/position/detail/index.vue

@@ -14,7 +14,7 @@
             <tbody>
                 <tr>
                     <td class="text-small">
-                        {{ $t('account.profitLoss') + `(${currency(item.currencyid)})` }}
+                        {{ t('account.profitLoss') + `(${currency(item.currencyid)})` }}
                     </td>
                     <td :class="item.profitLossClass">
                         <b>{{ formatDecimal(item.profitLoss, item.decimalplace) }}</b>
@@ -22,7 +22,7 @@
                 </tr>
                 <tr>
                     <td class="text-small">
-                        {{ $t('position.goods.enableqty') + `(${item.goodscode})` }}
+                        {{ t('position.goods.enableqty') + `(${item.goodscode})` }}
                     </td>
                     <td>
                         {{ item.holderqty - item.freezeqty }}
@@ -30,7 +30,7 @@
                 </tr>
                 <tr>
                     <td class="text-small">
-                        {{ $t('position.goods.holderprice') + `(${currency(item.currencyid)})` }}
+                        {{ t('position.goods.holderprice') + `(${currency(item.currencyid)})` }}
                     </td>
                     <td>{{ item.holderprice }}</td>
                 </tr>
@@ -43,7 +43,7 @@
                     <td>{{ formatDecimal(item.tpsl_slprice, item.decimalplace) }}</td>
                 </tr>
                 <tr>
-                    <td class="text-small">{{ $t('position.goods.tradetime') }}</td>
+                    <td class="text-small">{{ t('position.goods.tradetime') }}</td>
                     <td>{{ formatDate(item.tradetime) }}</td>
                 </tr>
             </tbody>
@@ -51,14 +51,14 @@
                 <tr>
                     <td colspan="2">
                         <Button size="small" @click="showComponent('Close', index)">
-                            {{ $t('operation.close') }}
+                            {{ t('operation.close') }}
                         </Button>
                         <Button size="small" @click="showComponent('MarketClose', index)">
-                            {{ $t('digital.marketclose') }}
+                            {{ t('digital.marketclose') }}
                         </Button>
                         <Button size="small" @click="showComponent('TPSL', index)"
                             v-if="item?.tpslflag === 1 && item.riskcontrolmode === 2">
-                            {{ $t('digital.spsl') }}
+                            {{ t('digital.spsl') }}
                         </Button>
                     </td>
                 </tr>
@@ -77,7 +77,7 @@ import { getBuyOrSellName, getGoodsCurrencyItemName } from '@/constants/order'
 import { useRequest } from '@/hooks/request'
 import { useComponent } from '@/hooks/component'
 import { queryTradeHolderDetail } from '@/services/api/order'
-import { useFuturesStore } from '@/stores'
+import { i18n, useFuturesStore } from '@/stores'
 import eventBus from '@/services/bus'
 import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
 
@@ -94,6 +94,7 @@ const componentMap = new Map<string, unknown>([
     ['TPSL', defineAsyncComponent(() => import('./tpsl/index.vue'))], // 止盈止损
 ])
 
+const { t } = i18n.global
 const futuresStore = useFuturesStore()
 const pullRefreshRef = shallowRef()
 const showModal = shallowRef(true) // 是否刷新父组件数据

+ 1 - 1
src/services/api/goods/index.ts

@@ -203,7 +203,7 @@ export function getTCEGoodsCollections(config: RequestConfig = {}) {
  * 查询热门商品(按上日成交额,持仓额倒序)
  */
 export function getHotGoodses(config: RequestConfig) {
-    return http.commonRequest<Model.HotGoodsesRsp[]>({
+    return http.commonRequest<Model.GoodsRsp[]>({
         url: '/Common/GetHotGoodses',
         params: config.data,
     })

+ 0 - 25
src/types/model/goods.d.ts

@@ -647,29 +647,4 @@ declare namespace Model {
         // 缩略图片(1:1)(1张)
         thumurls: string;
     }
-
-    /** 查询热门商品(按上日成交额,持仓额倒序) 响应 */
-    interface HotGoodsesRsp {
-        bannerurls: string; // Banner图片(2:1)(逗号分隔)
-        buyholdamount: number; // 买持仓额
-        currencyid: number; // 报价货币ID(80:计价货币)
-        decimalplace: number; // 报价小数位
-        goodscode: string; // 商品代码(内部)
-        goodscurrencyid: number; // 合约货币ID(80:基础货币)
-        goodsid: number; // 商品ID
-        goodsname: string; // 商品名称
-        goodsnameen: string; // 期货合约名称(英文)
-        goodsnameth: string; // 期货合约名称泰文)
-        goodsnametw: string; // 期货合约名称(繁体)
-        goodsnamevi: string; // 期货合约名称(越南语)
-        marketid: number; // 市场ID
-        outgoodscode: string; // 商品代码(外部)
-        pictureurl: string; // 商品图片
-        quoteminunit: number; // 行情最小变动单位 [整数,报价小数位一起使用]
-        reckondate: string; // 日期
-        sellholdamount: number; // 卖持仓额
-        thumurls: string; // 缩略图片(1:1)(逗号分隔)
-        tradeamount: number; // 成交额
-        trademode: number; // 交易模式 - 10:做市 13:竞价 15:通道交易 16:挂牌点选 17:仓单贸易 18:期权 19:竞拍-降价式 20:竞拍-竞价式 21:竞拍-大宗式 22:受托竞价
-    }
 }