Handy_Cao há 3 semanas atrás
pai
commit
8e3eaf9322

+ 18 - 5
public/locales/en-US.json

@@ -231,8 +231,8 @@
         "last": "Latest price",
         "rise": "Rise and fall",
         "change": "Range",
-        "opened": "Opening price",
-        "presettle": "Previous close",
+        "opened": "Opened",
+        "presettle": "Presettle",
         "lowest": "Lowest",
         "highest": "Highest",
         "amplitude": "Amplitude",
@@ -1833,12 +1833,25 @@
         "position": "Position",
         "order": "Order",
         "account": "Account",
-        "trade": "Deal Made",
+        "trade": "Trade",
         "activation": "Activation",
-        "funds": "Funds Log",
+        "funds": "Fund-Logs",
         "transfer-in": "Transfer-In",
         "transfer-out": "Transfer-Out",
         "currencydecimalplace": "EquityAccounts",
-        "balance": "Balance"
+        "balance": "Balance",
+        "optimal": "OptimalPrice",
+        "openAmount": "OpenAmount",
+        "maxBalance": "AvaiableMoney",
+        "maxBuyQty": "MaxBuyQty",
+        "buyEstimatedFee": "EstimatedFee",
+        "pricemode": "PriceMode",
+        "orderprice": "OrderPrice",
+        "marketprice": "MarketPrice",
+        "limitprice": "LimitPrice",
+        "sell": "Sell",
+        "buy": "Buy",
+        "marketclose": "Market-Close",
+        "history": "History"
     }
 }

+ 14 - 1
public/locales/th-TH.json

@@ -1842,6 +1842,19 @@
         "transfer-in": "轉入",
         "transfer-out": "轉出",
         "currencydecimalplace": "EquityAccounts",
-        "balance": "余额"
+        "balance": "余额",
+        "optimal": "OptimalPrice",
+        "openAmount": "OpenAmount",
+        "maxBalance": "AvaiableMoney",
+        "maxBuyQty": "MaxBuyQty",
+        "buyEstimatedFee": "EstimatedFee",
+        "pricemode": "PriceMode",
+        "orderprice": "OrderPrice",
+        "marketprice": "MarketPrice",
+        "limitprice": "LimitPrice",
+        "sell": "Sell",
+        "buy": "Buy",
+        "marketclose": "MarketClose",
+        "history": "历史"
     }
 }

+ 14 - 1
public/locales/vi-VN.json

@@ -1839,6 +1839,19 @@
         "transfer-in": "轉入",
         "transfer-out": "轉出",
         "currencydecimalplace": "EquityAccounts",
-        "balance": "余额"
+        "balance": "余额",
+        "optimal": "OptimalPrice",
+        "openAmount": "OpenAmount",
+        "maxBalance": "AvaiableMoney",
+        "maxBuyQty": "MaxBuyQty",
+        "buyEstimatedFee": "EstimatedFee",
+        "pricemode": "PriceMode",
+        "orderprice": "OrderPrice",
+        "marketprice": "MarketPrice",
+        "limitprice": "LimitPrice",
+        "sell": "Sell",
+        "buy": "Buy",
+        "marketclose": "MarketClose",
+        "history": "历史"
     }
 }

+ 14 - 1
public/locales/zh-CN.json

@@ -1842,6 +1842,19 @@
         "transfer-in": "转入",
         "transfer-out": "转出",
         "currencydecimalplace": "账户权益",
-        "balance": "余额"
+        "balance": "余额",
+        "optimal": "最优市价",
+        "openAmount": "开仓价值",
+        "maxBalance": "可用余额",
+        "maxBuyQty": "可开数量",
+        "buyEstimatedFee": "预估手续费",
+        "pricemode": "方式",
+        "orderprice": "价格",
+        "marketprice": "市价单",
+        "limitprice": "限价单",
+        "sell": "开空",
+        "buy": "开多",
+        "marketclose": "市价平仓",
+        "history": "历史"
     }
 }

+ 14 - 1
public/locales/zh-TW.json

@@ -1842,6 +1842,19 @@
         "transfer-in": "轉入",
         "transfer-out": "轉出",
         "currencydecimalplace": "賬戶權益",
