Handy_Cao 2 周之前
父節點
當前提交
877728cfbe

+ 25 - 2
public/locales/en-US.json

@@ -1864,7 +1864,30 @@
         "available": "Avaiable",
         "tips1": "Please select the currency",
         "tips2" : "Please enter the quantity",
-        "transfer1": "Contracts To Spots" ,
-        "transfer2": "Spots To Contracts" 
+        "transfer1": "Contracts To Spots",
+        "transfer2": "Spots To Contracts",
+        "network": "Network",
+        "tips3": "Please select the network",
+        "tips4": "Please select the currency",
+        "tips5": "Please enter the address",
+        "tips6": "Please enter the qty",
+        "tips7": "Withdraw Success",
+        "newaddress": "Create a new address",
+        "tips8": "Select a deposit network",
+        "depositnetwork": "Deposit Network",
+        "depositaddres": "Deposit Address",
+        "tips9": "Are you sure to create a new address?",
+        "tips10": "Create Success",
+        "tips11": "*Only ",
+        "tips12": "save the address",
+        "close": "Close By Single Orders",
+        "pricemode1": "PriceMode",
+        "close2": "Close By Sum Orders",
+        "tips13": "Are you sure to submit?",
+        "tips14": "Please enter the stop-loss price",
+        "tips15": "The price is not within the valid range",
+        "tips16": "Please enter the take-profit price",
+        "tpprice": "TP-Price",
+        "slprice": "SL-Price"
     }
 }

+ 25 - 2
public/locales/th-TH.json

@@ -1867,7 +1867,30 @@
         "available": "Avaiable",
         "tips1": "请选择币种",
         "tips2" : "请输入数量",
-        "transfer1": "从 合约 到 现货" ,
-        "transfer2": "从 现货 到 合约" 
+        "transfer1": "从 合约 到 现货",
+        "transfer2": "从 现货 到 合约",
+        "network": "Network",
+        "tips3": "Please select the network",
+        "tips4": "Please select the currency",
+        "tips5": "Please enter the address",
+        "tips6": "Please enter the qty",
+        "tips7": "Withdraw Success",
+        "newaddress": "Create a new address",
+        "tips8": "Select a deposit network",
+        "depositnetwork": "Deposit Network",
+        "depositaddres": "Deposit Address",
+        "tips9": "Are you sure to create a new address?",
+        "tips10": "Create Success",
+        "tips11": "*Only ",
+        "tips12": "save the address",
+        "close": "Close By Single Orders",
+        "pricemode1": "PriceMode",
+        "close2": "Close By Sum Orders",
+        "tips13": "Are you sure to submit?",
+        "tips14": "Please enter the stop-loss price",
+        "tips15": "The price is not within the valid range",
+        "tips16": "Please enter the take-profit price",
+        "tpprice": "TP-Price",
+        "slprice": "SL-Price"
     }
 }

+ 25 - 2
public/locales/vi-VN.json

@@ -1864,7 +1864,30 @@
         "available": "Avaiable",
         "tips1": "请选择币种",
         "tips2" : "请输入数量",
-        "transfer1": "从 合约 到 现货" ,
-        "transfer2": "从 现货 到 合约" 
+        "transfer1": "从 合约 到 现货",
+        "transfer2": "从 现货 到 合约",
+        "network": "Network",
+        "tips3": "Please select the network",
+        "tips4": "Please select the currency",
+        "tips5": "Please enter the address",
+        "tips6": "Please enter the qty",
+        "tips7": "Withdraw Success",
+        "newaddress": "Create a new address",
+        "tips8": "Select a deposit network",
+        "depositnetwork": "Deposit Network",
+        "depositaddres": "Deposit Address",
+        "tips9": "Are you sure to create a new address?",
+        "tips10": "Create Success",
+        "tips11": "*Only ",
+        "tips12": "save the address",
+        "close": "Close By Single Orders",
+        "pricemode1": "PriceMode",
+        "close2": "Close By Sum Orders",
+        "tips13": "Are you sure to submit?",
+        "tips14": "Please enter the stop-loss price",
+        "tips15": "The price is not within the valid range",
+        "tips16": "Please enter the take-profit price",
+        "tpprice": "TP-Price",
+        "slprice": "SL-Price"
     }
 }

