Handy_Cao hai 23 horas
pai
achega
7eb62d2734

+ 5 - 4
src/packages/digital/components/field-currency/index.vue

@@ -1,11 +1,11 @@
 <template>
-    <Field v-bind="$attrs" placeholder="请选择" arrow-direction="down" is-link readonly @click="showSheet = true">
+    <Field v-bind="$attrs" :placeholder="t('common.choice')" arrow-direction="down" is-link readonly @click="showSheet = true">
         <template #input v-if="currencyItem">
             <app-image-icon :url="getCurrencyIconUrl(currencyItem.enumitemvalue)" size="small" />
             <span>{{ currencyItem.label }}</span>
         </template>
     </Field>
-    <ActionSheet v-model:show="showSheet" title="请选择" teleport="body">
+    <ActionSheet v-model:show="showSheet" :title="t('common.choice')" teleport="body">
         <CellGroup style="min-height: 200px;">
             <RadioGroup v-model="currencyId" v-if="currencyList.length">
                 <template v-for="(item, index) in currencyList" :key="index">
@@ -21,7 +21,7 @@
                     </Cell>
                 </template>
             </RadioGroup>
-            <Empty description="暂无数据" v-else />
+            <Empty :description="t('common.nodatas')" v-else />
         </CellGroup>
     </ActionSheet>
 </template>
@@ -33,6 +33,7 @@ import { getCurrencyIconUrl } from '@/filters'
 import { getDigitalCurrencyList } from '@/constants/order'
 import { useSpotAccountStore } from '../../views/wallet/components/spot/composables'
 import AppImageIcon from '@mobile/components/base/image-icon/index.vue'
