diff --git a/assets/img/home/history.png b/assets/img/home/history.png new file mode 100644 index 0000000..4ecdd0b Binary files /dev/null and b/assets/img/home/history.png differ diff --git a/main.js b/main.js index a2c6788..55810f9 100644 --- a/main.js +++ b/main.js @@ -3,9 +3,9 @@ import App from './App.vue' import '@/plugins' import i18n from "./i18n"; import store from './store' -// import 'element-ui/lib/theme-chalk/index.css' -// import element from './element/index' -// Vue.use(element) +import 'element-ui/lib/theme-chalk/index.css' +import element from './element/index' +Vue.use(element) //把vuex定义成全局组件 Vue.prototype.$store = store Vue.prototype._i18n = i18n; diff --git a/pages/exchange/exchange-transaction.vue b/pages/exchange/exchange-transaction.vue index fae07aa..6d2b178 100644 --- a/pages/exchange/exchange-transaction.vue +++ b/pages/exchange/exchange-transaction.vue @@ -158,17 +158,26 @@ --> - + - - + + + - + + + - 可用 {{ usable }}{{ usableUnit }} + {{ $t("common.c3") }} {{ usable }}{{ usableUnit }} @@ -321,25 +330,34 @@ --> - - - - - 委托(0) - - - 仓位(0) - - - 资产 + + + @@ -475,7 +493,14 @@ export default { sliderActive:-1, dtime: null, scrollTop:0, - refreshing:false + refreshing:false, + marks:{ + 2: '0%', + 25: '25%', + 50: '50%', + 75: '75%', + 100: '100%', + } }; }, computed: { @@ -549,20 +574,29 @@ export default { return totalMoney; }, // 显示百分比 - activeStep() { - let num = 0; - if (this.form.direction == "buy") { - if (!this.targetBalance.usable_balance) return 0; - num = this.totalMoney / this.targetBalance.usable_balance; - } else if (this.form.direction == "sell") { - if (!this.currentBalance.usable_balance) return 0; - num = this.form.amount / this.currentBalance.usable_balance; - } - if (!isNaN(num)) { - num = num.toFixed(3); - } - return num*100 - }, + // activeStep() { + // let num = 0; + // if (this.form.direction == "buy") { + // if (!this.targetBalance.usable_balance) return 0; + // num = this.totalMoney / this.targetBalance.usable_balance; + // } else if (this.form.direction == "sell") { + // if (!this.currentBalance.usable_balance) return 0; + // num = this.form.amount / this.currentBalance.usable_balance; + // } + // if (!isNaN(num)) { + // num = num.toFixed(3); + // } + // return num*100 + // }, + // 所占百分比 + activeStep() { + return (this.form.amount / this.maxNum) * 100; + }, + activeStep() { + if (!this.form.amount || !this.maxNum) return 0; + let num = (this.form.amount / this.maxNum) * 100; + return num; + }, // 可用数量 usable() { if (this.form.direction == "buy") { @@ -1075,6 +1109,34 @@ export default { // border:1px solid $theme-1!important; border-color: $theme-1!important; } +// 滑块样式 +::v-deep .el-slider__marks-text{ + font-size: 18rpx; +} +::v-deep .el-slider__runway{ + background-color: #2B2B2B; + height: 8rpx; +} +::v-deep .el-slider__bar{ + background-color: white; +} +::v-deep .el-slider__stop{ + background-color: #121212; + border: 2px solid #2B2B2B; + top: -3px; + // border-radius: 10px; +} +::v-deep .el-slider__button{ + width: 20rpx; + height: 20rpx; + border: 2px solid #fff; + background-color: #121212; +} + +.entrust_title{ + display: flex;justify-content: space-between;width: 240px;padding-bottom: 4px; +} + .h-110{ height: 110px; } diff --git a/pages/exchange/open-position.vue b/pages/exchange/open-position.vue index 9d03b9d..bd38df2 100644 --- a/pages/exchange/open-position.vue +++ b/pages/exchange/open-position.vue @@ -1,15 +1,36 @@ - + + + + + + + {{$t("base.d0")}} + + + + + + + + + + + + + - + {{ symbol }} {{ $t("first.b8") }} - + @@ -28,7 +49,7 @@ - + + {{ $t("contract.d5") }} {{ $t("contract.e4") }} (USDT) - + {{accountInfo.totalUnrealProfit}} {{accountInfo.usable_balance}} @@ -58,10 +79,11 @@ }} - + --> + - + 平仓 --> - + - @@ -131,19 +153,26 @@ - - - - USDT - + {{ $t("contract.d8") }}USDT - + --> + + + + + USDT + + @@ -152,11 +181,11 @@ 100% --> - {{item}}% - + --> - + :marks="marks" + :show-tooltip="false" + > @@ -185,12 +216,25 @@ {{ $t("contract.d9") }} {{ margin }} --> + + - + + + + {{ $t("common.c3") }} + + {{ maxNum }} + {{ $t("contract.d8") }} + + + + + + + + + + + {{ $t('contract.i4') }}/{{ $t('contract.i7') }} + + + + + + + + USDT + + + + + + + + USDT + + + @@ -214,11 +286,26 @@ size="small" block class="w-max rounded" - style="background-color: #25A74F;" - > + style="background-color: #25A74F;"> {{ $t("contract.c0") }} - + + + + 可买 + + + {{amount}} BTC + + + + + 成本 + + + -- + + {{ $t("exchange.d0") }} @@ -250,11 +337,27 @@ size="small" block class="w-max rounded" - style="background-color: #CA3F66;" + style="background-color: #CA3F66;" > {{ $t("contract.c2") }} + + + 可卖 + + + {{amount}} BTC + + + + + 成本 + + + -- + + - + + {{ $t("contract.d8") }} - - + --> + + {{ $t('contract.d2') }} - + {{ form.amount}} USDT {{amount}} - + --> + + + + {{ $t("contract.d6") }} + + + {{ + accountInfo.riskRate || "0%" + }} + + \ No newline at end of file diff --git a/pages/exchange/sell-and-buy.vue b/pages/exchange/sell-and-buy.vue index 7d76c46..6063964 100644 --- a/pages/exchange/sell-and-buy.vue +++ b/pages/exchange/sell-and-buy.vue @@ -2,8 +2,8 @@ - {{$t('exchange.d2')}} - {{$t('exchange.c5')}} + {{$t('exchange.d2')}}(USDT) + {{$t('exchange.c5')}}(BTC) @@ -16,7 +16,7 @@ {{omitTo(item.price,2)}} {{omitTo(item.price,4)}} {{omitTo(item.price,6)}} - {{omitTo(item.amount,2)}} + {{omitTo(item.amount,2)}} {{omitTo(item.price,2)}} {{omitTo(item.price,4)}} {{omitTo(item.price,6)}} - {{omitTo(item.amount,2)}} + {{omitTo(item.amount,2)}} @@ -128,10 +128,10 @@ export default { } } .color-buy{ - color: #2A7745; + color: #2C7543; } .color-sell{ - color: #CA3F66; + color: #89334D; } \ No newline at end of file