Browse Source

'合约页面更新、钱包页面更新1%'

master
luyisha 2 years ago
parent
commit
edb6c2711b
  1. 4
      src/assets/js/tvStyle.js
  2. 11
      src/assets/scss/module/_contract.scss
  3. 2
      src/assets/scss/module/_exchange.scss
  4. 2
      src/assets/scss/module/_markets.scss
  5. 2
      src/assets/scss/module/_option.scss
  6. 2
      src/components/CommonHeader.vue
  7. 2
      src/components/KLine.vue
  8. 3
      src/components/SecondaryNav.vue
  9. 3
      src/i18n/tw.json
  10. 7
      src/views/contract/current-commission.vue
  11. 439
      src/views/contract/exchange-store.vue
  12. 65
      src/views/contract/handicap.vue
  13. 5
      src/views/contract/history-commission.vue
  14. 7
      src/views/contract/hold-position.vue
  15. 349
      src/views/contract/index.vue
  16. 28
      src/views/contract/page-bottom.vue
  17. 4
      src/views/exchange/book-trades.vue
  18. 2
      src/views/option/kline.vue
  19. 2
      src/views/otc/ad.vue
  20. 2
      src/views/otc/index.vue
  21. 2
      src/views/otc/order.vue
  22. 2
      src/views/purchase/index.vue
  23. 19
      src/views/wallet/exchange-assets.vue
  24. 4
      static/Kline/charting_library/static/css/tradingview_black.css

4
src/assets/js/tvStyle.js

@ -7,10 +7,10 @@ let light={
}
let dark = {
"paneProperties.background": "#222e3d",
"paneProperties.background": "#121212",
"paneProperties.vertGridProperties.color": "#646566",
"paneProperties.horzGridProperties.color": "#646566",
"scalesProperties.backgroundColor": "#222e3d",
"scalesProperties.backgroundColor": "#121212",
"scalesProperties.textColor" : "#7b9ca7"
}

11
src/assets/scss/module/_contract.scss