+import { i18n } from '@/stores'
 
 const props = defineProps({
     modelValue: {
@@ -41,7 +42,7 @@ const props = defineProps({
 })
 
 const emit = defineEmits(['update:modelValue', 'change'])
-
+const { global: { t } } = i18n
 const showSheet = shallowRef(false)
 const spotAccountStore = useSpotAccountStore()
 const digitalCurrencyList = getDigitalCurrencyList()

+ 3 - 2
src/packages/digital/components/wallet-total/index.vue

@@ -3,7 +3,7 @@
         <div class="wallet-total__inner">
             <div class="wallet-total__header">
                 <div class="wallet-total__title">
-                    <span>总计 {{ currency }}</span>
+                    <span>{{ `${t('digital.total')}${currency}` }}</span>
                     <img :src="`./img/icons/${isBalanceVisible ? 'eye' : 'eye-hidden'}.svg`"
                         @click="isBalanceVisible = !isBalanceVisible" />
                 </div>
@@ -21,7 +21,7 @@
 
 <script lang="ts" setup>
 import { shallowRef, computed, watch, onActivated } from 'vue'
-import { useAccountStore } from '@/stores'
+import { i18n, useAccountStore } from '@/stores'
 import { useSpotAccountStore } from '../../views/wallet/components/spot/composables'
 import { Decimal } from 'decimal.js'
 
@@ -33,6 +33,7 @@ const props = defineProps({
     balance: String,
 })
 
+const { global: { t } } = i18n
 const accountStore = useAccountStore()
 const spotAccountStore = useSpotAccountStore()
 const isBalanceVisible = shallowRef(true)

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

@@ -41,7 +41,7 @@
             <tfoot>
                 <tr>
                     <td colspan="3">
-                        <Button size="small" @click="navigateTo('wallet-transfer', item.accountid)">划转</Button>
+                        <Button size="small" @click="navigateTo('wallet-transfer', item.accountid)">{{ $t('digital.wallet-transfer') }}</Button>
                     </td>
                 </tr>
             </tfoot>

+ 7 - 7
src/packages/digital/views/listing/goods/chart/index.vue

@@ -1,7 +1,7 @@
 <template>
     <app-view class="spot-goods-chart g-layout" background="primary">
         <template #header>
-            <app-navbar :title="quote ? quote.goodscode : '图表'" />
+            <app-navbar :title="quote ? quote.goodscode : `${t('operation.chart')}`" />
         </template>
         <template v-if="quote">
             <app-block class="quote-table">
@@ -24,13 +24,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>
@@ -38,13 +38,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>
@@ -57,8 +57,8 @@
         </template>
         <template #footer>
             <app-submitbar>
-                <Button type="success" block @click="routerBack({ buyOrSell: BuyOrSell.Buy })">买入</Button>
-                <Button type="danger" block @click="routerBack({ buyOrSell: BuyOrSell.Sell })">卖出</Button>
+                <Button type="success" block @click="routerBack({ buyOrSell: BuyOrSell.Buy })">{{ $t('quote.buy') }}</Button>
+                <Button type="danger" block @click="routerBack({ buyOrSell: BuyOrSell.Sell })">{{ $t('quote.sell') }}</Button>
             </app-submitbar>
         </template>
     </app-view>

+ 1 - 1
src/packages/digital/views/listing/goods/detail/index.vue

@@ -40,7 +40,7 @@
                 <Field :label="t('quote.goods.orderqty')" label-align="top" :rules="formRules.OrderQty">
                     <template #input>
                         <app-stepper v-model="formData.OrderQty" :min="0"
-                            :decimal-length="baseAccount?.currencydecimalplace" />
+                            :decimal-length="baseAccount?.currencydecimalplace" :step="baseAccount?.currencydecimalplace" />
                     </template>
                 </Field>
             </CellGroup>

+ 6 - 4
src/packages/digital/views/spot/components/account/index.vue

@@ -9,17 +9,17 @@
                         <span class="text-small">{{ getDigitalCurrencyName(item.currencyid) }}</span>
                     </th>
                     <td>
-                        <span class="text-small">可用({{ item.currencycode }})</span>
+                        <span class="text-small">{{ t('mine.availableFunds') }}({{ item.currencycode }})</span>
                         <span>{{ spotAccountStore.getAvailableBalance(item) }}</span>
                     </td>
                 </tr>
                 <tr>
                     <td>
-                        <span class="text-small">余额({{ item.currencycode }})</span>
+                        <span class="text-small">{{ t('account.balance') }}({{ item.currencycode }})</span>
                         <span>{{ item.currentbalance }}</span>
                     </td>
                     <td>
-                        <span class="text-small">冻结({{ item.currencycode }})</span>
+                        <span class="text-small">{{ t('account.freeze') }}({{ item.currencycode }})</span>
                         <span>{{ item.freezemargin }}</span>
                     </td>
                 </tr>
@@ -51,9 +51,11 @@ import { Button } from 'vant'
 import { useComponent } from '@/hooks/component'
 import { useNavigation } from '@mobile/router/navigation'
 import { getDigitalCurrencyName } from '@/constants/order'
-import { useFuturesStore } from '@/stores'
+import { i18n, useFuturesStore } from '@/stores'
 import { useSpotAccountStore } from '../../../wallet/components/spot/composables'
 
+const { global: { t } } = i18n
+
 const props = defineProps({
     goodsId: {
         type: Number,

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

@@ -1,6 +1,6 @@
 <template>
     <Dialog v-model:show="showDialog" show-cancel-button :before-close="onBeforeClose" @closed="onClosed"
-        message="是否撤销?">
+        :message="t('order.goodsorder.tips1')">
     </Dialog>
 </template>
 

+ 6 - 6
src/packages/digital/views/spot/components/order/index.vue

@@ -20,30 +20,30 @@
                 <tbody>
                     <tr>
                         <td>
-                            <span class="text-small">委托单号</span>
+                            <span class="text-small">{{ $t('order.goodsorder.orderid') }}</span>
                             <span>{{ item.orderid }}</span>
                         </td>
                         <td>
-                            <span class="text-small">委托状态</span>
+                            <span class="text-small">{{ $t('order.goodsorder.orderstatus') }}</span>
                             <span>{{ getOrderStatusName(item.orderstatus) }}</span>
                         </td>
                     </tr>
                     <tr>
                         <td>
-                            <span class="text-small">委托价格({{ item.quotecurrencycode }})</span>
+                            <span class="text-small">{{ `${t('order.goodsorder.orderprice')}(${item.quotecurrencycode})` }}</span>
                             <span>{{ item.orderprice }}</span>
                         </td>
                         <td>
-                            <span class="text-small">委托数量({{ item.basecurrencycode }})</span>
+                            <span class="text-small">{{ `${t('order.goodsorder.orderqty')}(${item.basecurrencycode})` }}</span>
                             <span>{{ item.ordervolume }}</span>
                         </td>
                     </tr>
-                    <tr>
+                    <!-- <tr>
                         <td colspan="2">
                             <span class="text-small">委托金额({{ item.quotecurrencycode }})</span>
                             <span>{{ item.ordervalue }}</span>
                         </td>
-                    </tr>
+                    </tr> -->
                 </tbody>
                 <tfoot>
                     <tr>

+ 7 - 7
src/packages/digital/views/spot/goods/chart/index.vue

@@ -1,7 +1,7 @@
 <template>
     <app-view class="spot-goods-chart" background="primary">
         <template #header>
-            <app-navbar :title="quote ? quote.goodscode : '图表'" />
+            <app-navbar :title="quote ? quote.goodscode : `${t('operation.chart')}`" />
         </template>
         <template v-if="quote">
             <div class="quote-table">
@@ -18,13 +18,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>
@@ -32,13 +32,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>
@@ -51,8 +51,8 @@
         </template>
         <template #footer>
             <app-submitbar>
-                <Button type="success" block @click="routerBack({ buyOrSell: BuyOrSell.Buy })">买入</Button>
-                <Button type="danger" block @click="routerBack({ buyOrSell: BuyOrSell.Sell })">卖出</Button>
+                <Button type="success" block @click="routerBack({ buyOrSell: BuyOrSell.Buy })">{{ $t('quote.buy') }}</Button>
+                <Button type="danger" block @click="routerBack({ buyOrSell: BuyOrSell.Sell })">{{ $t('quote.sell') }}</Button>
             </app-submitbar>
         </template>
     </app-view>