From d8f6c671a613b841566c8d7b1f36eb2bb9640ea9 Mon Sep 17 00:00:00 2001
From: DESKTOP-CVS3R96\我恁爹 <11>
Date: Tue, 15 Nov 2022 04:15:27 +0800
Subject: [PATCH] 多于元
---
src/page/trading/buy.vue | 55 +++++++++++++++++++++++++++++++------------------------
1 files changed, 31 insertions(+), 24 deletions(-)
diff --git a/src/page/trading/buy.vue b/src/page/trading/buy.vue
index 546dd79..5b408fe 100644
--- a/src/page/trading/buy.vue
+++ b/src/page/trading/buy.vue
@@ -22,17 +22,17 @@
<span>{{ nowPrice }}</span>
</div>
<div class="bottom_es">
- <span>{{ '买入价' }}</span>
+ <span>{{ $t('hj98') }}</span>
</div>
</div>
<div class="rights">
<div class="ese">
<div class="mc" @click="handleTradingClick(0)" :class="tabsCurrentIndex === 0 ? 'actives' : ''">
- <span>卖出</span>
+ <span>{{ $t('hj84') }}</span>
</div>
<div class="mr" @click="handleTradingClick(1)" :class="tabsCurrentIndex === 1 ? 'active' : ''">
- <span>买入</span>
+ <span>{{ $t('hj85') }}</span>
</div>
</div>
</div>
@@ -50,7 +50,7 @@
</div>
<div class="tabs_content">
<div class="num" v-show="priceTabsCurrentIndex == 1">
- <span>{{ '当价格满足条件时买入' }}</span>
+ <span>{{ $t('hj99') }}</span>
</div>
<div class="tr_es flexJy" v-show="priceTabsCurrentIndex == 1">
<div class="top_input">
@@ -70,7 +70,7 @@
</div>
</div>
<div class="num">
- <span>{{ '交易数量(手)' }}</span>
+ <span>{{ $t('hj100') }}</span>
</div>
<div class="tr_es flexJy">
<div class="top_input">
@@ -89,7 +89,7 @@
</div>
<div class="tr_rs gg" @click="showGg = true">
<div class="top_bzz">
- <span>{{ '杠杆' }}</span>
+ <span>{{ $t('hj101') }}</span>
<span>{{ selectCycle + 'X' }}</span>
</div>
<!-- <div class="bottom_bzz">
@@ -99,8 +99,10 @@
</div>
<div class="tr_rs">
<div class="top_bzz">
- <span>{{ if_us == 1 ? '需付保证金($)' : if_us == '2' ? '需付保证金(HK$)' : '需付保证金(¥)' }}</span>
- <span>{{ if_us == 1 ? '可用余额($)' : if_us == '2' ? '可用余额(HK$)' : '可用余额(¥)' }}</span>
+ <span>{{ if_us == 1 ? $t('hj102') + '($)' : if_us == '2' ? $t('hj102') + '(HK$)' : $t('hj102') + '(¥)'
+ }}</span>
+ <span>{{ if_us == 1 ? $t('hj103') + '($)' : if_us == '2' ? $t('hj103') + '(HK$)' : $t('hj103') + '(¥)'
+ }}</span>
</div>
<div class="bottom_bzz">
<!-- <span>{{ (nowPrice/ selectCycle).toFixed(2) }}</span> -->
@@ -124,7 +126,7 @@
<div class="switchs">
<div class="zy">
<div class="left_zy">
- <span>止盈</span>
+ <span>{{ $t('hj104') }}</span>
</div>
<div class="right_sw">
<van-switch v-model="checkedZy" />
@@ -147,7 +149,7 @@
</div>
<div class="zy">
<div class="left_zy">
- <span>止损</span>
+ <span>{{ $t('hj105') }}</span>
</div>
<div class="right_sw">
<van-switch v-model="checkedZs" />
@@ -178,11 +180,11 @@
</div>
<div class="btn_buy" @click="gdOrSetBuy()">
<div :class="tabsCurrentIndex == 0 ? 'maichu' : ''">
- <span>{{ tabsCurrentIndex == 0 ? '卖出' : '买入' }}</span>
+ <span>{{ tabsCurrentIndex == 0 ? $t('hj84') : $t('hj85') }}</span>
</div>
</div>
</div>
- <van-action-sheet v-model="showGg" :actions="siteLeverList" cancel-text="取消" description="选择杠杆"
+ <van-action-sheet v-model="showGg" :actions="siteLeverList" :cancel-text="$t('hj106')" :description="$t('hj107')"
close-on-click-action @select="onSelect" />
</div>
</template>
@@ -220,9 +222,9 @@
},
data() {
return {
- tradingArr: ['卖出', '买入'],
+ tradingArr: [this.$t('hj84'), this.$t('hj85')],
tabsCurrentIndex: 0,
- priceTabs: ['市单价', '挂单'],
+ priceTabs: [this.$t('hj108'), this.$t('hj109')],
priceTabsCurrentIndex: 0,
num: 1,
nums: 1,
@@ -242,21 +244,21 @@
profitTarget: 0,
if_us: 0,
actions: [
- { name: '100X', subname: '需付保证金:' },
- { name: '200X', subname: '需付保证金:' },
- { name: '300X', subname: '需付保证金:' },
+ { name: '100X', subname: this.$t('hj102') },
+ { name: '200X', subname: this.$t('hj102') },
+ { name: '300X', subname: this.$t('hj102') },
],
profitArr: [
{
- name: '止盈',
+ name: this.$t('hj104'),
checked: false
},
{
- name: '止损',
+ name: this.$t('hj105'),
checked: false
},
{
- name: '追踪止损',
+ name: this.$t('hj110'),
checked: false
}
]
@@ -404,7 +406,7 @@
//买卖
setBuy() {
if (!this.$store.state.userInfo.idCard) {
- this.$store.commit('elAlertShow', { 'elAlertShow': true, 'elAlertText': '您还未实名认证,请先实名认证了再下单' });
+ this.$store.commit('elAlertShow', { 'elAlertShow': true, 'elAlertText': this.$t('hj111') });
this.$router.push('/authentication')
return
}
@@ -470,7 +472,12 @@
this.getUserInfo()
this.$router.push('/orderlist?index=2')
} else {
- this.$store.commit('elAlertShow', { 'elAlertShow': true, 'elAlertText': data.msg });
+ if (data.msg.indexOf('不在交易时段内') > -1) {
+ this.$store.commit('elAlertShow', { 'elAlertShow': true, 'elAlertText': this.$t('hj113') });
+ } else {
+ this.$store.commit('elAlertShow', { 'elAlertShow': true, 'elAlertText': data.msg });
+ }
+
}
},
//指数买入
@@ -515,7 +522,7 @@
this.siteLeverList = []
for (let i = 0; i < this.$store.state.userInfo.siteLever.split('/').length; i++) {
let val = this.$store.state.userInfo.siteLever.split('/')[i]
- let item = { label: val + '倍', value: val }
+ let item = { label: val + this.$t('hj112'), value: val }
this.siteLeverList.push(item)
}
} else {
@@ -526,7 +533,7 @@
let val = data.data.siteLever.split('/')[i]
var ccet = (Number(this.nowPrice) / Number(val)).toFixed(2)
//let item = { label: val + '倍', value: val ,bzj:ccet}
- let item = { name: val + 'X', subname: '需付保证金:' + (ccet * 100).toFixed(2), gg: val, bzj: ccet }
+ let item = { name: val + 'X', subname: this.$t('hj102') + ':' + (ccet * 100).toFixed(2), gg: val, bzj: ccet }
this.siteLeverList.push(item)
}
}
--
Gitblit v1.9.3