Browse Source

修改

master
bellezhuo 6 years ago
parent
commit
af1e810144
  1. 7
      src/assets/css/trade.css
  2. 3
      src/assets/data/en.js
  3. 5
      src/assets/data/zh.js
  4. 2
      src/components/footer.vue
  5. 27
      src/views/assets/carryout.vue
  6. 16
      src/views/assets/exchange.vue
  7. 19
      src/views/assets/transfer.vue
  8. 27
      src/views/assets/withdraw.vue
  9. 7
      src/views/coincoin/components/trade_order_list.vue
  10. 36
      src/views/coincoin/components/trade_pair_list.vue
  11. 2
      src/views/index/components/banner.vue
  12. 57
      src/views/index/components/trend.vue
  13. 7
      src/views/release/components/release_order_list.vue
  14. 28
      src/views/release/release_trade.vue

7
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; */
}
/***/

3
src/assets/data/en.js

@ -500,7 +500,10 @@ module.exports = {
'提币数量': '提币数量',
'请输入提币数量': '请输入提币数量',
'手续费': '手续费',
'手续费:': '手续费:',
'最低手续费:': '最低手续费:',
'到账数量': '到账数量',
'实际扣除': '实际扣除',
'确认提币': '确认提币',
'1. 最小提币数量为:': '1. 最小提币数量为:',
',最大提币数量为:': ',最大提币数量为:',

5
src/assets/data/zh.js

@ -138,7 +138,7 @@ module.exports = {
'无': '无',
'设置': '设置',
'修改': '修改',
'支付密码': 'pay password',
'支付密码': '支付密码',
'设置支付密码': '设置支付密码',
'请输入支付密码': '请输入支付密码',
'确认支付密码': '确认支付密码',
@ -500,7 +500,10 @@ module.exports = {
'提币数量': '提币数量',
'请输入提币数量': '请输入提币数量',
'手续费': '手续费',
'手续费:': '手续费:',
'最低手续费:': '最低手续费:',
'到账数量': '到账数量',
'实际扣除': '实际扣除',
'确认提币': '确认提币',
'1. 最小提币数量为:': '1. 最小提币数量为:',
',最大提币数量为:': ',最大提币数量为:',

2
src/components/footer.vue

@ -20,7 +20,7 @@
<a href="javascript:;">{{$t('关于我们')}}</a>
</li>
<li>
<a href="javascript:;">{{$t('公告')}}</a>
<router-link to="/news">{{$t('公告')}}</router-link>
</li>
</ul>

27
src/views/assets/carryout.vue

@ -79,7 +79,9 @@
</div>
<div class="address-form-div3">
<label class="form-label">{{$t('手续费')}}</label>
<label class="form-label">
{{$t('手续费')}}<span class="hc-color3">( {{$t('最低手续费:')}}{{minFee}})</span>
</label>
<div class="form-control">
<input class="text-input" :value="fee*100 + '%'" readonly>
</div>
@ -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')

16
src/views/assets/exchange.vue

@ -3,7 +3,7 @@
<div class="container">
<!--当前位置-->
<div class="hc-breadcrumb">
<span class="hc-color4" @click="$router.push('/assets/coincoin')">{{$t('币账户')}}</span>
<span class="hc-color4" @click="goBack">{{$route.params.type == 1 ? $t('币币账户') : $t('币账户')}}</span>
<i class="hc-breadcrumb-icon"></i>
<span class="margin0">{{$t('兑换')}}</span>
</div>
@ -85,7 +85,9 @@
<div class="form-group">
<div class="address-form-div2">
<label class="form-label">{{$t('兑换比例')}}</label>
<label class="form-label">
{{$t('兑换比例')}}<span class="hc-color3">( {{$t('手续费:')}}{{fee}})</span>
</label>
<div class="form-control">
<input type="text" class="text-input" :value="proportion" readonly>
</div>
@ -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;

19
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)

27
src/views/assets/withdraw.vue

@ -73,7 +73,9 @@
</div>
<div class="address-form-div3">
<label class="form-label">{{$t('手续费')}}</label>
<label class="form-label">
{{$t('手续费')}}<span class="hc-color3">( {{$t('最低手续费:')}}{{minFee}})</span>
</label>
<div class="form-control">
<input class="text-input" :value="fee*100 + '%'" readonly>
</div>
@ -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')

7
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;

36
src/views/coincoin/components/trade_pair_list.vue

@ -4,8 +4,10 @@
<div class="list2 hc-bgColor3">
<div class="list2-div1">
<span>{{$t('市场')}}</span>
<div class="list2-soso-box">
<input placeholder="搜索币种">
<el-input class="inp" :placeholder="$t('搜索币种')" v-model="searchKeywords" type="text" clearable autocomplete="off"></el-input>
<i class="list2-icon-search"></i>
</div>
</div>
@ -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);

2
src/views/index/components/banner.vue

@ -1,6 +1,6 @@
<template>
<div class="swiper-box">
<el-carousel height="200px" :autoplay="false">
<el-carousel height="200px" :interval="5000">
<el-carousel-item v-for="(item, index) of bannerList" :key="index">
<ul class="banner-img-warp" v-html="item">

57
src/views/index/components/trend.vue

@ -2,7 +2,7 @@
<div class="quotation-main">
<div class="quotation-main-soso">
<div class="soso-box">
<input placeholder="搜索币种">
<el-input class="inp" :placeholder="$t('搜索币种')" v-model="searchKeywords" type="text" clearable autocomplete="off"></el-input>
<i class="icon-search"></i>
</div>
</div>
@ -32,7 +32,7 @@
<div class="cell">
{{$t('最新价')}}(USDT)
<span class="caret-wrapper">
<i class="sort-caret ascending active"></i>
<i class="sort-caret ascending"></i>
<i class="sort-caret descending"></i>
</span>
</div>
@ -122,8 +122,8 @@
</div>
</td>
<td class="is-center">
<div class="cell">
<img src="@/assets/images/icon-transaction-2.png" />
<div class="cell" @click="gotoTrade(item)">
<img src="@/assets/images/icon-transaction-2.png">
</div>
</td>
</tr>
@ -143,6 +143,7 @@
data() {
return {
caseIndex: 1, //
searchKeywords: '', //
}
},
computed: {
@ -163,15 +164,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);
@ -234,6 +250,23 @@
chooseCase(item) { //
this.caseIndex = item.caseCode;
},
gotoTrade(item) { //
if(item.caseCode == 3) { //
this.$router.push({
path: '/release/trade',
query: {
id: item.dealCoin,
}
});
} else { //
this.$router.push({
path: '/coincoin/trade',
query: {
id: item.dealCoin,
}
});
}
}
}
}
</script>

7
src/views/release/components/release_order_list.vue

@ -116,13 +116,6 @@
computed: {
...mapState('trend', ['currentPair']),
},
watch: {
currentPair(newVal) {
if(newVal) {
this.getOrderList(1);
}
}
},
methods: {
getOrderList(pages) { //
this.currentPage = pages;

28
src/views/release/release_trade.vue

@ -87,12 +87,28 @@
this.getAxios('/api/coin/case/all')
.then(data => {
let list = data.data;
list.forEach(item => {
if(item.caseCode == 3) {
let coin = item.childen[0].prices[0];
this.$store.dispatch('trend/getNewPair', coin);
}
})
let coin;
if(this.$route.query.id) { //
list.forEach(item => {
item.childen.forEach(item2 => {
item2.prices.forEach(item3 => {
if(item3.dealCoin == this.$route.query.id) {
coin = item3;
}
})
})
});
} else {
list.forEach(item => {
if(item.caseCode == 3) {
let coin = item.childen[0].prices[0];
this.$store.dispatch('trend/getNewPair', coin);
}
})
}
this.$store.dispatch('trend/getNewPair', coin);
this.getBalance();
})
},

Loading…
Cancel
Save