From 79782073e2d89dfa12311dbde7855dfd3e0d0a93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=98daijinzheng=40xingtongworld=2Ecom=E2=80=99?= <‘ceshi@qq.com’> Date: Tue, 14 Nov 2023 12:07:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=90=88=E7=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/img/home/history.png | Bin 0 -> 904 bytes main.js | 6 +- pages/exchange/exchange-transaction.vue | 132 +++++++++---- pages/exchange/open-position.vue | 250 +++++++++++++++++++----- pages/exchange/sell-and-buy.vue | 12 +- 5 files changed, 307 insertions(+), 93 deletions(-) create mode 100644 assets/img/home/history.png diff --git a/assets/img/home/history.png b/assets/img/home/history.png new file mode 100644 index 0000000000000000000000000000000000000000..4ecdd0b20c3a744d0bcdf2940b53e5b1542a9226 GIT binary patch literal 904 zcmV;319$w1P)Px#1ZP1_K>z@;j|==^1poj8GD$>1R5(v{RLv{AQ51gW9Yo}_d``_IA2XDd1vW-f zVljpkyCEC?0ah%=LMh7D=Jy{^7D|dF5eo}Kiebq2N60tVea^U30 zo_lTS>FNKJQcnDWw!vnzAt@;d@$vD9iHX7M>non0pYizkDC-1$4D|fKmX?+_rzhTT zTNDn50~Hk&C@wCRIZ2E^2*8z3JVKSQ&R&i0B2`sqR^5EjjXIJbaZq`YQw|B*x%n5I|=lr&}!lH z`Q)GEEW^;ykQ`KddplxdW5qv8SXNdhJC2TyA{-8j8iE8o>4t^|8H7>FO(!NMP*qih zoSYok?e+*E+1+k8?(Xieu&^LO3@{)8ojD8)>E`Ap9v&W0U0sd$_xA{4TwEMV3 z4UEd)Fk~Fp*VnkZxW3wkF zCPr)wCJALHCnt+quywrjQWo1=sEEEpl^n(c0RI^Ye3TZ*NO5TZ3zyvlL9v@Aspt zs|)q@_0n$iVaZ4s*-C?j9UmVTqMn`}G&MCz|B-~C8biubxLht7PN!2I4uc<8kA>%z z%FoXi!jh5_q@<+CVVTopZJ8pkCrh)owk8`fbv;6VK3}XO?{!N{i;%P7$HvAmJv}XI zy1Tojkqy{d-|O>#5}M-k%et19mdb-bWh7)P6%`fzD96mq3~M?6-xr&pBT1R2`RAOr e-{6{MSqEQDv(y^9>Zs2E0000 --> - + - - + + + - + + + - 可用 {{ 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 @@