123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742 |
- <template>
- <view class="contract-box">
- <view class="contract-title">
- <view class="contract-item" @click.stop="openDrawer">
- <view class="title-iocn">
- <text class="title-iocn-item"></text>
- <text class="title-iocn-item"></text>
- <text class="title-iocn-item"></text>
- </view>
- <!-- <image class="title-iocn" src="../../../static/logo.png" mode="aspectFit"></image> -->
- <text class="title-text">ETH/USDT</text>
- </view>
- <view class="contract-item">
- <text class="title-ratio">资金费率:-0.0100%</text>
- <image class="ratio-icon" src="../../../static/logo.png" mode="aspectFit"></image>
- <image class="ratio-icon" src="../../../static/logo.png" mode="aspectFit"></image>
- </view>
- </view>
- <view class="account-box">
- <view class="account-item">
- <view class="account-title">
- <text class="text">持仓保证金USDT]</text>
- </view>
- <text class="account-num">365.26</text>
- </view>
- <view class="account-item">
- <view class="account-title">
- <text class="text">可用保证金(USDT)</text>
- </view>
- <text class="account-num">365.26</text>
- </view>
- <view class="account-item">
- <view class="account-title">
- <text class="text">未实现亏盈(USDT] 三1</text>
- </view>
- <text class="account-num">-0.99</text>
- </view>
- <view class="account-item">
- <view class="account-title">
- <text class="text">净值(USDIL</text>
- </view>
- <text class="account-num">9869.77</text>
- </view>
- <view class="account-item">
- <view class="account-title">
- <text class="text">风险率必</text>
- </view>
- <text class="account-num">9869.77</text>
- </view>
- <view class="account-item">
- <view class="account-title">
- <text class="text">账户余额[USDTI</text>
- </view>
- <text class="account-num">9869.77</text>
- </view>
- </view>
- <gap height="8rpx" />
- <view class="data-box">
- <view class="data-left">
- <view class="left-title flex">
- <text>价格</text>
- <text>数量</text>
- </view>
- <view class="subhead-title flex">
- <text>(USDT)</text>
- <text>(张)</text>
- </view>
- <view class="nums-list">
- <view class="nums-item" v-for="item in 7">
- <text class="nums-item-bg"></text>
- <view class="item-num">
- <text>28516.8</text>
- <text>28516.8</text>
- </view>
- </view>
- </view>
- <view class="left-title index-num-title flex">
- <text>28515.6</text>
- <text>+0.09%</text>
- </view>
- <view class="subhead-title index-title flex">
- <text>指数28523.0</text>
- <text>标记285114</text>
- </view>
- <view class="nums-list" style="padding-top: 6.5rpx;">
- <view class="nums-item" v-for="item in 7">
- <text class="nums-item-bg"></text>
- <view class="item-num">
- <text>28516.8</text>
- <text>28516.8</text>
- </view>
- </view>
- </view>
- </view>
- <view class="data-right">
- <view class="right-select">
- <view class="select-box position-select" @click.stop="selectList = !selectList">
- <text class="select-text">{{ value }}</text>
- <text class="iconfont"></text>
- <view class="select-list" v-show="selectList">
- <text @click.stop="value = item.value ; selectList = false"
- :class="['select-list-item' , value === item.value ? 'active-select-item' : '']"
- v-for="item in range">{{ item.value }}</text>
- </view>
- </view>
- <view class="select-box" @click.stop="adjustLever()">
- <text class="select-text">{{ leverName }}{{ leverNum }}</text>
- <text class="iconfont"></text>
- </view>
- <!-- <uni-data-select :localdata="range" class="select-item" v-model="value"
- @change="change"></uni-data-select>
- <uni-data-select class="select-item" v-model="value" @change="change"></uni-data-select> -->
- </view>
- <view class="right-input input-item-p">
- 市价
- </view>
- <view class="right-input">
- <input class="input-item">
- <view class="right-input-icon">
- <text>张</text>
- <text class="icon-link">|</text>
- <text class="switch-icon iconfont"></text>
- </view>
- </view>
- <view class="step-content">
- <step :width="365"/>
- </view>
- <view class="set-node">
- <view class="set-node-status"></view>
- <text class="set-node-text">设置止盈止损</text>
- </view>
- <view class="info-item">
- <text class="info-item-lable">成本</text>
- <view class="info-item-val">0.00 USDT</view>
- </view>
- <view class="info-item">
- <text class="info-item-lable">可用</text>
- <view class="info-item-val">
- <text>USDT</text>
- <text class="info-item-icon iconfont"></text>
- </view>
- </view>
- <view class="info-btns">
- <view class="info-btn-info">
- <text class="info-btn-lable">可做多</text>
- <text class="info-btn-val">33719张</text>
- </view>
- <view class="info-btn">
- 买入/做多
- </view>
- </view>
- <view class="info-btns err-btns">
- <view class="info-btn-info">
- <text class="info-btn-lable">可做多</text>
- <text class="info-btn-val">33719张</text>
- </view>
- <view class="info-btn">
- 卖出/做空
- </view>
- </view>
- </view>
- </view>
- <!-- 侧边抽屉 -->
- <drawer ref="drawerRef" />
-
- <!-- 调整杠杆 -->
- <lever ref="leverRef" :lever-num.sync="leverNum" :leverName.sync="leverName"/>
- </view>
- </template>
- <script>
- import drawer from "./../modules/drawer.vue"
- import lever from "./lever.vue"
- export default {
- components: {
- drawer,
- lever
- },
- data() {
- return {
- selectList: false,
- value: '市价委托',
- range: [{
- value: '市价委托',
- text: '市价委托'
- },
- {
- value: '限价委托',
- text: '限价委托'
- },
- {
- value: '计划委托',
- text: '计划委托'
- },
- ],
-
- leverName:'全仓',
- leverNum:'100X',
- };
- },
- methods: {
- openDrawer() {
- this.$refs.drawerRef.open();
- },
- change(e) {
- console.log("e:", e);
- },
- adjustLever(){
- this.$nextTick(() => {
- this.$refs.leverRef.open()
- })
- },
- },
- }
- </script>
- <style lang="scss" scoped>
- .contract-box {
- .contract-title {
- padding: 5rpx $pages-padding 0;
- min-height: 78rpx;
- display: flex;
- align-items: center;
- justify-content: space-between;
- .contract-item {
- display: flex;
- align-items: center;
- .title-iocn {
- width: 28rpx;
- height: 24rpx;
- display: flex;
- flex-direction: column;
- // align-items: center;
- justify-content: space-between;
- .title-iocn-item {
- width: 100%;
- height: 4rpx;
- border-radius: 2rpx;
- background: #111111;
- &:first-child {
- width: 50%;
- }
- }
- }
- .title-text {
- font-size: 37rpx;
- font-family: PingFang SC, PingFang SC-Bold;
- font-weight: 700;
- text-align: left;
- color: #141213;
- line-height: 52px;
- letter-spacing: 0.74rpx;
- padding-left: 19rpx;
- }
- .title-ratio {
- font-size: 24rpx;
- font-family: PingFang SC, PingFang SC-Regular;
- font-weight: 400;
- color: #808080;
- line-height: 33rpx;
- }
- .ratio-icon {
- width: 31rpx;
- height: 33rpx;
- margin-left: 22rpx;
- }
- }
- }
- .account-box {
- width: 100%;
- padding: 21rpx $pages-padding;
- display: flex;
- flex-wrap: wrap;
- background-color: #F6F6F6;
- margin-bottom: 25rpx;
- .account-item {
- display: flex;
- flex-direction: column;
- flex-shrink: 0;
- &:nth-child(3n) {
- width: 40%;
- text-align: right;
- }
- &:nth-child(3n - 1) {
- width: 30%;
- text-align: right;
- }
- &:nth-child(3n - 2) {
- width: 30%;
- }
- &:nth-child(n + 4) {
- margin-top: 20rpx;
- }
- .account-title {
- font-size: 22rpx;
- font-family: PingFang SC, PingFang SC-Bold;
- font-weight: 700;
- color: #807e89;
- line-height: 30rpx;
- .text {
- border-bottom: 2rpx dashed #707070;
- }
- }
- .account-num {
- font-size: 24rpx;
- font-family: PingFang SC, PingFang SC-Bold;
- font-weight: 700;
- color: #1a1a1a;
- line-height: 33rpx;
- margin-top: 11rpx;
- }
- }
- }
- }
- .data-box {
- width: 100%;
- padding: 25rpx $pages-padding 0;
- display: flex;
- justify-content: space-between;
- align-items: stretch;
- .data-left {
- width: 303rpx;
- .flex {
- display: flex;
- justify-content: space-between;
- align-items: center;
- }
- .left-title {
- font-size: 24rpx;
- font-family: PingFang SC, PingFang SC-Bold;
- font-weight: 700;
- color: #807e89;
- line-height: 33rpx;
- }
- .subhead-title {
- font-size: 24rpx;
- font-family: PingFang SC, PingFang SC-Bold;
- font-weight: 700;
- color: #807e89;
- line-height: 33rpx;
- }
- .index-num-title {
- font-size: 36rpx;
- font-family: PingFang SC, PingFang SC-Bold;
- font-weight: 700;
- color: #20b482;
- line-height: 50rpx;
- text+text {
- font-size: 28rpx;
- font-family: PingFang SC, PingFang SC-Bold;
- font-weight: 700;
- color: #20b482;
- line-height: 40rpx;
- }
- }
- .index-title {
- font-size: 20rpx;
- color: #808080;
- line-height: 1.2;
- text {
- border-bottom: 2rpx dashed #707070;
- }
- padding-bottom: 18rpx;
- border-bottom: 1px solid #f2f2f2;
- }
- .nums-list {
- width: 100%;
- padding: 10rpx 0 4rpx;
- border-bottom: 1rpx solid #f2f2f2;
- .nums-item {
- width: 100%;
- position: relative;
- height: 40rpx;
- margin-bottom: 4rpx;
- .nums-item-bg {
- position: absolute;
- top: 0;
- right: 0;
- z-index: 1;
- width: 50%;
- height: 100%;
- background-color: #FEEBED;
- }
- .item-num {
- width: 100%;
- height: 100%;
- position: absolute;
- top: 0;
- right: 0;
- z-index: 2;
- display: flex;
- justify-content: space-between;
- align-items: center;
- font-size: 22rpx;
- font-family: PingFang SC, PingFang SC-Bold;
- font-weight: 700;
- color: #ea5162;
- line-height: 33rpx;
- text+text {
- font-weight: 700;
- color: #1a1a1a;
- line-height: 33rpx;
- }
- }
- }
- }
- // <view class="nums-list">
- // <view class="nums-item">
- // <text class="nums-item-bg"></text>
- // <text class="item-num">28516.8</text>
- // <text class="item-num">28516.8</text>
- // </view>
- // </view>
- }
- .data-right {
- width: 365rpx;
- // background-color: green;
- .right-select {
- width: 100%;
- display: flex;
- justify-content: space-between;
- align-items: center;
- .select-box {
- width: 175rpx;
- height: 50rpx;
- display: flex;
- justify-content: space-between;
- align-items: center;
- background-color: #f1f1f1;
- padding: 0 3px;
- border-radius: 4rpx;
- .select-text {
- font-size: 26rpx;
- font-weight: 700;
- }
- .iconfont {
- font-size: 20rpx;
- color: $Theme-Color;
- }
- }
- .position-select {
- position: relative;
- .select-list {
- position: absolute;
- left: 0;
- top: 50rpx;
- width: 185rpx;
- display: flex;
- flex-direction: column;
- background-color: #fff;
- z-index: 1;
- .select-list-item {
- width: 100%;
- height: 70rpx;
- line-height: 70rpx;
- padding: 0 30rpx;
- font-size: 22rpx;
- font-weight: bold;
- color: #c1c1c1;
- }
- .active-select-item {
- background-color: #f1f1f1;
- color: #000;
- }
- }
- }
- // <view class="select-box">
- // <text class="select-text">限价委托</text>
- // <text class="iconfont"></text>
- // </view>
- // <view class="select-box">
- // <text class="select-text">限价委托</text>
- // <text class="iconfont"></text>
- // </view>
- // .select-item {
- // width: 175rpx !important;
- // height: 50rpx;
- // flex: 0;
- // ::v-deep .uni-stat-box {
- // width: 175rpx !important;
- // height: 48rpx;
- // .uni-select {
- // width: 175rpx !important;
- // height: 48rpx;
- // .uni-select__input-box {
- // width: 100%;
- // height: 48rpx !important;
- // }
- // .uniui-clear{
- // display: none;
- // }
- // }
- // }
- // }
- }
- .right-input {
- width: 100%;
- height: 80rpx;
- background: #efefef;
- border-radius: 10rpx;
- margin-top: 20rpx;
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 0 20rpx;
- font-size: 24rpx;
- font-family: PingFang SC, PingFang SC-Bold;
- font-weight: 700;
- color: #808080;
- line-height: 40rpx;
- .input-item {
- height: 100%;
- }
- .input-item-p {
- font-size: 24rpx;
- font-family: PingFang SC, PingFang SC-Bold;
- font-weight: 700;
- color: #808080;
- line-height: 40rpx;
- opacity: 0.3;
- }
- .right-input-icon {
- flex-shrink: 0;
- font-size: 28rpx;
- font-family: PingFang SC, PingFang SC-Bold;
- font-weight: 700;
- color: #808080;
- line-height: 40rpx;
- display: flex;
- align-items: center;
- .icon-link {
- margin: 0 15rpx;
- }
- .icon {
- width: 30rpx;
- height: 26rpx;
- }
- }
- }
- .step-content {
- padding: 24rpx 0 35rpx;
- }
- .set-node {
- width: 100%;
- display: flex;
- align-items: center;
- .set-node-status {
- width: 27rpx;
- height: 27rpx;
- background: #e6e6e8;
- border-radius: 2rpx;
- }
- .set-node-text {
- font-size: 24rpx;
- font-family: PingFang SC, PingFang SC-Regular;
- font-weight: 400;
- color: #808080;
- line-height: 34rpx;
- margin-left: 14rpx;
- border-bottom: 2rpx dashed #707070;
- }
- }
- .info-item {
- width: 100%;
- display: flex;
- justify-content: space-between;
- align-items: center;
- font-size: 26rpx;
- padding: 16rpx 0;
- line-height: 1.1;
- .info-item-lable {
- color: #ccc;
- border-bottom: 1rpx dashed #707070;
- }
- .info-item-val {
- font-size: 22rpx;
- font-weight: bold;
- display: flex;
- align-items: center;
- .info-item-icon {
- font-size: 20rpx;
- margin-left: 20rpx;
- width: 30rpx;
- height: 30rpx;
- background-color: $Theme-Color;
- color: #fff;
- text-align: center;
- line-height: 30rpx;
- border-radius: 6rpx;
- }
- }
- }
- .info-btns {
- width: 100%;
- padding-top: 16rpx;
- .info-btn-info {
- display: flex;
- justify-content: space-between;
- font-size: 24rpx;
- padding-bottom: 10rpx;
- .info-btn-lable {
- color: #ccc;
- }
- .info-btn-val{
- font-weight: bold;
- }
- // <view class="info-btn-info">
- // <text class="info-btn-lable">可做多</text>
- // <text class="info-btn-val">33719张</text>
- // </view>
- }
- .info-btn {
- width: 100%;
- height: 80rpx;
- background-color: $Theme-Color;
- text-align: center;
- line-height: 80rpx;
- font-size: 30rpx;
- color: #fff;
- }
- }
- .err-btns {
- .info-btn {
- background-color: red;
- }
- }
- // <view class="info-btns">
- // <view class="info-btn-info">
- // <text class="info-btn-lable">可做多</text>
- // <text class="info-btn-val">33719张</text>
- // </view>
- // <view class="info-btn">
- // 买入/做多
- // </view>
- // </view>
- // <view class="set-node">
- // <view class="set-node-status"></view>
- // <text class="set-node-text">设置止盈止损</text>
- // </view>
- }
- }
- .switch-icon{
- color: $Theme-Color;
- font-size: 26rpx;
- }
- </style>
|