-        "balance": "餘額"
+        "balance": "餘額",
+        "optimal": "最優市價",
+        "openAmount": "開倉價值",
+        "maxBalance": "可用餘額",
+        "maxBuyQty": "可開數量",
+        "buyEstimatedFee": "預估手續費",
+        "pricemode": "方式",
+        "orderprice": "價格",
+        "marketprice": "市價單",
+        "limitprice": "限價單",
+        "sell": "開空",
+        "buy": "開多",
+        "marketclose": "市價平倉",
+        "history": "歷史"
     }
 }

+ 11 - 6
src/packages/digital/views/contract/components/account/index.vue

@@ -4,32 +4,32 @@
             <thead>
                 <tr>
                     <th colspan="3">
-                        <span>资金({{ item.accountid }})</span>
+                        <span>{{ $t('digital.account')+`(${ item.accountid })` }}</span>
                     </th>
                 </tr>
             </thead>
             <tbody>
                 <tr>
                     <td colspan="2">
-                        <span class="text-small">账户权益(USDT)</span>
+                        <span class="text-small">{{ $t('digital.currencydecimalplace')+`(${currency(item.currencyid)})` }}</span>
                         <span>{{ formatDecimal(item.balance) }}</span>
                     </td>
                     <td>
-                        <span class="text-small">浮动盈亏</span>
+                        <span class="text-small">{{ $t('account.profitLoss') }}</span>
                         <span>{{ formatDecimal(item.closepl) }}</span>
                     </td>
                 </tr>
                 <tr>
                     <td>
-                        <span class="text-small">可用(USDT)</span>
+                        <span class="text-small">{{ $t('mine.availableFunds')+`(${currency(item.currencyid)})` }}</span>
                         <span>{{ formatDecimal(item.avaiableBalance) }}</span>
                     </td>
                     <td>
-                        <span class="text-small">占用(USDT)</span>
+                        <span class="text-small">{{ $t('account.usedMargin')+`(${currency(item.currencyid)})` }}</span>
                         <span>{{ formatDecimal(item.usedmargin) }}</span>
                     </td>
                     <td>
-                        <span class="text-small">冻结(USDT)</span>
+                        <span class="text-small">{{ $t('account.freeze')+`(${currency(item.currencyid)})` }}</span>
                         <span>{{ formatDecimal(item.freezeMargin) }}</span>
                     </td>
                 </tr>
@@ -51,6 +51,7 @@ import { Button } from 'vant'
 import { formatDecimal } from '@/filters'
 import { useNavigation } from '@mobile/router/navigation'
 import { useAccountStore, useFuturesStore } from '@/stores'
