From af1e810144ca95f3b08f9d0694f8ca7b33cb4911 Mon Sep 17 00:00:00 2001 From: bellezhuo <65014152@qq.com> Date: Wed, 15 Jul 2020 08:45:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/css/trade.css | 7 ++- src/assets/data/en.js | 3 + src/assets/data/zh.js | 5 +- src/components/footer.vue | 2 +- src/views/assets/carryout.vue | 27 +++++---- src/views/assets/exchange.vue | 16 +++++- src/views/assets/transfer.vue | 19 ++++--- src/views/assets/withdraw.vue | 27 +++++---- .../coincoin/components/trade_order_list.vue | 7 --- .../coincoin/components/trade_pair_list.vue | 36 +++++++++--- src/views/index/components/banner.vue | 2 +- src/views/index/components/trend.vue | 57 +++++++++++++++---- .../release/components/release_order_list.vue | 7 --- src/views/release/release_trade.vue | 28 +++++++-- 14 files changed, 165 insertions(+), 78 deletions(-) diff --git a/src/assets/css/trade.css b/src/assets/css/trade.css index febf12a..a1dae98 100644 --- a/src/assets/css/trade.css +++ b/src/assets/css/trade.css @@ -141,6 +141,11 @@ float: right; border: 1px solid #cad7e0; border-radius: 3px; + padding-right: 20px; +} + +.list2-div1 .list2-soso-box .el-input__icon { + line-height: 26px; } .list2-soso-box input { @@ -167,7 +172,7 @@ background-position: center center; background-repeat: no-repeat; background-size: 16px; - cursor: pointer; + /* cursor: pointer; */ } /***/ diff --git a/src/assets/data/en.js b/src/assets/data/en.js index 381b912..fdad2f1 100644 --- a/src/assets/data/en.js +++ b/src/assets/data/en.js @@ -500,7 +500,10 @@ module.exports = { '提币数量': '提币数量', '请输入提币数量': '请输入提币数量', '手续费': '手续费', + '手续费:': '手续费:', + '最低手续费:': '最低手续费:', '到账数量': '到账数量', + '实际扣除': '实际扣除', '确认提币': '确认提币', '1. 最小提币数量为:': '1. 最小提币数量为:', ',最大提币数量为:': ',最大提币数量为:', diff --git a/src/assets/data/zh.js b/src/assets/data/zh.js index f0c0f79..c920cd4 100644 --- a/src/assets/data/zh.js +++ b/src/assets/data/zh.js @@ -138,7 +138,7 @@ module.exports = { '无': '无', '设置': '设置', '修改': '修改', - '支付密码': 'pay password', + '支付密码': '支付密码', '设置支付密码': '设置支付密码', '请输入支付密码': '请输入支付密码', '确认支付密码': '确认支付密码', @@ -500,7 +500,10 @@ module.exports = { '提币数量': '提币数量', '请输入提币数量': '请输入提币数量', '手续费': '手续费', + '手续费:': '手续费:', + '最低手续费:': '最低手续费:', '到账数量': '到账数量', + '实际扣除': '实际扣除', '确认提币': '确认提币', '1. 最小提币数量为:': '1. 最小提币数量为:', ',最大提币数量为:': ',最大提币数量为:', diff --git a/src/components/footer.vue b/src/components/footer.vue index 66a6979..bcff2e3 100644 --- a/src/components/footer.vue +++ b/src/components/footer.vue @@ -20,7 +20,7 @@ {{$t('关于我们')}}
  • - {{$t('公告')}} + {{$t('公告')}}
  • diff --git a/src/views/assets/carryout.vue b/src/views/assets/carryout.vue index 77e0c1c..6fe293f 100644 --- a/src/views/assets/carryout.vue +++ b/src/views/assets/carryout.vue @@ -79,7 +79,9 @@
    - +
    @@ -220,11 +222,11 @@ }, summary() { //实际扣除数量 let value = 0; - let remainder = this.common.accAdd(1, this.fee); + let remainder = this.common.accReduce(1, this.fee); if(this.amount > 0) { if(this.common.accMul(this.fee, this.amount) < this.minFee) { //最低手续费 - value = this.common.accAdd(this.amount, this.minFee).toFixed(8); + value = this.common.accReduce(this.amount, this.minFee).toFixed(8); } else { value = this.common.accMul(this.amount, remainder).toFixed(8); } @@ -234,14 +236,17 @@ }, methods: { getCarryoutInfo() { //获取提币信息 - this.allCoinList.forEach(item => { - if(item.id == this.carryoutCoin) { - this.fee = item.transferFee; - this.minFee = item.transferMinFee; - this.minVolumn = item.transferMinLimit; - this.maxVolumn = item.transferMaxLimit; - } - }) + this.getAxios('/api/user/coin/list') + .then(data => { + data.data.forEach(item => { + if(item.id == this.carryoutCoin) { + this.fee = item.transferFee; + this.minFee = item.transferMinFee; + this.minVolumn = item.transferMinLimit; + this.maxVolumn = item.transferMaxLimit; + } + }); + }) }, getBalance() { //获取余额 this.getAxios('/api/user/assets/list?type=COIN_TO_COIN') diff --git a/src/views/assets/exchange.vue b/src/views/assets/exchange.vue index 4b4f158..97ed54c 100644 --- a/src/views/assets/exchange.vue +++ b/src/views/assets/exchange.vue @@ -3,7 +3,7 @@
    - {{$t('币币账户')}} + {{$route.params.type == 1 ? $t('币币账户') : $t('法币账户')}} {{$t('兑换')}}
    @@ -85,7 +85,9 @@
    - +
    @@ -279,7 +281,15 @@ clearData() { this.amount = ''; this.password = ''; - } + }, + + goBack() { + if(this.$route.params.type == 1) { + this.$router.push('/assets/coincoin'); + } else { + this.$router.push('/assets/currency'); + } + }, }, created() { this.exchangeCoin = this.$route.params.id; diff --git a/src/views/assets/transfer.vue b/src/views/assets/transfer.vue index 71c5d2d..681c939 100644 --- a/src/views/assets/transfer.vue +++ b/src/views/assets/transfer.vue @@ -246,14 +246,17 @@ }, methods: { getTransferInfo() { //获取提币信息 - this.allCoinList.forEach(item => { - if(item.id == this.transferCoin) { - this.fee = item.changeCaseFee; - this.minFee = item.changeCaseMinFee; - this.minVolumn = item.changeCaseMinLimit; - this.maxVolumn = item.changeCaseMaxLimit; - } - }) + this.getAxios('/api/user/coin/list') + .then(data => { + data.data.forEach(item => { + if(item.id == this.transferCoin) { + this.fee = item.changeCaseFee; + this.minFee = item.changeCaseMinFee; + this.minVolumn = item.changeCaseMinLimit; + this.maxVolumn = item.changeCaseMaxLimit; + } + }) + }) }, getBalance() { //获取余额 this.getAxios('/api/user/assets/list?type=' + this.assetsCaseCode) diff --git a/src/views/assets/withdraw.vue b/src/views/assets/withdraw.vue index e66b07a..a3577c0 100644 --- a/src/views/assets/withdraw.vue +++ b/src/views/assets/withdraw.vue @@ -73,7 +73,9 @@
    - +
    @@ -211,11 +213,11 @@ }, summary() { //实际扣除数量 let value = 0; - let remainder = this.common.accAdd(1, this.fee); + let remainder = this.common.accReduce(1, this.fee); if(this.amount > 0) { if(this.common.accMul(this.fee, this.amount) < this.minFee) { //最低手续费 - value = this.common.accAdd(this.amount, this.minFee).toFixed(8); + value = this.common.accReduce(this.amount, this.minFee).toFixed(8); } else { value = this.common.accMul(this.amount, remainder).toFixed(8); } @@ -225,14 +227,17 @@ }, methods: { getWithdrawInfo() { //获取提币信息 - this.allCoinList.forEach(item => { - if(item.id == this.withdrawCoin) { - this.fee = item.withdrawFee; - this.minFee = item.withdrawMinFee; - this.minVolumn = item.withdrawMinLimit; - this.maxVolumn = item.withdrawMaxLimit; - } - }) + this.getAxios('/api/user/coin/list') + .then(data => { + data.data.forEach(item => { + if(item.id == this.withdrawCoin) { + this.fee = item.withdrawFee; + this.minFee = item.withdrawMinFee; + this.minVolumn = item.withdrawMinLimit; + this.maxVolumn = item.withdrawMaxLimit; + } + }) + }) }, getBalance() { //获取余额 this.getAxios('/api/user/assets/list?type=COIN_TO_COIN') diff --git a/src/views/coincoin/components/trade_order_list.vue b/src/views/coincoin/components/trade_order_list.vue index b9aecc9..58f44e2 100644 --- a/src/views/coincoin/components/trade_order_list.vue +++ b/src/views/coincoin/components/trade_order_list.vue @@ -133,13 +133,6 @@ computed: { ...mapState('trend', ['currentPair']), }, - watch: { - currentPair(newVal) { - if(newVal) { - this.getOrderList(1); - } - } - }, methods: { getOrderList(pages) { //获取委托列表 this.currentPage = pages; diff --git a/src/views/coincoin/components/trade_pair_list.vue b/src/views/coincoin/components/trade_pair_list.vue index 30b91dd..ab9516c 100644 --- a/src/views/coincoin/components/trade_pair_list.vue +++ b/src/views/coincoin/components/trade_pair_list.vue @@ -4,8 +4,10 @@
    {{$t('市场')}} +
    - + +
    @@ -93,6 +95,7 @@ data() { return { caseIndex: 1, //选择主板 + searchKeywords: '', //搜索关键字 } }, computed: { @@ -113,15 +116,30 @@ }, tradePairList() { //交易对列表 let list = []; - this.allPairList.forEach(item => { - if(item.caseCode == this.caseIndex) { - item.childen.forEach(item2 => { - item2.prices.forEach(item3 => { - list.push(item3); + if(this.searchKeywords) { //搜索 + this.allPairList.forEach(item => { + if(item.caseCode == this.caseIndex) { + item.childen.forEach(item2 => { + item2.prices.forEach(item3 => { + if (item3.dealCoin.toUpperCase().indexOf(this.searchKeywords.toUpperCase()) > -1) { + list.push(item3); + } + }) }) - }) - } - }); + } + }); + } else { + this.allPairList.forEach(item => { + if(item.caseCode == this.caseIndex) { + item.childen.forEach(item2 => { + item2.prices.forEach(item3 => { + list.push(item3); + }) + }) + } + }); + } + list.forEach(item => { if(this.checkCollected(item.symbolId)) { this.$set(item, 'collected', true); diff --git a/src/views/index/components/banner.vue b/src/views/index/components/banner.vue index 932f8b5..0f46265 100644 --- a/src/views/index/components/banner.vue +++ b/src/views/index/components/banner.vue @@ -1,6 +1,6 @@