+ 25 - 2
public/locales/zh-CN.json

@@ -1867,7 +1867,30 @@
         "available": "可用",
         "tips1": "请选择币种",
         "tips2" : "请输入数量",
-        "transfer1": "从 合约 到 现货" ,
-        "transfer2": "從 現貨 到 合約" 
+        "transfer1": "从 合约 到 现货",
+        "transfer2": "從 現貨 到 合約",
+        "network": "网络",
+        "tips3": "请选择网络",
+        "tips4": "请选择币种",
+        "tips5": "请输入地址",
+        "tips6": "请输入数量",
+        "tips7": "提现成功",
+        "newaddress": "创建新地址",
+        "tips8": "选择存款网络",
+        "depositnetwork": "存款网络",
+        "depositaddres": "存款地址",
+        "tips9": "确认创建新地址吗?",
+        "tips10": "创建成功",
+        "tips11": "*仅将 ",
+        "tips12": "存入此地址",
+        "close": "按单平仓",
+        "pricemode1": "价格方式",
+        "close2": "汇总平仓",
+        "tips13": "确认提交吗?",
+        "tips14": "请输入止损价格",
+        "tips15": "价格不在有效范围内",
+        "tips16": "请输入止盈价格",
+        "tpprice": "止盈价格",
+        "slprice": "止损价格"
     }
 }

+ 25 - 3
public/locales/zh-TW.json

@@ -1867,8 +1867,30 @@
         "available": "可用",
         "tips1": "请选择币种",
         "tips2" : "请输入数量",
-        "transfer1": "從 合約 到 現貨" ,
-        "transfer2": "Spots To Contracts" 
-
+        "transfer1": "從 合約 到 現貨",
+        "transfer2": "現貨 到 合約",
+        "network": "網絡",
+        "tips3": "請選擇網絡",
+        "tips4": "請選擇幣種",
+        "tips5": "請輸入地址",
+        "tips6": "請輸入數量",
+        "tips7": "提現成功",
+        "newaddress": "創建新地址",
+        "tips8": "選擇存款網絡",
+        "depositnetwork": "存款網絡",
+        "depositaddres": "存款地址",
+        "tips9": "確認創建新地址嗎?",
+        "tips10": "創建成功",
+        "tips11": "*僅將 ",
+        "tips12": "存入此地址",
+        "close": "按單平倉",
+        "pricemode1": "價格方式",
+        "close2": "彙總平倉",
+        "tips13": "確認提交嗎?",
+        "tips14": "請輸入止損價格",
+        "tips15": "價格不在有效範圍內",
+        "tips16": "請輸入止盈價格",
+        "tpprice": "止盈價格",
+        "slprice": "止損價格"
     }
 }

+ 1 - 1
src/packages/digital/views/contract/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>
 

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

@@ -5,7 +5,7 @@
             <tbody>
                 <tr>
                     <th>
-                        <span>{{ item.goodscode }}/{{ item.goodsname }}</span>
+                        <span>{{ item.goodscode }}/{{ goodsname(item.goodscode) }}</span>
                         <time class="text-small">{{ formatDate(item.ordertime) }}</time>
                     </th>
                     <th>
@@ -60,6 +60,10 @@ const futuresStore = useFuturesStore()
 const pullRefreshRef = shallowRef()
 const dataList = shallowRef<Model.HisTradeOrderDetailRsp[]>([])
 
