diff --git a/src/views/contract/exchange-store.vue b/src/views/contract/exchange-store.vue index cdf9479..ce2b181 100644 --- a/src/views/contract/exchange-store.vue +++ b/src/views/contract/exchange-store.vue @@ -246,7 +246,8 @@
{{ $t("contract.e7") }}
-
{{ accountInfo.account_equity }}
+ +
{{ maxNum }}
{{ $t("contract.e1") }}
@@ -508,7 +509,7 @@ export default { // console.info(this.form.lever_rate) // console.info(this.margin) if (!this.form.lever_rate || !this.marginBuy) return 0; - let p=this.marginBuy*this.form.lever_rate; + let p = Math.round(this.marginBuy*this.form.lever_rate); this.buyform.amount=p; return p @@ -517,7 +518,7 @@ export default { // console.info(this.form.lever_rate) // console.info(this.margin) if (!this.form.lever_rate || !this.marginSell) return 0; - let p=this.marginSell*this.form.lever_rate; + let p = Math.round(this.marginSell*this.form.lever_rate); this.sellform.amount=p; return p @@ -537,7 +538,8 @@ export default { // if (!this.form.lever_rate) { // this.form.lever_rate = res.lever_rate; // } - if (this.form.lever_rate && !boo) { + // this.form.lever_rate && !boo + if (this.form.lever_rate) { this.openNum(); } }); diff --git a/src/views/contract/index.vue b/src/views/contract/index.vue index c5a2e20..d644077 100644 --- a/src/views/contract/index.vue +++ b/src/views/contract/index.vue @@ -78,34 +78,38 @@ - + + - + - - - +
{{ $t("contract.h5") }} +
{{ $t("contract.h5") }}
+
{{ $t("contract.g3") }}
+
{{ $t("contract.h6") }}
+
- {{ item.symbol }}/{{ parent.coin_name }} - - - - {{ item.price }} - - {{ item.increaseStr }} - +
+ {{ item.symbol }}/{{ parent.coin_name }} + +
+
+ + {{ item.price }} +
+
+ {{ item.increaseStr }} +
+
@@ -270,22 +274,22 @@ export default { activeSymbol() { this.holdPosition(); }, - filterCoin: { - handler(n,o){ - if(!n){ - this.contractListFilter = this.contractList; - }else{ - this.contractListFilter = this.contractList.map((item1, index1)=>{ - let arr = item1; - arr.marketInfoList = item1.marketInfoList.filter(item2=>{ - return item2.symbol.indexOf(n.toUpperCase())!=-1 - }) - return arr; - }) - } - }, - immediate: true - } + // filterCoin: { + // handler(n,o){ + // if(!n){ + // this.contractListFilter = this.contractList; + // }else{ + // this.contractListFilter = this.contractList.map((item1, index1)=>{ + // let arr = item1; + // arr.marketInfoList = item1.marketInfoList.filter(item2=>{ + // return item2.symbol.indexOf(n.toUpperCase())!=-1 + // }) + // return arr; + // }) + // } + // }, + // immediate: true + // } }, destroyed() { clearInterval(this._time); @@ -434,7 +438,21 @@ export default { }, enterFilter(){ - } + }, + isShow(symbol) { + + const reg = new RegExp(this.filterCoin, "gi"); + if (!this.filterCoin) return true; + else { + // let name = symbol.coinName || symbol.pair; + // return name.search(reg) >= 0; + let name = symbol.pair_name || symbol.symbol; + return reg.test(name); + // return name.search(reg) >= 0; + } + // return !this.keyword || symbol.coinName.concat(symbol.pair).search(reg) >= 0; + + }, } }; @@ -445,6 +463,12 @@ export default { thead th, table td{ font-size: 14px; } + .trade-list{ + // width: 23vw; + height: 1110px; + overflow-y: auto; + display: block; + } tbody tr{ cursor: pointer; } @@ -504,4 +528,9 @@ export default { .min-width-B{ min-width: 130px; } + .width-32{ + display: inline-block !important; + vertical-align: top !important; + width: 31% !important; + }