+import { getGoodsCurrencyItemName } from '@/constants/order'
 
 const props = defineProps({
     goodsId: {
@@ -61,6 +62,10 @@ const props = defineProps({
 const futuresStore = useFuturesStore()
 const accountStore = useAccountStore()
 
+const currency = (id: number) => {
+    return getGoodsCurrencyItemName(id)
+}
+
 const { currencyid = 0, goodscurrencyid = 0 } = futuresStore.getQuoteItem({ goodsid: props.goodsId }) ?? {}
 
 const accountList = computed(() => accountStore.filterAccountsByCurrencyId(currencyid, goodscurrencyid))

+ 1 - 1
src/packages/digital/views/contract/components/order/index.vue

@@ -7,7 +7,7 @@
                         <app-date-picker v-model="dateValue" @confirm="onRefresh()" v-if="checked" />
                     </td>
                     <td>
-                        <Checkbox v-model="checked">历史</Checkbox>
+                        <Checkbox v-model="checked">{{ $t('digital.history') }}</Checkbox>
                     </td>
                 </tr>
             </tbody>

+ 2 - 1
src/packages/digital/views/contract/components/position/detail/close/index.vue

@@ -51,7 +51,7 @@
                 </CellGroup>
             </Form>
             <div class="g-form__footer inset">
-                <Button type="primary" @click="formRef?.submit()" block>平仓</Button>
+                <Button type="primary" @click="formRef?.submit()" block>{{ $t('operation.close') }}</Button>
             </div>
         </app-view>
     </app-modal>
@@ -77,6 +77,7 @@ const props = defineProps({
     }
 })
 
+// const { global: { t } } = i18n
 const userStore = useUserStore()
 const futuresStore = useFuturesStore()
 const positionStore = usePositionStore()

+ 15 - 10
src/packages/digital/views/contract/components/position/detail/index.vue

@@ -2,7 +2,7 @@
     <app-modal direction="right-top" height="100%" width="100%" v-model:show="showModal" :refresh="refresh">
         <app-view class="g-form">
             <template #header>
-                <app-navbar title="持仓明细" @back="closed" />
+                <app-navbar :title="t('quote.pricing.holdlb')" @back="closed" />
             </template>
             <app-pull-refresh ref="pullRefreshRef" class="g-detail-table" v-model:loading="loading"
                 @refresh="onRefresh">
@@ -21,7 +21,7 @@
                         </tr>
                         <tr>
                             <td colspan="3">
-                                <span class="text-small">浮动盈亏({{ getGoodsCurrencyItemName(item.currencyid) }})</span>
+                                <span class="text-small">{{ $t('account.profitLoss')+`(${currency(item.currencyid)})` }}</span>
                                 <span :class="item.profitLossClass">
                                     {{ item.profitLoss.toFixed(item.decimalplace) }}
                                 </span>
@@ -29,27 +29,27 @@
                         </tr>
                         <tr>
                             <td>
-                                <span class="text-small">可用量({{ item.goodscode }})</span>
+                                <span class="text-small">{{ $t('position.goods.enableqty')+`(${item.goodscode})` }}</span>
                                 <span>
                                     {{ item.holderqty - item.freezeqty }}
                                 </span>
                             </td>
                             <td>
-                                <span class="text-small">持仓量({{ item.goodscode }})</span>
+                                <span class="text-small">{{ $t('position.goods.holderqty')+`(${item.goodscode})` }}</span>
                                 <span>{{ item.holderqty }}</span>
                             </td>
                             <td>
-                                <span class="text-small">冻结量({{ item.goodscode }})</span>
+                                <span class="text-small">{{ $t('position.goods.frozenqty')+`(${item.goodscode})` }}</span>
                                 <span>{{ item.freezeqty }}</span>
                             </td>
                         </tr>
                         <tr>
                             <td>
-                                <span class="text-small">持仓价格({{ getGoodsCurrencyItemName(item.currencyid) }})</span>
+                                <span class="text-small">{{ $t('position.goods.holderprice')+`(${currency(item.currencyid)})` }}</span>
                                 <span>{{ item.holderprice }}</span>
                             </td>
                             <td>
-                                <span class="text-small">持仓金额({{ getGoodsCurrencyItemName(item.currencyid) }})</span>
+                                <span class="text-small">{{ $t('position.goods.holderamount')+`(${currency(item.currencyid)})` }}</span>
                                 <span>{{ item.holderamount }}</span>
                             </td>
                             <td></td>
@@ -58,8 +58,8 @@
                     <tfoot>
                         <tr>
                             <td colspan="3">
-                                <Button size="small" @click="showComponent('Close', item)">平仓</Button>
-                                <Button size="small" @click="showComponent('MarketClose', item)">市价平仓</Button>
+                                <Button size="small" @click="showComponent('Close', item)">{{ $t('operation.close') }}</Button>
+                                <Button size="small" @click="showComponent('MarketClose', item)">{{ $t('digital.marketclose') }}</Button>
                             </td>
                         </tr>
                     </tfoot>
@@ -79,7 +79,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 AppModal from '@/components/base/modal/index.vue'
 import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
 
@@ -95,6 +95,7 @@ const componentMap = new Map<string, unknown>([
     ['MarketClose', defineAsyncComponent(() => import('./market-close/index.vue'))], // 市价平仓
 ])
 
+const { global: { t } } = i18n
 const showModal = shallowRef(true) // 是否刷新父组件数据
 const refresh = shallowRef(false)
 const selectedItem = shallowRef<Model.TradeHolderDetailRsp>()
@@ -102,6 +103,10 @@ const selectedItem = shallowRef<Model.TradeHolderDetailRsp>()
 const futuresStore = useFuturesStore()
 const quote = computed(() => futuresStore.getQuoteItem({ goodsid: props.selectedRow.goodsid }))
 
+const currency = (id: number) => {
+    return getGoodsCurrencyItemName(id)
+}
+
 const { componentRef, componentId, openComponent, closeComponent } = useComponent(() => onRefresh())
 
 const { dataList, loading, run } = useRequest(queryTradeHolderDetail, {

+ 10 - 2
src/packages/digital/views/contract/components/position/history/index.vue

@@ -36,7 +36,7 @@
                 </tr>
                 <tr>
                     <td>
-                        <span>平仓盈亏(USDT)</span>
+                        <span>{{ $t('order.pricingtrade.closepl')+`(${currency(item.goodsid)})` }}</span>
                         <span>{{ item.closepl }}</span>
                     </td>
                 </tr>
@@ -48,10 +48,11 @@
 <script lang="ts" setup>
 import { PropType, shallowRef } from 'vue'
 import { formatDate } from '@/filters'
-import { getBuyOrSellName } from '@/constants/order'
+import { getBuyOrSellName, getGoodsCurrencyItemName } from '@/constants/order'
 import { useRequest } from '@/hooks/request'
 import { queryTradeHolderDetailEx } from '@/services/api/order'
 import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
+import { useFuturesStore } from '@/stores'
 
 const props = defineProps({
     params: {
@@ -60,9 +61,16 @@ const props = defineProps({
     }
 })
 
+const futuresStore = useFuturesStore()
+
 const pullRefreshRef = shallowRef()
 const dataList = shallowRef<Model.TradeHolderDetailExRsp[]>([])
 
+const currency = (id: number) => {
+    const { currencyid = 0 } = futuresStore.getGoods(id) ?? {}
+    return getGoodsCurrencyItemName(currencyid)
+}
+
 const { loading, pageIndex, pageCount, run } = useRequest(queryTradeHolderDetailEx, {
     manual: true,
     defaultParams: {

+ 1 - 1
src/packages/digital/views/contract/components/position/index.vue

@@ -8,7 +8,7 @@
                         <app-date-picker v-model="dateValue" @confirm="onRefresh()" v-if="checked" />
                     </td>
                     <td>
-                        <Checkbox v-model="checked">历史</Checkbox>
+                        <Checkbox v-model="checked">{{ $t('digital.history') }}</Checkbox>
                     </td>
                 </tr>
             </tbody>

+ 1 - 1
src/packages/digital/views/contract/components/position/list/close/index.vue

@@ -49,7 +49,7 @@
                 </CellGroup>
             </Form>
             <div class="g-form__footer inset">
-                <Button type="primary" @click="formRef?.submit()" block>平仓</Button>
+                <Button type="primary" @click="formRef?.submit()" block>{{ $t('operation.close') }}</Button>
             </div>
         </app-view>
     </app-modal>

+ 2 - 2
src/packages/digital/views/contract/components/position/list/index.vue

@@ -55,8 +55,8 @@
             <tfoot>
                 <tr>
                     <td colspan="3">
-                        <Button size="small" @click="showComponent('Close', item)">平仓</Button>
-                        <Button size="small" @click="showComponent('MarketClose', item)">市价平仓</Button>
+                        <Button size="small" @click="showComponent('Close', item)">{{ $t('operation.close') }}</Button>
+                        <Button size="small" @click="showComponent('MarketClose', item)">{{ $t('digital.marketclose') }}</Button>
                         <Button size="small" @click="showComponent('TPSL', item)">止盈止损</Button>
                     </td>
                 </tr>

+ 1 - 1
src/packages/digital/views/contract/components/statement/index.vue

@@ -7,7 +7,7 @@
                         <app-date-picker v-model="dateValue" @confirm="onRefresh()" v-if="checked" />
                     </td>
                     <td>
-                        <Checkbox v-model="checked">历史</Checkbox>
+                        <Checkbox v-model="checked">{{ $t('digital.history') }}</Checkbox>
                     </td>
                 </tr>
             </tbody>

+ 1 - 1
src/packages/digital/views/contract/components/trade/index.vue

@@ -7,7 +7,7 @@
                         <app-date-picker v-model="dateValue" @confirm="onRefresh()" v-if="checked" />
                     </td>
                     <td>
-                        <Checkbox v-model="checked">历史</Checkbox>
+                        <Checkbox v-model="checked">{{ $t('digital.history') }}</Checkbox>
                     </td>
                 </tr>
             </tbody>

+ 21 - 14
src/packages/digital/views/contract/detail/index.vue

@@ -5,23 +5,23 @@
             <app-navbar title="合约明细" />
         </template>
         <Grid :border="false" :column-num="quotes.length ? 2 : 1">
-            <GridItem icon="peer-pay" text="划转" :to="{ name: 'wallet-transfer', query: { id: accountid } }" />
-            <GridItem icon="chart-trending-o" text="交易" @click="navigateToContractDetail()" v-if="quotes.length" />
+            <GridItem icon="peer-pay" :text="$t('digital.wallet-transfer')" :to="{ name: 'wallet-transfer', query: { id: accountid } }" />
+            <GridItem icon="chart-trending-o" :text="$t('digital.spot-goods-detail')" @click="navigateToContractDetail()" v-if="quotes.length" />
         </Grid>
         <div class="g-detail-table" v-if="accountItem">
             <table cellspacing="0" cellpadding="0">
                 <tbody>
                     <tr>
                         <td>
-                            <span class="text-small">账户权益(USDT)</span>
+                            <span class="text-small">{{ $t('digital.currencydecimalplace')+`(${currency(accountItem.currencyid)})` }}</span>
                             <span>{{ accountItem.balance.toFixed(accountItem.currencydecimalplace) }}</span>
                         </td>
                         <td>
-                            <span class="text-small">浮动盈亏</span>
+                            <span class="text-small">{{ $t('account.profitLoss') }}</span>
                             <span :class="handlePriceColor(accountItem.profitLoss)">{{ accountItem.profitLoss.toFixed(accountItem.currencydecimalplace) }}</span>
                         </td>
                         <td>
-                            <span class="text-small">风险率</span>
+                            <span class="text-small">{{ $t('account.riskRate') }}</span>
                             <span :class="accountItem.hazardRatioColor">
                                 {{ parsePercent(accountItem.hazardRatio) }}
                             </span>
@@ -29,15 +29,15 @@
                     </tr>
                     <tr>
                         <td>
-                            <span class="text-small">可用(USDT)</span>
+                            <span class="text-small">{{ $t('mine.availableFunds')+`(${currency(accountItem.currencyid)})` }}</span>
                             <span>{{ accountItem.avaiableBalance.toFixed(accountItem.currencydecimalplace) }}</span>
                         </td>
                         <td>
-                            <span class="text-small">占用(USDT)</span>
+                            <span class="text-small">{{ $t('account.usedMargin')+`(${currency(accountItem.currencyid)})` }}</span>
                             <span>{{ accountItem.usedmargin.toFixed(accountItem.currencydecimalplace) }}</span>
                         </td>
                         <td>
-                            <span class="text-small">冻结(USDT)</span>
+                            <span class="text-small">{{ $t('account.freeze')+`(${currency(accountItem.currencyid)})` }}</span>
                             <span>{{ accountItem.freezeMargin.toFixed(accountItem.currencydecimalplace) }}</span>
                         </td>
                     </tr>
@@ -45,20 +45,20 @@
             </table>
         </div>
         <Tabs>
-            <Tab title="持仓">
+            <Tab :title="t('digital.position')">
                 <contract-position :params="{ accountid }" />
             </Tab>
-            <Tab title="委托">
+            <Tab :title="t('digital.order')">
                 <contract-order v-bind="{ accountid }" />
             </Tab>
-            <Tab title="成交">
+            <Tab :title="t('digital.trade')">
                 <contract-trade v-bind="{ accountid }" />
             </Tab>
-            <Tab title="资金明细">
+            <Tab :title="t('digital.funds')">
                 <contract-statement v-bind="{ accountid }" />
             </Tab>
         </Tabs>
-        <ActionSheet v-model:show="showSheet" title="请选择">
+        <ActionSheet v-model:show="showSheet" :title="t('common.choice')">
             <CellGroup style="min-height: 200px;">
                 <template v-for="(item, index) in quotes" :key="index">
                     <Cell :title="item.goodsname" :value="item.goodscode" :border="false" is-link
@@ -74,20 +74,27 @@ import { shallowRef, computed } from 'vue'
 import { Cell, CellGroup, Tab, Tabs, Grid, GridItem, ActionSheet } from 'vant'
 import { handlePriceColor, parsePercent } from '@/filters'
 import { useNavigation } from '@mobile/router/navigation'
-import { useAccountStore, useFuturesStore } from '@/stores'
+import { i18n, useAccountStore, useFuturesStore } from '@/stores'
 import ContractOrder from '../components/order/index.vue'
 import ContractTrade from '../components/trade/index.vue'
 import ContractPosition from '../components/position/list/index.vue'
 import ContractStatement from '../components/statement/index.vue'
+import { getGoodsCurrencyItemName } from '@/constants/order'
 
 const { router, getQueryStringToNumber } = useNavigation()
 
+const { global: { t } } = i18n
+
 const futuresStore = useFuturesStore()
 const accountStore = useAccountStore()
 
 const accountid = getQueryStringToNumber('id')
 const showSheet = shallowRef(false)
 
+const currency = (id: number) => {
+    return getGoodsCurrencyItemName(id)
+}
+
 // 合约账户
 const accountItem = computed(() => accountStore.getAccountItem({ accountid }))
 

+ 6 - 6
src/packages/digital/views/contract/goods/chart/index.vue

@@ -19,13 +19,13 @@
                                 </div>
                             </td>
                             <td class="data-table__cell">
-                                <div class="text-small">昨结</div>
+                                <div class="text-small">{{ $t('quote.presettle') }}</div>
                                 <div>
                                     {{ handleNumberValue(quote.presettle.toFixed(quote.decimalplace)) }}
                                 </div>
                             </td>
                             <td class="data-table__cell">
-                                <div class="text-small">最高</div>
+                                <div class="text-small">{{ $t('quote.highest') }}</div>
                                 <div :class="quote.highestColor">
                                     {{ handleNumberValue(quote.highest.toFixed(quote.decimalplace)) }}
                                 </div>
@@ -33,13 +33,13 @@
                         </tr>
                         <tr>
                             <td class="data-table__cell">
-                                <div class="text-small">开盘</div>
+                                <div class="text-small">{{ $t('quote.opened') }}</div>
                                 <div :class="quote.openedColor">
                                     {{ handleNumberValue(quote.opened.toFixed(quote.decimalplace)) }}
                                 </div>
                             </td>
                             <td class="data-table__cell">
-                                <div class="text-small">最低</div>
+                                <div class="text-small">{{ $t('quote.lowest') }}</div>
                                 <div :class="quote.lowestColor">
                                     {{ handleNumberValue(quote.lowest.toFixed(quote.decimalplace)) }}
                                 </div>
@@ -53,10 +53,10 @@
         <template #footer>
             <Row class="g-layout-block g-layout-block--inset" gutter="10">
                 <Col span="12">
-                <Button type="success" block @click="routerBack({ buyOrSell: BuyOrSell.Buy })">开多</Button>
+                <Button type="success" block @click="routerBack({ buyOrSell: BuyOrSell.Buy })">{{ $t('digital.buy') }}</Button>
                 </Col>
                 <Col span="12">
-                <Button type="danger" block @click="routerBack({ buyOrSell: BuyOrSell.Sell })">开空</Button>
+                <Button type="danger" block @click="routerBack({ buyOrSell: BuyOrSell.Sell })">{{ $t('digital.sell') }}</Button>
                 </Col>
             </Row>
         </template>

+ 18 - 18
src/packages/digital/views/contract/goods/detail/index.vue

@@ -12,7 +12,7 @@
                             <span :class="quote.lastColor">{{ parsePercent(quote.change) }}</span>
                         </template>
                         <template #right-icon>
-                            <span @click="routerToChart">图表</span>
+                            <span @click="routerToChart">{{ $t('operation.chart') }}</span>
                         </template>
                     </Cell>
                 </template>
@@ -25,46 +25,46 @@
         <Row class="g-layout-block g-layout-block--inset" gutter="10">
             <Col span="12">
             <Button :type="formData.BuyOrSell === BuyOrSell.Buy ? 'success' : 'default'" size="small" block
-                @click="buyOrSell(BuyOrSell.Buy)">开多</Button>
+                @click="buyOrSell(BuyOrSell.Buy)">{{ $t('digital.buy') }}</Button>
             </Col>
             <Col span="12">
             <Button :type="formData.BuyOrSell === BuyOrSell.Sell ? 'danger' : 'default'" size="small" block
-                @click="buyOrSell(BuyOrSell.Sell)">开空</Button>
+                @click="buyOrSell(BuyOrSell.Sell)">{{ $t('digital.sell') }}</Button>
             </Col>
         </Row>
         <Form ref="formRef" class="g-form__container" @submit="onSubmit">
             <CellGroup inset>
-                <Field label="方式" is-link>
+                <Field :label="t('digital.pricemode')" is-link>
                     <template #input>
                         <app-select v-model="formData.PriceMode" :options="options" />
                     </template>
                 </Field>
                 <Field v-if="formData.PriceMode === PriceMode.Limit" name="OrderPrice"
-                    :rules="formRules.OrderPrice" :label="'价格' + enumName">
+                    :rules="formRules.OrderPrice" :label="t('digital.orderprice') + enumName">
                     <template #input>
                         <app-stepper v-model="formData.OrderPrice" :min="0" :decimal-length="quote?.decimalplace"
                             :step="quote?.decimalvalue" />
                     </template>
                 </Field>
-                <Cell v-else value="最优市价" />
-                <Field name="OrderQty" :rules="formRules.OrderQty" label="数量">
+                <Cell v-else :value="t('digital.optimal')" />
+                <Field name="OrderQty" :rules="formRules.OrderQty" :label="t('quote.goods.orderqty')">
                     <template #input>
                         <app-stepper v-model="formData.OrderQty" :min="0" />
                     </template>
                 </Field>
-                <Cell title="开仓价值" :value="formatDecimal(calculations.openAmount) + enumName" />
+                <Cell :title="t('digital.openAmount')" :value="formatDecimal(calculations.openAmount) + enumName" />
             </CellGroup>
             <CellGroup inset>
-                <Cell title="可用余额" :value="formatDecimal(calculations.maxBalance)" />
-                <Cell title="可开数量" :value="handleNoneValue(formatDecimal(calculations.maxBuyQty, 0))" />
-                <Cell title="预估手续费" :value="formatDecimal(calculations.buyEstimatedFee)" />
+                <Cell :title="t('digital.maxBalance')" :value="formatDecimal(calculations.maxBalance)" />
+                <Cell :title="t('digital.maxBuyQty')" :value="handleNoneValue(formatDecimal(calculations.maxBuyQty, 0))" />
+                <Cell :title="t('digital.buyEstimatedFee')" :value="formatDecimal(calculations.buyEstimatedFee)" />
             </CellGroup>
         </Form>
         <Row class="g-layout-block g-layout-block--inset">
             <Col span="24">
             <Button :type="formData.BuyOrSell === BuyOrSell.Buy ? 'success' : 'danger'" block
                 @click="formRef?.submit">{{
-                    formData.BuyOrSell === BuyOrSell.Buy ? '开多' : '开空' }}{{ goods?.goodscode }}</Button>
+                    formData.BuyOrSell === BuyOrSell.Buy ? $t('digital.buy') : $t('digital.sell') }}{{ goods?.goodscode }}</Button>
             </Col>
         </Row>
         <Tabs v-model:active="tabIndex">
@@ -117,9 +117,9 @@ const quote = computed(() => futuresStore.getQuoteItem({ goodsid: goodsId }))
 
 const options = computed(() => {
     return [{
-        label: '市价单', value: PriceMode.Market
+        label: t('digital.marketprice'), value: PriceMode.Market
     }, {
-        label: '限价单', value: PriceMode.Limit
+        label: t('digital.limitprice'), value: PriceMode.Limit
     }]
 })
 
@@ -186,19 +186,19 @@ const buyOrSell = (item: BuyOrSell) => {
 // 表单验证规则
 const formRules: { [key: string]: FieldRule[] } = {
     OrderPrice: [{
-        message: '请输入价格',
+        message: t('quote.goods.pleaseenterorderprice'),
         validator: () => {
             return !!formData.OrderPrice
         }
     }],
     OrderQty: [{
-        message: '请输入数量',
+        message: t('quote.goods.pleaseenterorderqty'),
         validator: (val) => {
             if (val) {
                 if (val > 0) {
                     return true
                 }
-                return '数量必须大于0'
+                return `${t('quote.ballot.ordercannotbegreaterthan')}0`
             }
             return false
         }
@@ -223,7 +223,7 @@ const onSubmit = () => {
 
         fullloading((hideLoading) => {
             formSubmit().then(() => {
-                hideLoading('提交成功。', 'success')
+                hideLoading(t('quote.goods.tips3'), 'success')
                 // 刷新订单列表
                 getSBYJMyOrders()
             }).catch((err) => {

+ 1 - 1
src/packages/digital/views/wallet/components/spot/index.vue

@@ -36,7 +36,7 @@
 </template>
 
 <script lang="ts" setup>
-import { Icon } from 'vant'
+import { Icon, Search } from 'vant'
 import { formatDecimal } from '@/filters'
 import { getDigitalCurrencyName } from '@/constants/order'
 import { useSpotAccountStore } from './composables'

+ 6 - 4
src/packages/digital/views/wallet/currency/index.vue

@@ -2,9 +2,9 @@
     <app-view>
         <template #header>
             <app-navbar :title="title">
-                <template #footer>
-                    <Search shape="round" placeholder="搜索" />
-                </template>
+                <!-- <template #footer>
+                    <Search shape="round" :placeholder="t('digital.search')" />
+                </template> -->
             </app-navbar>
         </template>
         <spot-account @click="navigateTo" />
@@ -12,9 +12,10 @@
 </template>
 
 <script lang="ts" setup>
-import { Search } from 'vant'
+// import { Search } from 'vant'
 import { useNavigation } from '@mobile/router/navigation'
 import SpotAccount from '../components/spot/index.vue'
+import { i18n } from '@/stores'
 
 const props = defineProps({
     title: {
@@ -27,6 +28,7 @@ const props = defineProps({
     }
 })
 
+const { global: { t } } = i18n
 const { router } = useNavigation()
 
 const navigateTo = (currencyId: number) => {

+ 5 - 5
src/packages/digital/views/wallet/index.vue

@@ -5,17 +5,17 @@
             <app-statusbar />
         </template>
         <Grid :border="false">
-            <GridItem icon="pending-payment" text="充值" :to="{ name: 'wallet-deposit-currency' }" />
-            <GridItem icon="paid" text="提现" :to="{ name: 'wallet-withdraw-currency' }" />
-            <GridItem icon="peer-pay" text="划转" :to="{ name: 'wallet-transfer' }" />
-            <GridItem icon="setting-o" text="设置" :to="{ name: 'setting' }" />
+            <GridItem icon="pending-payment" :text="t('digital.wallet-deposit')" :to="{ name: 'wallet-deposit-currency' }" />
+            <GridItem icon="paid" :text="t('digital.wallet-withdraw')" :to="{ name: 'wallet-withdraw-currency' }" />
+            <GridItem icon="peer-pay" :text="t('digital.wallet-transfer')" :to="{ name: 'wallet-transfer' }" />
+            <GridItem icon="setting-o" :text="t('digital.setting')" :to="{ name: 'setting' }" />
         </Grid>
         <Tabs v-model:active="currentTabIndex">
             <Tab :title="t('tabbar.contract')">
                 <contract-account @click="navigateToContractDetail" />
             </Tab>
             <Tab :title="t('tabbar.spot')">
-                <Search shape="round" placeholder="搜索" />
+                <Search shape="round" :placeholder="t('digital.search')" />
                 <spot-account @click="navigateToSpotDetail" />
             </Tab>
         </Tabs>