+const goodsname = (code: string) => {
+    return futuresStore.getI18nGoodsName(code)
+}
+
 const { loading, pageIndex, pageCount, run } = useRequest(queryHisTradeOrderDetail, {
     manual: true,
     defaultParams: {

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

@@ -5,7 +5,7 @@
             <tbody>
                 <tr>
                     <th>
-                        <span>{{ item.goodscode }}/{{ item.goodsname }}</span>
+                        <span>{{ item.goodscode }}/{{ goodsname(item.goodscode) }}</span>
                         <time class="text-small">{{ formatDate(item.ordertime) }}</time>
                     </th>
                     <th>
@@ -81,6 +81,11 @@ const pullRefreshRef = shallowRef()
 const dataList = shallowRef<Model.TradeOrderDetailRsp[]>([])
 const selectedRow = shallowRef<Model.TradeOrderDetailRsp>()
 
+const goodsname = (code: string) => {
+    return futuresStore.getI18nGoodsName(code)
+}
+
+
 const { loading, pageIndex, pageCount, run } = useRequest(queryTradeOrderDetail, {
     manual: true,
     defaultParams: {

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

@@ -3,12 +3,12 @@
     <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('digital.close')" @back="closed" />
             </template>
             <Form ref="formRef" class="g-form__container" @submit="onCloseSumit">
-                <CellGroup title="持仓信息" inset>
+                <CellGroup :title="t('position.goods.subtitle')" inset>
                     <Cell :title="t('digital.tradeid')" :value="selectedRow.tradeid" />
-                    <Cell :title="t('digital.goodscode')" :value="`${selectedRow.goodscode}/${selectedRow.goodsname}`" />
+                    <Cell :title="t('digital.goodscode')" :value="`${selectedRow.goodscode}/${goodsname}`" />
                     <Cell :title="t('position.transfer.buyorsell')" :value="getBuyOrSellName(selectedRow.buyorsell, 1)" />
                     <Cell :title="`${t('position.goods.holddetail.holderprice')}(${selectedRow.currencyname})`"
                         :value="selectedRow.holderprice.toFixed(selectedRow.decimalplace)" />
@@ -28,7 +28,7 @@
                             </span>
                         </template>
                     </Cell>
-                    <Field label="平仓类型" is-link>
+                    <Field :label="t('digital.pricemode1')" is-link>
                         <template #input>
                             <app-select v-model="formData.PriceMode" :options="getPricemode2List()" />
                         </template>
@@ -82,6 +82,13 @@ const futuresStore = useFuturesStore()
 const positionStore = usePositionStore()
 const quote = computed(() => futuresStore.getQuoteItem({ goodsid: props.selectedRow.goodsid }))
 const { global: { t } } = i18n
+const goodsname = computed(() => futuresStore.getI18nGoodsName(props.selectedRow.goodscode))
+
+const formRef = shallowRef<FormInstance>()
+const showModal = shallowRef(true)
+// 是否刷新父组件数据
+const refresh = shallowRef(false)
+const { formSubmit, formData } = useOrder()
 
 // 可用数量
 const maxQty = computed(() => {
@@ -97,11 +104,7 @@ const floatingPL = computed(() => {
     return futuresStore.calcFloatingPL(quote.value, buyorsell, holderqty, holderamount)
 })
 
-const formRef = shallowRef<FormInstance>()
-const showModal = shallowRef(true)
-// 是否刷新父组件数据
-const refresh = shallowRef(false)
-const { formSubmit, formData } = useOrder()
+
 
 // 表单验证规则
 const formRules: { [key: string]: FieldRule[] } = {

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

@@ -4,7 +4,7 @@
             <thead>
                 <tr>
                     <td>
-                        {{ item.goodscode }}/{{ item.goodsname }}
+                        {{ item.goodscode }}/{{ goodsname(item.goodscode) }}
                     </td>
                     <td :class="item.buyorsell === 0 ? 'g-price-up' : 'g-price-down'">
                         {{ getBuyOrSellName(item.buyorsell, 1) }}
@@ -35,15 +35,15 @@
                     <td>{{ item.holderprice }}</td>
                 </tr>
                 <tr v-if="item.tpsl_tpflag">
-                    <td class="text-small">{{ `止盈价格(${currency(item.currencyid)})` }}</td>
+                    <td class="text-small">{{ `${t('digital.tpprice')}(${currency(item.currencyid)})` }}</td>
                     <td>{{ formatDecimal(item.tpsl_tpprice, item.decimalplace) }}</td>
                 </tr>
                 <tr v-if="item.tpsl_slflag">
-                    <td class="text-small">{{ `止损价格(${currency(item.currencyid)})` }}</td>
+                    <td class="text-small">{{ `${t('digital.slprice')}(${currency(item.currencyid)})` }}</td>
                     <td>{{ formatDecimal(item.tpsl_slprice, item.decimalplace) }}</td>
                 </tr>
                 <tr>
-                    <td class="text-small">交易时间</td>
+                    <td class="text-small">{{ $t('position.goods.tradetime') }}</td>
                     <td>{{ formatDate(item.tradetime) }}</td>
                 </tr>
             </tbody>
@@ -100,6 +100,10 @@ const showModal = shallowRef(true) // 是否刷新父组件数据
 const refresh = shallowRef(false)
 const rowIndex = shallowRef(-1)
 
+const goodsname = (code: string) => {
+    return futuresStore.getI18nGoodsName(code)
+}
+
 const currency = (id: number) => {
     return getGoodsCurrencyItemName(id)
 }

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

@@ -3,12 +3,12 @@
     <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('digital.spsl')" @back="closed" />
             </template>
             <Form ref="formRef" class="g-form__container" @submit="onCloseSumit">
                 <CellGroup :title="t('position.goods.subtitle')" inset>
                     <Cell :title="t('digital.goodscode')"
-                        :value="`${selectedRow.goodscode}/${selectedRow.goodsname}`" />
+                        :value="`${selectedRow.goodscode}/${goodsname}`" />
                     <Cell :title="t('position.transfer.buyorsell')"
                         :value="getBuyOrSellName(selectedRow.buyorsell, 1)" />
                     <Cell
@@ -119,6 +119,8 @@ const formData = reactive<Partial<Proto.HolderTPSLSetReq>>({
 
 const quote = computed(() => futuresStore.getQuoteItem({ goodsid: props.selectedRow.goodsid }))
 
+const goodsname = computed (() => futuresStore.getI18nGoodsName(props.selectedRow.goodscode))
+
 const pricePoints = computed(() => {
     const { decimalplace = 0, buyslpoint, buytppoint, sellslpoint, selltppoint } = quote.value ?? {}
     const { lastPrice, buyorsell } = props.selectedRow
@@ -157,25 +159,25 @@ const pricePoints = computed(() => {
 // 表单验证规则
 const formRules: { [key: string]: FieldRule[] } = {
     TPPrice: [{
-        message: '请输入止盈价格',
+        message: t('digital.tips16'),
         validator: () => {
             if (formData.TPFlag) {
                 const { takeProfit } = pricePoints.value
                 const value = Decimal(formData.TPPrice ?? 0)
                 const isInvalid = props.selectedRow.buyorsell === BuyOrSell.Buy ? value.lt(takeProfit) : value.gt(takeProfit)
-                return isInvalid ? '价格不在有效范围内' : true
+                return isInvalid ? t('digital.tips15') : true
             }
             return true
         }
     }],
     SLPrice: [{
-        message: '请输入止损价格',
+        message: t('digital.tips14'),
         validator: () => {
             if (formData.SLFlag) {
                 const { stopLoss } = pricePoints.value
                 const value = Decimal(formData.SLPrice ?? 0)
                 const isInvalid = props.selectedRow.buyorsell === BuyOrSell.Buy ? value.gt(stopLoss) : value.lt(stopLoss)
-                return isInvalid ? '价格不在有效范围内' : true
+                return isInvalid ? t('digital.tips15') : true
             }
             return true
         }
@@ -184,7 +186,7 @@ const formRules: { [key: string]: FieldRule[] } = {
 
 const onCloseSumit = () => {
     dialog({
-        message: '确认提交吗?',
+        message: t('digital.tips13'),
         showCancelButton: true,
     }).then(() => {
         fullloading((hideLoading) => {

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

@@ -5,7 +5,7 @@
             <thead>
                 <tr>
                     <th>
-                        <span>{{ item.goodscode }}/{{ item.goodsname }}</span>
+                        <span>{{ item.goodscode }}/{{ goodsname(item.goodscode) }}</span>
                         <time>{{ formatDate(item.tradetime) }}</time>
                     </th>
                     <th>
@@ -66,6 +66,10 @@ const futuresStore = useFuturesStore()
 const pullRefreshRef = shallowRef()
 const dataList = shallowRef<Model.TradeHolderDetailExRsp[]>([])
 
+const goodsname = (code: string) => {
+    return futuresStore.getI18nGoodsName(code)
+}
+
 const currency = (id: number) => {
     const { currencyid = 0 } = futuresStore.getGoods(id) ?? {}
     return getGoodsCurrencyItemName(currencyid)

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

@@ -3,11 +3,11 @@
     <app-modal direction="right-top" height="100%" width="100%" v-model:show="showModal">
         <app-view class="g-form">
             <template #header>
-                <app-navbar title="汇总平仓" @back="closed" />
+                <app-navbar :title="t('digital.close2')" @back="closed" />
             </template>
             <Form ref="formRef" class="g-form__container" @submit="onCloseSumit">
                 <CellGroup :title="t('position.goods.subtitle')" inset>
-                    <Cell :title="t('digital.goodscode')" :value="`${selectedRow.goodscode}/${selectedRow.goodsname}`" />
+                    <Cell :title="t('digital.goodscode')" :value="`${selectedRow.goodscode}/${goodsname}`" />
                     <Cell :title="t('position.transfer.buyorsell')" :value="getBuyOrSellName(selectedRow.buyorsell, 1)" />
                     <Cell :title="`${t('position.goods.holddetail.holderprice')}(${currency(selectedRow.currencyid)})`"
                         :value="selectedRow.averageprice" />
@@ -89,6 +89,8 @@ const formRef = shallowRef<FormInstance>()
 const showModal = shallowRef(true)
 const { formSubmit, formData } = useOrder()
 
+const goodsname = computed(() => futuresStore.getI18nGoodsName(props.selectedRow.goodscode))
+
 const currency = (id: number) => {
     return getGoodsCurrencyItemName(id)
 }

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

@@ -5,7 +5,7 @@
             <tbody @click="showComponent('Detail', index)">
                 <tr>
                     <th colspan="2">
-                        <span>{{ item.goodscode }}/{{ item.goodsname }}</span>
+                        <span>{{ item.goodscode }}/{{ goodsname(item.goodscode) }}</span>
                     </th>
                     <th>
                         <Icon name="arrow" />
@@ -79,7 +79,7 @@ import { PropType, shallowRef, defineAsyncComponent, computed } from 'vue'
 import { Button, Icon } from 'vant'
 import { useComponent } from '@/hooks/component'
 import { getBuyOrSellName, getGoodsCurrencyItemName } from '@/constants/order'
-import { usePositionStore } from '@/stores'
+import { useFuturesStore, usePositionStore } from '@/stores'
 import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
 
 const props = defineProps({
@@ -98,6 +98,7 @@ const componentMap = new Map<string, unknown>([
 const { componentRef, componentId, openComponent, closeComponent } = useComponent(() => onRefresh())
 
 const positionStore = usePositionStore()
+const futuresStore = useFuturesStore()
 const pullRefreshRef = shallowRef()
 const rowIndex = shallowRef(-1)
 
@@ -107,6 +108,10 @@ const enumName = (id: number) => {
     return getGoodsCurrencyItemName(id)
 }
 
+const goodsname = (code: string) => {
+    return futuresStore.getI18nGoodsName(code)
+}
+
 const showComponent = (componentName: string, index: number) => {
     rowIndex.value = index
     openComponent(componentName)

+ 5 - 1
src/packages/digital/views/contract/detail/index.vue

@@ -69,7 +69,7 @@
         <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 clickable
+                    <Cell :title="goodsname(item.goodscode)" :value="item.goodscode" :border="false" is-link clickable
                         @click="navigateToContractDetail(item.goodsid)" />
                 </template>
             </CellGroup>
@@ -103,6 +103,10 @@ const currency = (id: number) => {
     return getGoodsCurrencyItemName(id)
 }
 
+const goodsname = (code: string) => {
+    return futuresStore.getI18nGoodsName(code)
+} 
+
 // 合约账户
 const accountItem = computed(() => accountStore.getAccountItem({ accountid }))
 

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

@@ -2,7 +2,7 @@
 <template>
     <app-view class="contract-goods-chart g-layout">
         <template #header>
-            <app-navbar :title="quote ? `${quote.goodscode}/${quote.goodsname}` : '图表'" />
+            <app-navbar :title="quote ? `${quote.goodscode}/${goodsname}` : `${t('operation.chart')}`" />
         </template>
         <template v-if="quote">
             <div class="quote-table">
@@ -78,6 +78,9 @@ const goodsid = getQueryStringToNumber('id')
 const futuresStore = useFuturesStore()
 
 const quote = computed(() => futuresStore.getQuoteItem({ goodsid }))
+
+const goodsname = computed(() => futuresStore.getI18nGoodsName(quote.value?.goodscode ?? ''))
+
 </script>
 
 <style lang="less">

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

@@ -1,7 +1,7 @@
 <template>
     <app-view class="contract-goods-detail g-layout g-form" v-model:show="showModal">
         <template #header>
-            <app-navbar :title="quote ? `${quote.goodscode}/${quote.goodsname}` : '交易'">
+            <app-navbar :title="quote ? `${quote.goodscode}/${goodsname}` : `${t('digital.spot-goods-detail')}`">
                 <template #footer>
                     <Cell>
                         <template #title v-if="quote">
@@ -113,6 +113,8 @@ const { formData, formSubmit } = useOrder()
 
 const quote = computed(() => futuresStore.getQuoteItem({ goodsid: goodsId }))
 
+const goodsname = computed(() => futuresStore.getI18nGoodsName(quote.value?.goodscode ?? ''))
+
 const options = computed(() => {
     return [{
         label: t('digital.marketprice'), value: PriceMode.Market

+ 5 - 1
src/packages/digital/views/contract/goods/list/index.vue

@@ -38,7 +38,7 @@
                                                     <b>{{ item.goodscode }}</b>
                                                 </span>
                                                 <span class="text-small">
-                                                    {{ item.goodsname }}
+                                                    {{ goodsname(item.goodscode) }}
                                                 </span>
                                             </div>
                                         </div>
@@ -96,6 +96,10 @@ const futuresStore = useFuturesStore()
 const currentGroupId = shallowRef(0)
 const { global: { t } } = i18n
 
+const goodsname = (code: string) => {
+    return futuresStore.getI18nGoodsName(code)
+}
+
 const goodsGroups = userStore.userData.goodsgroups.filter((e) => e.marketid === 10101)
 
 const goodsList = computed(() => futuresStore.quotationList.filter((e) => e.goodsgroupid === currentGroupId.value))

+ 18 - 16
src/packages/digital/views/wallet/deposit/index.vue

@@ -2,25 +2,25 @@
 <template>
     <app-view class="wallet-deposit g-layout g-form">
         <template #header>
-            <app-navbar title="充值" />
+            <app-navbar :title="t('digital.wallet-deposit')" />
         </template>
         <Form ref="formRef" class="g-form__container g-layout-block" @submit="onSubmit">
             <CellGroup inset>
-                <app-field-currency name="currency" label="币种" label-align="top" :rules="formRules.currency"
+                <app-field-currency name="currency" :label="t('banksign.currency')" label-align="top" :rules="formRules.currency"
                     v-model="state.currencyId" @change="onCurrencyChange" />
             </CellGroup>
             <CellGroup inset>
-                <app-field-token name="token" label="存款网络" label-align="top" :rules="formRules.token"
+                <app-field-token name="token" :label="t('digital.depositnetwork')" label-align="top" :rules="formRules.token"
                     v-model="state.tokenId" :currency="state.currencyName" @change="onTokenChange" />
             </CellGroup>
         </Form>
         <CellGroup inset v-if="tokenItem">
-            <Cell title="余额" :value="balance" />
+            <Cell :title="t('account.balance')" :value="balance" />
             <div class="wallet-deposit__address">
                 <dl class="g-layout-block g-layout-block--inset">
                     <dt>
-                        <h3>存款地址</h3>
-                        <span>*仅将 {{ state.currencyName }} 存入此地址</span>
+                        <h3>{{ t('digital.depositaddres') }}</h3>
+                        <span>{{ `${t('digital.tips11')}` }} {{ currentyItem?.label }} {{ `${t('digital.tips12')}` }}</span>
                     </dt>
                     <dd v-for="(item, index) in addressList" :key="index">
                         <span>{{ item.address }}</span>
@@ -29,11 +29,11 @@
                     </dd>
                 </dl>
                 <div class="g-layout-block g-layout-block--inset">
-                    <Button type="primary" size="small" block @click="formRef?.submit">创建新地址</Button>
+                    <Button type="primary" size="small" block @click="formRef?.submit">{{ $t('digital.newaddress') }}</Button>
                 </div>
             </div>
         </CellGroup>
-        <Dialog v-model:show="state.showDialog" :show-confirm-button="false" cancel-button-text="关闭" show-cancel-button
+        <Dialog v-model:show="state.showDialog" :show-confirm-button="false" :cancel-button-text="t('operation.close1')" show-cancel-button
             destroy-on-close>
             <div class="wallet-deposit__qrcode">
                 <app-qrcode :text="state.qrContent" :width="240" />
@@ -51,6 +51,7 @@ import { useRequest } from '@/hooks/request'
 import { queryWalletAddress, createDigitalWalletAddress } from '@/services/api/digital'
 import { useNavigation } from '@mobile/router/navigation'
 import { useSpotAccountStore } from '../components/spot/composables'
+import { i18n } from '@/stores'
 import AppQrcode from '@/components/base/qrcode/index.vue'
 import AppFieldCurrency from '@/packages/digital/components/field-currency/index.vue'
 import AppFieldToken from '@/packages/digital/components/field-token/index.vue'
@@ -60,6 +61,7 @@ const { getQueryStringToNumber } = useNavigation()
 const spotAccountStore = useSpotAccountStore()
 const formRef = shallowRef<FormInstance>()
 const currencyId = getQueryStringToNumber('id')
+const { global: { t } } = i18n
 
 const state = reactive({
     showSheet: false,
@@ -86,12 +88,12 @@ const balance = computed(() => {
 
 // 表单验证规则
 const formRules: { [key: string]: FieldRule[] } = {
-    currency: [{
-        message: '请选择币种',
-        validator: () => !!state.currencyId
+    currenty: [{
+        message: t('digital.tips4'),
+        validator: () => !!state.currentyId
     }],
     token: [{
-        message: '请选择网络',
+        message: t('digital.tips3'),
         validator: () => !!state.tokenId
     }],
 }
@@ -114,15 +116,15 @@ const openQRcode = (address: string) => {
 
 const onCopy = (status: boolean) => {
     if (status) {
-        showSuccessToast({ message: '已复制,快去粘贴吧~' })
+        showSuccessToast({ message: t('banksign.wallet.deposit.paste') })
     } else {
-        showFailToast('复制失败')
+        showFailToast(t('banksign.wallet.deposit.pastefailure'))
     }
 }
 
 const onSubmit = () => {
     dialog({
-        message: '确认创建新地址吗?',
+        message: t('digital.tips9'),
         showCancelButton: true,
     }).then(() => {
         const { channel_code, chain_id } = tokenItem.value ?? {}
@@ -135,7 +137,7 @@ const onSubmit = () => {
                     AddrType: 1
                 }
             }).then(() => {
-                hideLoading('创建成功', 'success')
+                hideLoading(t('digital.tips10'), 'success')
                 getWalletAddress()
             }).catch((err) => {
                 hideLoading(err, 'fail')

+ 13 - 11
src/packages/digital/views/wallet/withdraw/index.vue

@@ -2,23 +2,23 @@
 <template>
     <app-view class="wallet-withdraw g-layout g-form">
         <template #header>
-            <app-navbar title="提现" />
+            <app-navbar :title="t('digital.wallet-withdraw')" />
         </template>
         <Form ref="formRef" class="g-form__container g-layout-block" @submit="onSubmit">
             <CellGroup inset>
-                <app-field-currency name="currency" label="币种" label-align="top" :rules="formRules.currency"
+                <app-field-currency name="currency" :label="t('banksign.currency')" label-align="top" :rules="formRules.currency"
                     v-model="formData.CurrencyID" @change="onCurrencyChange" />
             </CellGroup>
             <CellGroup inset>
-                <app-field-token name="token" label="网络" label-align="top" :rules="formRules.token"
+                <app-field-token name="token" :label="t('digital.network')" label-align="top" :rules="formRules.token"
                     v-model="state.tokenId" :currency="state.currencyName" @change="onTokenChange" />
             </CellGroup>
             <CellGroup inset>
-                <Field name="Address" v-model="formData.Address" label="地址" label-align="top" placeholder="请输入"
+                <Field name="Address" v-model="formData.Address" :label="t('quote.pricing.address')" label-align="top" :placeholder="t('common.pleaseenter')"
                     :rules="formRules.Address" />
             </CellGroup>
             <CellGroup inset>
-                <Cell title="数量" :value="`可用 (${formatDecimal(balance, accountItem?.currencydecimalplace)})`" />
+                <Cell :title="t('tss.qty')" :value="`${t('digital.available')} (${formatDecimal(balance, accountItem?.currencydecimalplace)})`" />
                 <Field name="Amount" label-align="top" :rules="formRules.Amount">
                     <template #input>
                         <app-stepper v-model="formData.Amount" :min="0" :max="balance" />
@@ -27,7 +27,7 @@
             </CellGroup>
         </Form>
         <div class="g-form__footer inset">
-            <Button type="primary" block @click="formRef?.submit">提现</Button>
+            <Button type="primary" block @click="formRef?.submit">{{ $t('digital.wallet-withdraw') }}</Button>
         </div>
     </app-view>
 </template>
@@ -43,12 +43,14 @@ import { useSpotAccountStore } from '../components/spot/composables'
 import AppStepper from '@mobile/components/base/stepper/index.vue'
 import AppFieldCurrency from '@/packages/digital/components/field-currency/index.vue'
 import AppFieldToken from '@/packages/digital/components/field-token/index.vue'
+import { i18n } from '@/stores'
 
 const { getQueryStringToNumber } = useNavigation()
 
 const spotAccountStore = useSpotAccountStore()
 const formRef = shallowRef<FormInstance>()
 const currencyId = getQueryStringToNumber('id')
+const { global: { t } } = i18n
 
 const state = reactive({
     showSheet: false,
@@ -72,19 +74,19 @@ const balance = computed(() => spotAccountStore.getAvailableBalance(accountItem.
 // 表单验证规则
 const formRules: { [key: string]: FieldRule[] } = {
     currency: [{
-        message: '请选择币种',
+        message: t('digital.tips4'),
         validator: () => !!formData.CurrencyID
     }],
     token: [{
-        message: '请选择网络',
+        message: t('digital.tips3'),
         validator: () => !!state.tokenId
     }],
     Address: [{
         required: true,
-        message: '请输入地址'
+        message: t('digital.tips5')
     }],
     Amount: [{
-        message: '请输入数量',
+        message: t('digital.tips6'),
         validator: () => !!formData.Amount
     }],
 }
@@ -112,7 +114,7 @@ const onSubmit = () => {
                 })
             }
         }).then(() => {
-            hideLoading('提现成功', 'success')
+            hideLoading(t('digital.tips7'), 'success')
         }).catch((err) => {
             hideLoading(err, 'fail')
         })

+ 20 - 1
src/stores/modules/futures.ts

@@ -13,6 +13,7 @@ import { useAccountStore } from './account'
 import CryptoJS from 'crypto-js'
 import eventBus from '@/services/bus'
 import moment from 'moment'
+import { i18n } from './language'
 
 /**
  * 期货存储对象
@@ -235,6 +236,23 @@ export const useFuturesStore = defineStore(() => {
         return goods
     }
 
+    // 获取商品国际化名称
+    const getI18nGoodsName = (code: string | number) => {
+        const item = getGoods(code)
+         switch (i18n.global.locale) {
+            case 'zh-CN':
+                return item?.goodsname ?? ''
+            case 'en-US':
+                return item?.goodsnameen ?? ''
+            case 'zh-TW':
+                return item?.goodsnametw ?? ''
+            case 'vi':
+                return item?.goodsnamevi ?? ''
+            default:
+                return item?.goodsnameth ?? ''
+        }
+    }
+
     // 获取商品市场ID
     const getGoodsMarket = (code: string | number) => {
         const quote = state.goodsList.find((e) => e.goodscode === code || e.goodsid === code)
@@ -623,6 +641,7 @@ export const useFuturesStore = defineStore(() => {
         goodsdisplay,
         getQuoteItem,
         getFeeValue,
-        calcFloatingPL
+        calcFloatingPL,
+        getI18nGoodsName
     }
 })