@ -53,7 +53,7 @@
.handicap {
// width: 200px;
width: 250px;
width: 100%;
.handicap-body {
font-size: 11px;
@ -115,16 +115,17 @@
}
.account {
width: 250px;
width: 100%;
padding-right: 10px;
}
}
.dark-app {
$header: #2b2839;
$page-bg: #141e2c;
$page-bg: #121212;
//$page-bg: #e9e9e9;
$head: #1e2834;
$panel: #222e3d;
$head: #121212;
$panel: #121212;
$panel-1: #455c71;
$border: #2a2e39;
//$color: #c0c4cc;

2
src/assets/scss/module/_exchange.scss

@ -2,7 +2,7 @@
$header: #2b2839;
$page-bg: #141e2c;
$head: #1e2834;
$panel:#222e3d;
$panel:#121212;
$panel-1: #455c71;
$border: #2a2e39;
$color: #c0c4cc;

2
src/assets/scss/module/_markets.scss

@ -11,7 +11,7 @@
box-shadow: 0 2px 16px 0 rgba(0, 0, 0, 0.04);
border-radius: 5px;
margin-bottom: 30px;
background-color: #222e3d;
background-color: #121212;
}
.markets-chart {

2
src/assets/scss/module/_option.scss

@ -110,7 +110,7 @@
$header: #2b2839;
$page-bg: #e9e9e9;
$head: #1e2834;
$panel:#222e3d;
$panel:#121212;
$panel-1: #455c71;
$border: #2a2e39;
$color: #c0c4cc;

2
src/components/CommonHeader.vue

@ -603,7 +603,7 @@ export default {
<style lang="scss" scoped>
header {
background-color: #000 !important;
border-bottom: 1px solid #1c1c1c !important;
// border-bottom: 1px solid #1c1c1c !important;
color: #fff !important;
@include fs(15);

2
src/components/KLine.vue

@ -327,7 +327,7 @@ export default {
disabled_features:['header_resolutions','header_symbol_search', "volume_force_overlay"],
enabled_features:['header_indicators'],
overrides: tvStyle[this.theme],
toolbar_bg: this.theme == "light" ? "#f1f3f6" : "#222e3d",
toolbar_bg: this.theme == "light" ? "#f1f3f6" : "#121212",
custom_css_url: `/static/Kline/charting_library/static/css/tradingview_${
this.theme == "light" ? "white" : "black"
}.css`,

3
src/components/SecondaryNav.vue

@ -204,7 +204,8 @@ export default {
@include flexible(row, center, center);
// background: #f5f9fc;
background : $underpainting;
// background : $underpainting;
background-color: transparent;
.SecondaryNavWidth {
width: 1280px;

3
src/i18n/tw.json

@ -953,7 +953,8 @@
"k8": "請先登錄進行申購 ",
"k9":"請輸入認購碼",
"l1":"漲幅比例",
"l2":"保證金"
"l2":"保證金",
"ContractList": "合約列表"
},
"otc": {
"a0": "請選擇交易類型",

7
src/views/contract/current-commission.vue

@ -172,4 +172,9 @@ export default {
}
}
};
</script>
</script>
<style scoped>
.table thead tr th{
color: #828282;
}
</style>

439
src/views/contract/exchange-store.vue

@ -1,8 +1,22 @@
<template>
<div class="markets-pair-list exchange-store bg-plain">
<div class="nav nav-pills">
<div class="nav-item">
<a class="nav-link" :class="{ active: tab == 1 }" @click="tab = 1">{{
<div class="markets-pair-list exchange-store bg-plain" style="margin-top: 8px;">
<div class="px-3 pri">
<div class="nav nav-pills" style="border-bottom: 1px solid #2e2e2e;">
<div class="nav-item">
<a class="nav-link" :class="{ active: form.type == 2 }" @click="form.type = 2">{{
$t("contract.d9")
}}</a>
</div>
<div class="nav-item">
<a class="nav-link" :class="{ active: form.type == 1 }" @click="form.type = 1">{{
$t("contract.e0")
}}</a>
</div>
</div>
</div>
<div class="nav nav-pills px-3 py-3">
<div class="nav-item" style="background-color: #2e2e2e;width:50%;text-align: center;">
<a class="nav-link" @click="tab = 1">{{
$t("contract.d5")
}}</a>
</div>
@ -11,8 +25,8 @@
$t("contract.d6")
}}</a>
</div> -->
<div class="flex-fill px-3 justify-content-end d-flex align-items-center">
<el-popover
<div class="flex-fill px-3 justify-content-end d-flex align-items-center" style="background-color: #2e2e2e;width:50%;text-align: center;">
<el-popover style="display: block;width: 100%;"
placement="bottom"
width="100"
v-model="visible"
@ -23,7 +37,7 @@
slot="reference"
@click="visible = !visible"
>
{{ $t("contract.b0") }}
<!-- {{ $t("contract.b0") }} -->
<span class="fn-16"> {{ form.lever_rate }}X </span>
<i class="el-icon-edit text-primary"></i>
</div>
@ -43,106 +57,192 @@
</el-popover>
</div>
</div>
<div class="content-box px-3 ">
<div v-if="type == 2" class="input-group my-4 input-group-sm">
<div class="input-group-prepend">
<span class="input-group-text">{{ $t("contract.d7") }}</span>
</div>
<input type="number" class="form-control" placeholder="" />
<div class="input-group-append">
<span class="input-group-text">USDT</span>
<div class="content-box d-flex" style="flex-wrap: wrap;justify-content: space-between;">
<!-- 买入表单 -->
<div style="width: 50%;" class="px-3">
<div class="d-flex my-4 align-items-center">
<div class="input-group input-group-sm">
<div class="input-group-prepend">
<span class="input-group-text">{{ $t("contract.d8") }}</span>
</div>
<template v-if="form.type == 1">
<input
type="number"
v-model="buyform.entrust_price"
class="form-control"
placeholder=""
/>
<div class="input-group-append">
<span class="input-group-text">USDT</span>
</div>
</template>
<template v-if="form.type == 2">
<input
type="text"
disabled
:value="$t('contract.d9')"
class="form-control"
:placeholder="$t('contract.d9')"
/>
</template>
</div>
</div>
</div>
<div class="d-flex my-4 align-items-center">
<div class="input-group input-group-sm">
<div class="input-group mb-4 input-group-sm">
<div class="input-group-prepend">
<span class="input-group-text">{{ $t("contract.d8") }}</span>
<!-- <span class="input-group-text">{{ $t("contract.e1") }}</span> -->
<span class="input-group-text">{{ $t("contract.l2") }}</span>
</div>
<template v-if="form.type == 1">
<input
<input
type="number"
v-model="form.entrust_price"
class="form-control"
placeholder=""
/>
<div class="input-group-append">
<span class="input-group-text">USDT</span>
v-model="marginBuy"
:placeholder="tips"
/>
<!-- <div class="input-group-append">
<span class="input-group-text">{{ $t("contract.e2") }}</span>
</div> -->
</div>
<div class="px-2" v-if="this.tab == 1">
<el-slider
:value="activeStepBuy"
@input="sliderChangeBuy"
:format-tooltip="tooltip"
:marks="marks"
:step="25"
></el-slider>
</div>
<div class="d-flex justify-content-between mb-3 color_7c fn-10">
<div>0</div>
<div>100%</div>
</div>
<!-- 开仓 -->
<div v-if="tab == 1" class="kaicang">
<div class="d-flex justify-content-between mb-3">
<div class="color_7c">{{ $t("contract.e7") }} </div>
<div>{{ maxNum }}</div>
</div>
<div class="d-flex justify-content-between mb-3">
<div class="color_7c">{{ $t("contract.e1") }}</div>
<div>{{ amountBuy }} </div>
</div>
<div class="d-flex justify-content-between mb-4">
<div class="color_7c">{{ $t("contract.a3") }}</div>
<div>
{{ accountInfo.usable_balance }} USDT
<i
class="el-icon-sort"
@click="$router.push('/wallet/assets/exchange')"
></i>
</div>
</template>
<template v-if="form.type == 2">
<input
type="text"
disabled
:value="$t('contract.d9')"
class="form-control"
:placeholder="$t('contract.d9')"
/>
</template>
</div>
</div>
<button
@click="form.type == 1 ? (form.type = 2) : (form.type = 1)"
class="btn btn-sm btn-outline-primary ml-2 text-nowrap"
>
{{ form.type == 1 ? $t("contract.e0") : $t("contract.d9") }}
</button>
</div>
<div class="input-group mb-4 input-group-sm">
<div class="input-group-prepend">
<!-- <span class="input-group-text">{{ $t("contract.e1") }}</span> -->
<span class="input-group-text">{{ $t("contract.l2") }}</span>
<!-- 平仓 -->
<div v-if="tab == 2">
<div class="d-flex justify-content-between">
<div>{{ $t("contract.e4") }}</div>
<div>{{ multiplePositions }} {{ $t("contract.e2") }}</div>
</div>
<div class="d-flex justify-content-between mb-4">
<div>{{ $t("contract.e5") }}:</div>
<div>{{ shortPosition }} {{ $t("contract.e2") }}</div>
</div>
</div>
<!-- 止盈止损 -->
<div class="d-flex mb-4 border-top py-2">
<input type="checkbox" name="" id="" v-model="checkboxBuy">
<div>止盈/止损</div>
</div>
<input
type="number"
class="form-control"
v-model="margin"
:placeholder="tips"
/>
<!-- <div class="input-group-append">
<span class="input-group-text">{{ $t("contract.e2") }}</span>
</div> -->
</div>
<div class="px-2 mb-4" v-if="this.tab == 1">
<el-slider
:value="activeStep"
@input="sliderChange"
:format-tooltip="tooltip"
:marks="marks"
:step="25"
></el-slider>
<!-- :step="25" -->
</div>
<!-- 开仓 -->
<div v-if="tab == 1" class="kaicang">
<div class="d-flex justify-content-between mb-3">
<div>{{ $t("contract.e1") }}</div>
<!-- {{$t("contract.e2")}} -->
<div>{{ amount }} </div>
<!-- 卖出表单 -->
<div style="width: 50%;" class="px-3">
<div class="d-flex my-4 align-items-center">
<div class="input-group input-group-sm">
<div class="input-group-prepend">
<span class="input-group-text">{{ $t("contract.d8") }}</span>
</div>
<template v-if="form.type == 1">
<input
type="number"
v-model="sellform.entrust_price"
class="form-control"
placeholder=""
/>
<div class="input-group-append">
<span class="input-group-text">USDT</span>
</div>
</template>
<template v-if="form.type == 2">
<input
type="text"
disabled
:value="$t('contract.d9')"
class="form-control"
:placeholder="$t('contract.d9')"
/>
</template>
</div>
</div>
<div class="d-flex justify-content-between mb-4">
<div>{{ $t("contract.a3") }}:</div>
<div>
{{ accountInfo.usable_balance }} USDT
<i
class="el-icon-sort"
@click="$router.push('/wallet/assets/exchange')"
></i>
<div class="input-group mb-4 input-group-sm">
<div class="input-group-prepend">
<!-- <span class="input-group-text">{{ $t("contract.e1") }}</span> -->
<span class="input-group-text">{{ $t("contract.l2") }}</span>
</div>
<input
type="number"
class="form-control"
v-model="marginSell"
:placeholder="tips"
/>
<!-- <div class="input-group-append">
<span class="input-group-text">{{ $t("contract.e2") }}</span>
</div> -->
</div>
</div>
<!-- 平仓 -->
<div v-if="tab == 2">
<div class="d-flex justify-content-between">
<div>{{ $t("contract.e4") }}</div>
<div>{{ multiplePositions }} {{ $t("contract.e2") }}</div>
<div class="px-2" v-if="this.tab == 1">
<el-slider
:value="activeStepSell"
@input="sliderChangeSell"
:format-tooltip="tooltip"
:marks="marks"
:step="25"
></el-slider>
</div>
<div class="d-flex justify-content-between mb-4">
<div>{{ $t("contract.e5") }}:</div>
<div>{{ shortPosition }} {{ $t("contract.e2") }}</div>
<div class="d-flex justify-content-between mb-3 color_7c fn-10">
<div>0</div>
<div>100%</div>
</div>
<!-- 开仓 -->
<div v-if="tab == 1" class="kaicang">
<div class="d-flex justify-content-between mb-3">
<div class="color_7c">{{ $t("contract.e7") }} </div>
<div>{{ maxNum }}</div>
</div>
<div class="d-flex justify-content-between mb-3">
<div class="color_7c">{{ $t("contract.e1") }}</div>
<div>{{ amountSell }} </div>
</div>
<div class="d-flex justify-content-between mb-4">
<div class="color_7c">{{ $t("contract.a3") }}</div>
<div>
{{ accountInfo.usable_balance }} USDT
<i
class="el-icon-sort"
@click="$router.push('/wallet/assets/exchange')"
></i>
</div>
</div>
</div>
<!-- 止盈止损 -->
<div class="d-flex mb-4 border-top py-2">
<input type="checkbox" name="" id="" v-model="checkboxSell">
<div>止盈/止损</div>
</div>
</div>
<div class="exchange_button" v-if="tab == 1">
<div class="px-1 flex-fill mb-4">
<div class="exchange_button" v-if="tab == 1" style="width: 100%;">
<div class="px-3 flex-fill mb-4">
<button
@click="ifOpenPosition(1)"
type="button"
@ -151,12 +251,8 @@
{{ $t("contract.d0") }}
<!-- <span class="fn-12"> {{ $t("contract.e6") }} </span> -->
</button>
<div class="text-left">
{{ $t("contract.e7") }} {{ maxNum }}
<!-- {{ $t("contract.e2") }} -->
</div>
</div>
<div class="px-1 flex-fill">
<div class="px-3 flex-fill">
<button
@click="ifOpenPosition(2)"
type="button"
@ -166,13 +262,9 @@
<!-- <span class="fn-12"> {{ $t("contract.e8") }} </span> -->
</button>
<!-- <div class="text-center"> -->
<div class="text-right">
{{ $t("contract.e7") }} {{ maxNum }}
<!-- {{ $t("contract.e2") }} -->
</div>
</div>
</div>
<div class="" v-if="tab == 2">
<div class="" v-if="tab == 2" style="width: 100%;">
<div class="px-2 flex-fill mb-4">
<button
@click="ifOpenPosition(1)"
@ -209,14 +301,19 @@ export default {
data() {
return {
tab: 1,
type: 1,
visible: false,
form: {
// 1: 2:
type: 2,
entrust_price: undefined,
amount:"",
type: 2,//21
lever_rate: ""
},
buyform: {
entrust_price: undefined,
amount:""
},
sellform: {
entrust_price: undefined,
amount:""
},
//
maxNum: 0,
@ -229,7 +326,10 @@ export default {
50:'',
75:''
},
margin:0,
marginBuy:0,
marginSell:0,
checkboxBuy: false,
checkboxSell: false
};
},
props: {
@ -257,16 +357,21 @@ export default {
},
watch: {
symbol() {
this.form.entrust_price = undefined;
this.buyform.entrust_price = undefined;
this.sellform.entrust_price = undefined;
this.contractAccount();
this.getSymbolDetail();
},
defaultPrice(n) {
this.form.entrust_price = n;
this.buyform.entrust_price = n;
this.sellform.entrust_price = n;
},
newPriceObj(n) {
if (n && this.form.entrust_price === undefined) {
this.form.entrust_price = n.price;
if (n && this.buyform.entrust_price === undefined) {
this.buyform.entrust_price = n.price;
}
if (n && this.sellform.entrust_price === undefined) {
this.sellform.entrust_price = n.price;
}
},
contractOpen(n, o) {
@ -324,9 +429,14 @@ export default {
if (!item) return 0;
return item.avail_position;
},
activeStep() {
if (!this.form.amount || !this.maxNum) return 0;
let num = (this.form.amount / this.maxNum) * 100;
activeStepBuy() {
if (!this.buyform.amount || !this.maxNum) return 0;
let num = (this.buyform.amount / this.maxNum) * 100;
return num;
},
activeStepSell() {
if (!this.sellform.amount || !this.maxNum) return 0;
let num = (this.sellform.amount / this.maxNum) * 100;
return num;
},
//
@ -334,13 +444,22 @@ export default {
// if (!this.form.lever_rate) return '';
// return math.omitTo(this.form.amount*this.unit_amount / this.form.lever_rate, 4);
// },
amount(){
console.info(this.form.lever_rate)
console.info(this.margin)
if (!this.form.lever_rate || !this.margin) return 0;
let p=this.margin*this.form.lever_rate;
amountBuy(){
// 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;
this.buyform.amount=p;
return p
},
amountSell(){
// 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;
this.form.amount=p;
this.sellform.amount=p;
return p
}
},
@ -389,10 +508,15 @@ export default {
});
},
//
sliderChange($ev) {
this.form.amount = Math.round((this.maxNum * $ev) / 100)||'';
console.info(this.form)
this.margin=this.form.amount/this.form.lever_rate || 0
sliderChangeBuy($ev) {
this.buyform.amount = Math.round((this.maxNum * $ev) / 100)||'';
// console.info(this.buyform)
this.marginBuy=this.buyform.amount/this.form.lever_rate || 0
},
sliderChangeSell($ev) {
this.sellform.amount = Math.round((this.maxNum * $ev) / 100)||'';
// console.info(this.sellform)
this.marginSell=this.sellform.amount/this.form.lever_rate || 0
},
//
selectLever(idx) {
@ -447,14 +571,24 @@ export default {
symbol: this.symbol,
...this.form
};
if(side==1){
data.entrust_price = this.buyform.entrust_price;
data.amount = this.buyform.amount;
data.checkbox = this.checkboxBuy;
}else{
data.entrust_price = this.sellform.entrust_price;
data.amount = this.sellform.amount;
data.checkbox = this.checkboxSell;
}
Contract.openPosition(data).then(() => {
this.contractAccount();
this.form.amount = 0;
this.buyform.amount = 0;
this.sellform.amount = 0;
this.$message.success(this.$t("contract.f5"));
this.$emit("position");
});
},
//
// -
closePosition(side) {
let data = {
side: side == 1 ? 2 : 1,
@ -484,4 +618,55 @@ export default {
/* ::v-deep .el-slider__stop{
background-color: ;
} */
.exchange-store.markets-pair-list .pri .nav-link.active::after{
content: "";
display: block;
position: absolute;
bottom: 0px;
left: 50%;
width: 52px;
height: 4px;
background-color: #fff;
border-radius: 0px;
transform: translateX(-50%);
margin-left: 0px;
}
.exchange-store.markets-pair-list .nav{
padding: 7px 0px 0px;
font-size: 14px;
}
.exchange-store .btn-success,
.exchange-store .btn-success:hover{
background-color: #52A45A;
border-color: #52A45A;
border-radius: 100px;
color: #fff;
background-image: none;
height: 44px;
}
.exchange-store .btn-danger,
.exchange-store .btn-danger:hover{
background-color: #BB4965;
border-color: #BB4965;
border-radius: 100px;
color: #fff;
background-image: none;
height: 44px;
}
.color_7c{
color: #7c7c7c !important;
}
.exchange-store .input-group-text{
background-color: transparent;
color: #E4E5E4;
border-color: #404040;
}
.exchange-store .form-control{
height: 44px !important;
border-color: #404040;
}
.el-icon-sort:before{
color: #2C60DC;
}
</style>

65
src/views/contract/handicap.vue

@ -1,6 +1,6 @@
<template>
<div class="markets-pair-list handicap bg-plain">
<div class="nav nav-pills">
<div class="nav nav-pills" style="border-bottom: 1px solid #2e2e2e;">
<div class="nav-item">
<a class="nav-link" :class="{ active: tab == 1 }" @click="tab = 1">{{
$t("contract.f7")
@ -14,8 +14,8 @@
</div>
<div>
<!-- 盘口 -->
<div class="handicap-body px-3" v-if="tab == 1">
<div class="d-flex justify-content-between py-2" v-if="false">
<div class="handicap-body" v-if="tab == 1">
<div class="d-flex justify-content-between py-2 px-3" v-if="false">
<div class="d-flex">
<div class="border border-primary rounded px-1 mr-2">
{{ $t("contract.f9") }}
@ -32,29 +32,29 @@
<i class="el-icon-arrow-down"></i>
</div>
</div>
<div class="label-group d-flex text-secondary fn-12 py-2">
<div class="label-group d-flex text-secondary fn-14 py-2 px-3">
<div class="w-8/24">
{{ $t("contract.d8") }}
</div>
<div class="w-7/24">
<div class="w-5/24 text-right">
{{ $t("contract.e1") }}
</div>
<div class="w-7/24 text-right">
<div class="w-9/24 text-right">
{{ $t("contract.g2") }}
<!-- ({{ $t("contract.e2") }}) -->
</div>
</div>
<div class="sell">
<div class="sell px-3">
<template v-for="(item, idx) in sellListShow">
<div
class="item pointer"
:key="idx"
@click="$emit('selectprice', item.price)"
>
<div class="d-flex">
<div class="d-flex fn-14">
<div class="w-8/24 decreace">{{ item.price}}</div>
<div class="w-7/24">{{ omitTo(item.amount, 2) }}</div>
<div class="w-7/24 text-right">{{ item.total }}</div>
<div class="w-5/24 text-right">{{ omitTo(item.amount, 2) }}</div>
<div class="w-9/24 text-right">{{ item.total }}</div>
</div>
<div
class="pgs"
@ -64,10 +64,10 @@
</template>
</div>
<div
class="current-nav d-flex border-top border-bottom align-items-center"
class="current-nav d-flex align-items-center my-2" style="background-color: #2e2e2e;"
>
<div class="w-10/24">
<div class="name text-secondary fn-12">{{ $t("contract.g3") }}</div>
<div class="w-10/24 d-flex align-items-center">
<div class="name fn-12 px-3">{{ $t("contract.g3") }}</div>
<div class="num fn-20 increace">
{{ newPriceObj.price }}
</div>
@ -76,17 +76,17 @@
<!-- <button class="btn btn-sm btn-outline-primary fn-12">更多</button> -->
</div>
</div>
<div class="buy">
<div class="buy px-3">
<template v-for="(item, idx) in buyListShow">
<div
class="item pointer"
:key="idx"
@click="$emit('selectprice', item.price)"
>
<div class="d-flex">
<div class="d-flex fn-14">
<div class="w-8/24 increace">{{ item.price }}</div>
<div class="w-7/24">{{ omitTo(item.amount, 2) }}</div>
<div class="w-7/24 text-right">{{ item.total }}</div>
<div class="w-5/24 text-right">{{ omitTo(item.amount, 2) }}</div>
<div class="w-9/24 text-right">{{ item.total }}</div>
</div>
<div
class="pgs"
@ -98,7 +98,7 @@
</div>
<!-- 实时成交 -->
<div class="real-time p-3" v-if="tab == 2">
<div class="d-flex text-secondary fn-12">
<div class="d-flex text-secondary fn-14">
<div class="w-10/24">
{{ $t("contract.b1") }}
</div>
@ -107,7 +107,7 @@
{{ $t("contract.e1") }}({{ $t("contract.e2") }})
</div>
</div>
<div class="d-flex fn-12" v-for="(item, idx) in tradeList" :key="idx">
<div class="d-flex fn-14" v-for="(item, idx) in tradeList" :key="idx">
<div class="w-10/24">
{{ parseTime(item.ts, false, "{h}:{i}:{s}") }}
</div>
@ -295,3 +295,30 @@ export default {
}
};
</script>
<style scoped>
.handicap .nav-link{
padding: 0.5rem 1.35rem !important;
color: #828282;
}
.handicap.markets-pair-list .nav{
padding: 7px 0px 0px;
font-size: 16px;
}
.handicap.markets-pair-list .nav-link.active{
color: #fff;
}
.handicap.markets-pair-list .nav-link.active::after{
content: "";
display: block;
position: absolute;
bottom: 0px;
left: 50%;
width: 52px;
height: 4px;
background-color: #fff;
border-radius: 0px;
transform: translateX(-50%);
margin-left: 0px;
}
</style>

5
src/views/contract/history-commission.vue

@ -185,3 +185,8 @@ export default {
}
};
</script>
<style scoped>
.table thead tr th{
color: #828282;
}
</style>

7
src/views/contract/hold-position.vue

@ -461,7 +461,7 @@ export default {
},
newPrice: {
default: 0,
type: Number,
type: Number|String,
required: false,
},
holdPositionAll: {
@ -624,11 +624,14 @@ export default {
},
};
</script>
<style scoped">
<style scoped>
.increace{
color: #53b987;
}
.decreace{
color: #ff231f;
}
.table thead tr th{
color: #828282;
}
</style>

349
src/views/contract/index.vue

@ -1,5 +1,5 @@
<template>
<div class="contract-page">
<div class="contract-page" style="background-color: black;padding-top: 5px;">
<!-- <div class="banner-block col-xs-8">-->
<!-- <el-carousel :interval="6000" height="450px">-->
<!-- <el-carousel-item v-for="item in pcBannerList" :key="item.id">-->
@ -7,115 +7,114 @@
<!-- </el-carousel-item>-->
<!-- </el-carousel>-->
<!-- </div>-->
<div class="d-flex align-items-center" style="background-color: #121212;">
<div class="price px-3">
<img :src="currentIcon" alt="" style="width: 26px;height: 26px;">
</div>
<div class="price">
<div class="item fn-16" style="font-weight: bold;">{{ activeContract.pair_name }}</div>
</div>
<div class="d-flex fn-14 px-4 p-l-A align-items-center py-2">
<div class="item px-2 min-width-A">
<div class="title" :class="{
decreace2: activeContract.increase < 0,
increase: activeContract.increase >= 0
}">
{{ activeContract.price }}
</div>
<!-- <div class="title mb-1 text-secondary">
{{ $t("contract.h6") }}
</div> -->
<div :class="{
decreace2: activeContract.increase < 0,
increase: activeContract.increase >= 0
}">
{{ activeContract.increaseStr }}
</div>
</div>
</div>
<!-- 币种价值数据 -->
<div class="d-flex fn-14">
<div class="item px-2 min-width-B">
<div class="title mb-1 text-secondary">
24h {{ $t("contract.h7") }}
</div>
<div class="fn-12">
{{ activeContract.high }}
</div>
</div>
<div class="item px-2 min-width-B">
<div class="title mb-1 text-secondary">
24h {{ $t("contract.h8") }}
</div>
<div class="fn-12">
{{ activeContract.low }}
</div>
</div>
<div class="item px-2 min-width-B">
<div class="title mb-1 text-secondary">
24h {{ $t("contract.h9") }}
(USDT)
</div>
<div class="fn-12">
{{ activeContract.vol }}
</div>
</div>
</div>
</div>
<div class="page-top d-flex pt-2">
<div class="kline-box flex-fill mr-2">
<!-- 交易对 -->
<div style="width: 20%;background-color: #121212;margin-right: 7px;">
<div
class="coin-change d-flex align-items-center py-2 pl-4 heading justify-content-between"
>
<div class="d-flex align-items-center">
<div class="coin d-flex align-items-center">
<el-popover
placement="bottom"
ref="popover"
width="400"
trigger="click"
>
<div slot="reference">
{{ activeContract.pair_name }}
<el-button size="mini">
<i class="el-icon-arrow-down"></i>
</el-button>
</div>
<div
class="markets-pair-list"
style="max-height:300px;overflow:auto;"
class="coin-change d-flex align-items-center py-2 pl-2 heading justify-content-between" style="border-bottom: 1px solid #2e2e2e;height: 43px;font-size: 16px;"
>市场
</div>
<div class="d-flex search_box">
<i class="el-icon-search"></i>
<input type="text" placeholder="搜索">
</div>
<div class="bottom-box-left">
<template v-for="parent in contractList">
<table class="table" :key="parent.coin_name + 1">
<thead>
<tr class="">
<th class="w-10/24">{{ $t("contract.h5") }}</th>
<th class="w-7/24">{{ $t("contract.g3") }}</th>
<th class="w-7/24 text-right">
{{ $t("contract.h6") }}
</th>
</tr>
</thead>
<tbody>
<tr
v-for="item in parent.marketInfoList"
:key="item.symbol"
:class="{ active: item.symbol == activeSymbol }"
@click="ispopover1(item.symbol)"
>
<template v-for="parent in contractList">
<div class="px-3 text-primary" :key="parent.coin_name">
{{ parent.coin_name }}
</div>
<table class="table" :key="parent.coin_name + 1">
<thead>
<tr class="text-secondary">
<th class="w-10/24">{{ $t("contract.h5") }}</th>
<th class="w-7/24">{{ $t("contract.g3") }}</th>
<th class="w-7/24 text-right">
{{ $t("contract.h6") }}
</th>
</tr>
</thead>
<tbody>
<!-- @click="activeSymbol = item.symbol" -->
<tr
v-for="item in parent.marketInfoList"
:key="item.symbol"
:class="{ active: item.symbol == activeSymbol }"
@click="ispopover1(item.symbol)"
>
<td class="w-10/24">
{{ item.symbol }}/{{ parent.coin_name }}
</td>
<td
class="w-7/24 "
:class="item.increase < 0 ? 'decreace' : 'increase'"
>
{{ item.price }}
</td>
<td
class="w-7/24"
:class="item.increase < 0 ? 'decreace' : 'increase'"
>
{{ item.increaseStr }}
</td>
</tr>
</tbody>
</table>
</template>
</div>
</el-popover>
</div>
<div
class="price px-3 border-right"
:class="{
decreace: activeContract.increase < 0,
increace: activeContract.increase >= 0
}"
>
<span class="current">{{ activeContract.price }}$</span>
&nbsp;
<span class="zf">{{ activeContract.increaseStr }}</span>
</div>
<!-- 币种价值数据 -->
<div class="d-flex fn-12">
<div class="item px-2">
<div class="title mb-1 text-secondary">
24h {{ $t("contract.h7") }}
</div>
<div>
{{ activeContract.high }}
</div>
</div>
<div class="item px-2">
<div class="title mb-1 text-secondary">
24h {{ $t("contract.h8") }}
</div>
<div>
{{ activeContract.low }}
</div>
</div>
<div class="item px-2">
<div class="title mb-1 text-secondary">
24h {{ $t("contract.h9") }}
<!-- {{ $t("contract.e2") }} -->
(USDT)
</div>
<div>
{{ activeContract.vol }}
</div>
</div>
</div>
</div>
<!-- <div><theme-change /></div> -->
<td class="w-10/24 tr-text">
{{ item.symbol }}/{{ parent.coin_name }}
</td>
<td class="w-7/24 " >
<!-- :class="item.increase < 0 ? 'decreace' : 'increase'" -->
{{ item.close }}
</td>
<td
class="w-7/24 text-right"
:class="item.increase < 0 ? 'decreace' : 'increase'"
>
{{ item.increaseStr }}
</td>
</tr>
</tbody>
</table>
</template>
</div>
</div>
<div class="kline-box flex-fill mr-2">
<div
class="d-flex align-items-center py-2 pl-2 heading justify-content-between" style="border-bottom: 1px solid #2e2e2e;height: 43px;font-size: 16px;"
>图表
</div>
<kline
:activeCoin="{ pair_name: activeContract.pair_name }"
@ -123,28 +122,35 @@
:contract="true"
:wsUrl="wsUrl"
/>
<!-- 交易 -->
<exchange-store
:holdPositionList="holdPositionList"
:symbol="activeSymbol"
:defaultPrice="defaultPrice"
:newPriceObj="newPriceObj"
:contractOpen="contractOpen"
@accountInfo="accountInfo = $event"
@position="holdPosition"
@getSymbolDetail="symbolDetail=$event"
/>
</div>
<!-- 盘口 -->
<handicap
@input="newPriceObj = $event"
@selectprice="defaultPrice = $event"
:symbol="activeSymbol"
:wsUrl="wsUrl"
:ws="ws"
class="mr-2"
ref="handicap"
/>
<!-- 交易 -->
<exchange-store
:holdPositionList="holdPositionList"
:symbol="activeSymbol"
:defaultPrice="defaultPrice"
:newPriceObj="newPriceObj"
:contractOpen="contractOpen"
@accountInfo="accountInfo = $event"
@position="holdPosition"
@getSymbolDetail="symbolDetail=$event"
/>
<div style="width: 20%;">
<!-- 盘口 -->
<handicap
@input="newPriceObj = $event"
@selectprice="defaultPrice = $event"
:symbol="activeSymbol"
:wsUrl="wsUrl"
:ws="ws"
class=""
ref="handicap"
/>
<!-- 合约账户 -->
<div style="margin-top: 8px;">
<account class="bg-plain" :accountInfo="accountInfo"/>
</div>
</div>
</div>
<page-bottom
@position="holdPosition"
@ -231,6 +237,7 @@ export default {
contractOpen: false,
contractAgreement: {},
symbolDetail:{},
currentIcon: ''
};
},
computed: {
@ -286,7 +293,8 @@ export default {
methods: {
ispopover1(item){
this.activeSymbol=item;
this.$refs.popover.showPopper = false;
// this.$refs.popover.showPopper = false;
this.getMarketList();
},
swapMarketList() {
let msg = "swapMarketList";
@ -320,14 +328,28 @@ export default {
},
//
getMarketList() {
this.currentIcon = "";
Contract.getMarketList().then(res => {
this.contractList = res;
//
let firstParent = res[0];
if (firstParent) {
let first = firstParent.marketInfoList[0];
if (first) this.activeSymbol = first.symbol;
if(this.activeSymbol==''){
//
this.contractList = res;
//
let firstParent = res[0];
if (firstParent) {
let first = firstParent.marketInfoList[0];
if (first) this.activeSymbol = first.symbol;
this.currentIcon = res[0].marketInfoList[0].icon;
}
}else{
// icon
for(let item of res[0].marketInfoList){
if(this.activeSymbol==item.symbol){
this.currentIcon = item.icon;
}
}
}
});
},
//
@ -337,7 +359,7 @@ export default {
symbol: (this.holdPositionAll && this.activeSymbol) || ""
};
Contract.holdPosition(data, { loading: false }).then(res => {
console.info(res)
// console.info(res)
res.map(item=>{
if(item.symbol==this.activeContract.symbol) item.realtimePrice=this.activeContract.price
})
@ -382,4 +404,59 @@ export default {
.justify-content-between ::v-deep .dark-app .theme-switch .theme-switch-button .left, .dark-app .theme-switch .theme-switch-button .right{
color:white !important
}
thead th, table td{
font-size: 14px;
}
tbody tr{
cursor: pointer;
}
.page-top table tbody tr:hover{
background-color: #242424;
td:first-child{
color: #2C60DC;
}
}
.page-top table tbody td{
border: none;
}
.decreace{
color: #E33F31;
}
.increase{
color: #6EB189;
}
.decreace2{
color: #BB4965;
}
.text-secondary{
color: #636363 !important;
}
.search_box{
width: 95%;
height: 40px;
margin: 10px auto;
border: 1px solid #2e2e2e;
border-radius: 5px;
color: #2e2e2e;
align-items: center;
i{
width: 40px;
text-align: center;
font-size: 16px;
}
input{
background-color: transparent;
border: none;
border-left: 1px solid #2e2e2e;
padding: 0px 10px;
height: 40px;
font-size: 16px;
color: #fff;
}
}
.min-width-B{
min-width: 130px;
}
</style>

28
src/views/contract/page-bottom.vue

@ -29,7 +29,7 @@
</div>
</div>
<div class="ml-2">
<account class="bg-plain" :accountInfo="accountInfo"/>
<!-- <account class="bg-plain" :accountInfo="accountInfo"/> -->
</div>
</div>
</template>
@ -105,4 +105,30 @@ export default {
width: 367px !important;
font-size: 16px;
}
.page-bottom .nav-link{
padding: 0.5rem 1.35rem !important;
color: #828282;
}
.page-bottom.markets-pair-list .nav{
padding: 7px 0px 0px;
font-size: 16px;
border-bottom: 1px solid #252525;
}
.page-bottom.markets-pair-list .nav-link.active{
color: #fff;
}
.page-bottom.markets-pair-list .nav-link.active::after{
content: "";
display: block;
position: absolute;
bottom: 0px;
left: 50%;
width: 52px;
height: 4px;
background-color: #fff;
border-radius: 0px;
transform: translateX(-50%);
margin-left: 0px;
}
</style>

4
src/views/exchange/book-trades.vue

@ -16,7 +16,7 @@
<tbody class="sell-orders" v-if="symbol!='gitpusdt'">
<div class="order-item" v-for="item in sellList" :key="item.id">
<el-progress class="progress" type="line" :stroke-width="39" :percentage="getValue(item.amount)" :show-text="false" color="rgba(216,43,43,0.15)" define-back-color="#222e3d">
<el-progress class="progress" type="line" :stroke-width="39" :percentage="getValue(item.amount)" :show-text="false" color="rgba(216,43,43,0.15)" define-back-color="#121212">
</el-progress>
<!-- 卖单 使用弹性盒子倒序排列 -->
<tr style="display:block;" class="tb-cells" @click.stop="handleOrder(item.price)">
@ -58,7 +58,7 @@
<tbody class="buy-orders" :style="[{'height':symbol!='gitpusdt'?'':'470px!important'}]">
<!-- 买单 反序数值 -->
<div class="order-item" v-for="item in reversed" :key="item.id">
<el-progress class="progress" type="line" :stroke-width="39" :percentage="getValue(item.amount)" :show-text="false" color="rgba(37, 188, 103, 0.15)" define-back-color="#222e3d">
<el-progress class="progress" type="line" :stroke-width="39" :percentage="getValue(item.amount)" :show-text="false" color="rgba(37, 188, 103, 0.15)" define-back-color="#121212">
</el-progress>
<!-- 卖单 使用弹性盒子倒序排列 -->
<tr style="display:block;" class="tb-cells" @click.stop="handleOrder(item.price)">

2
src/views/option/kline.vue

@ -331,7 +331,7 @@ methods: {
library_path: "/static/Kline/charting_library/",
datafeed: Tdata,
locale: _this.lang,
toolbar_bg: _this.theme == "black" ? "#f1f3f6" : "#222e3d",
toolbar_bg: _this.theme == "black" ? "#121212" : "#121212",
enable_publishing: false,
withdateranges: true,
hide_side_toolbar: false,

2
src/views/otc/ad.vue

@ -166,7 +166,7 @@ export default {
background: linear-gradient(to right, #6d9ef9, #1f5df4);
}
::v-deep .el-dialog {
background-color: #222e3d;
background-color: #121212;
color: #fff;
&__title {
color: #fff;

2
src/views/otc/index.vue

@ -327,7 +327,7 @@ export default {
background: linear-gradient(to right, #6d9ef9, #1f5df4);
}
::v-deep .el-dialog {
background-color: #222e3d;
background-color: #121212;
color: #fff;
&__title {
color: #fff;

2
src/views/otc/order.vue

@ -173,7 +173,7 @@ export default {
background: linear-gradient(to right, #6d9ef9, #1f5df4);
}
::v-deep .el-dialog {
background-color: #222e3d;
background-color: #121212;
color: #fff;
&__title {
color: #fff;

2
src/views/purchase/index.vue

@ -463,7 +463,7 @@ export default {
}
::v-deep {
.el-step__icon {
background: #222e3d;
background: #121212;
}
.el-step__head.is-process {
color: inherit;

19
src/views/wallet/exchange-assets.vue

@ -1,6 +1,22 @@
<template>
<div class="settings wallet-page">
<secondary-nav></secondary-nav>
<!-- 个人信息 -->
<div class="user">
<div style="width: 1200px;margin: 0px auto 50px;">
<div></div>
<div class="d-flex">
<div class="w-7/24">1</div>
<div class="w-7/24">2</div>
<div class="w-7/24">3</div>
</div>
<div class="d-flex">
<div class="w-7/24">4</div>
<div class="w-7/24">5</div>
<div class="w-7/24">5</div>
</div>
</div>
</div>
<!-- 资产 -->
<div class="container">
<div class="w-100 d-flex justify-content-between align-items-center mb-3 mt-4">
@ -875,4 +891,7 @@ created() {
padding: 5px 10px;
border-radius: 30px;
}
.user{
background-color: #262626;
}
</style>

4
static/Kline/charting_library/static/css/tradingview_black.css

@ -6,7 +6,7 @@
.feature-no-touch .chart-controls-bar-buttons a:not(.disabled):hover{background:linear-gradient(135deg,rgba(188,106,188,1) 0%,rgba(104,86,166,1) 100%);}
.header-chart-panel .button,
.feature-no-touch .header-chart-panel .button:active,
.favored-list-container span{background-color: #222e3d; color: #758696; border-color: #222e3d;border-radius:3px;}
.favored-list-container span{background-color: #121212; color: #758696; border-color: #121212;border-radius:3px;}
.chart-controls-bar-buttons a:before{border-color: #2c303b;}
.button.indicators svg,
@ -21,7 +21,7 @@
.charting-mask{display: block; position: absolute; top: 38px; width: 100%; left: 0; bottom: 0;}
.chart-page .layout__area--left [class^="drawingToolbar-"]{background: #222e3d!important;}
.chart-page .layout__area--left [class^="drawingToolbar-"]{background: #121212!important;}
.bottom-widgetbar-content.backtesting .button, .header-chart-panel .button, .hotlist-controls .button, .symbol-edit-widget .button{
padding:4px 4px;
}

Loading…
Cancel
Save