|
@@ -0,0 +1,400 @@
|
|
|
+<template>
|
|
|
+ <div class="container">
|
|
|
+ <div class="content">
|
|
|
+ <div class="tab-box">
|
|
|
+ <div class="tab-text"
|
|
|
+ v-for="(item,i) in tabList" :key="i"
|
|
|
+ :class="tabIndex == i?'active-text':''"
|
|
|
+ @click="tabIndex = i">{{item}}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="information-box">
|
|
|
+ <div class="information-ul">
|
|
|
+ <div class="information-title">当前价(STT)</div>
|
|
|
+ <div class="rate">210.5000</div>
|
|
|
+ <div class="cny">≈CNY1494.5500</div>
|
|
|
+ <div class="balance">钱包余额(WGT)32.2547</div>
|
|
|
+ </div>
|
|
|
+ <div class="information-ul">
|
|
|
+ <div class="information-title">委托数量(WGT)</div>
|
|
|
+ <van-field v-model="num" class="rate" placeholder="请输入WGT数量"/>
|
|
|
+ <div class="cny">≈0.0000STT</div>
|
|
|
+ <div class="balance">钱包余额(STT)1.7359</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <van-button class="information-btn" type="primary" size="large">确认</van-button>
|
|
|
+ <!-- 广告 -->
|
|
|
+ <div class="card-box">
|
|
|
+ <div class="card-ul">
|
|
|
+ <div class="card-li" v-for="(item,i) in cardList" :key="i" >{{item}}</div>
|
|
|
+ </div>
|
|
|
+ <div class="list-ul">
|
|
|
+ <div class="list-li" v-for="item in 20">
|
|
|
+ <div class="list-text">0x70...EEd1</div>
|
|
|
+ <div class="list-text">98.30</div>
|
|
|
+ <div class="list-text">0.354</div>
|
|
|
+ <div class="list-text">
|
|
|
+ <div class="list-btn" @click="isShowDetail = true">买入</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- -->
|
|
|
+ <div class="delegation">
|
|
|
+ <div class="delegation-label">
|
|
|
+ <div :class="delegationIndex == 1?'active-label':''" @click="delegationIndex = 1">当前委托</div>
|
|
|
+ <div :class="delegationIndex == 2?'active-label':''" @click="delegationIndex = 2">大盘成交</div>
|
|
|
+ </div>
|
|
|
+ <div class="delegation-ul">
|
|
|
+ <div class="delegation-li" v-for="item in 10">
|
|
|
+ <template v-if="delegationIndex == 1">
|
|
|
+ <div>
|
|
|
+ <div class="m4"><text class="cell-label green">卖单</text>0x2808...be2f2d</div>
|
|
|
+ <div class="m4 red"><text class="cell-label">委托价值</text>217.200STT</div>
|
|
|
+ <div class="m4 blue"><text class="cell-label">委托数量</text>0.001WGT</div>
|
|
|
+ <div><text class="cell-label">委托时间</text>2025-06-10 14:23:09</div>
|
|
|
+ </div>
|
|
|
+ <div class="green text-ri">
|
|
|
+ <div class="m8">当前价 66.4326545</div>
|
|
|
+ <div style="display: flex;justify-content: flex-end;">
|
|
|
+ <div class="cell-btn red">撤销</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template v-if="delegationIndex == 2">
|
|
|
+ <div>
|
|
|
+ <div class="m4"><text class="cell-label">卖单号</text>0x2808...be2f2d</div>
|
|
|
+ <div class="m4"><text class="cell-label">买单号</text>0x2808...be2f2d</div>
|
|
|
+ <div class="m4 red"><text class="cell-label">成交价</text>217.200STT</div>
|
|
|
+ <div><text class="cell-label">时间</text>2025-06-10 14:23:09</div>
|
|
|
+ </div>
|
|
|
+ <div class="red text-ri">
|
|
|
+ <div class="m4">WGT</div>
|
|
|
+ <div class="m4">价值 66.4326545 STT</div>
|
|
|
+ <div>数量 0.3134 WGT</div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <van-popup v-model:show="isShowDetail" position="bottom" round>
|
|
|
+ <div class="pop-content">
|
|
|
+ <div class="pop-title">
|
|
|
+ <svg-icon style="width: 24px; height: 24px;" name="left-arrow" />
|
|
|
+ <div class="title">交易详情</div>
|
|
|
+ </div>
|
|
|
+ <div class="subtitle">确认提交吗?</div>
|
|
|
+ <div class="address">
|
|
|
+ <div>对方地址</div>
|
|
|
+ <div class="address-text">463dfffhty55yrrq4utgewteuooljmuit34te5y5556jrt74</div>
|
|
|
+ </div>
|
|
|
+ <div class="pop-btn">
|
|
|
+ <van-button type="default" class="btn cancel" @click="isShowDetail = false">取消</van-button>
|
|
|
+ <van-button type="default" class="btn confirm" @click="isShowDetail = false">確定</van-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </van-popup>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script setup>
|
|
|
+const tabList = ['闪充','委托卖出','预约卖出'];
|
|
|
+const cardList = ['地址','价值(STT)','数量(WGT)','操作']
|
|
|
+const tabIndex = ref(1);
|
|
|
+const delegationIndex = ref(2);
|
|
|
+const num = ref('');
|
|
|
+const isShowDetail = ref(false);
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="less" scoped>
|
|
|
+.container{
|
|
|
+ height: calc(100vh - 44px);
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ padding: 16px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ .content{
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ flex: 1;
|
|
|
+ overflow: hidden;
|
|
|
+ .tab-box{
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ gap: 12px;
|
|
|
+ .tab-text{
|
|
|
+ width: calc(100% / 3);
|
|
|
+ background: #E9E9E9;
|
|
|
+ border-radius: 28px;
|
|
|
+ height: 28px;
|
|
|
+ line-height: 28px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ text-align: center;
|
|
|
+ font-family: PingFang SC, PingFang SC;
|
|
|
+ font-weight: 400;
|
|
|
+ font-size: 15px;
|
|
|
+ color: #8D8D8D;
|
|
|
+ }
|
|
|
+ .active-text{
|
|
|
+ background: @theme-color1;
|
|
|
+ font-weight: 500;
|
|
|
+ color: #FFFFFF;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .information-box{
|
|
|
+ display: flex;
|
|
|
+ gap: 12px;
|
|
|
+ margin: 18px 0 16px;
|
|
|
+ .information-ul{
|
|
|
+ width:calc(100% / 2);
|
|
|
+ background-color: #fff;
|
|
|
+ border-radius: 8px;
|
|
|
+ padding: 12px 16px;
|
|
|
+ font-family: PingFang SC, PingFang SC;
|
|
|
+ font-weight: 400;
|
|
|
+ .information-title{
|
|
|
+ font-size: 15px;
|
|
|
+ color: #000000;
|
|
|
+ }
|
|
|
+ .rate{
|
|
|
+ background: #F1F1FF;
|
|
|
+ border-radius: 4px;
|
|
|
+ height: 28px;
|
|
|
+ line-height: 28px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ padding-left:10px;
|
|
|
+ font-weight: 500;
|
|
|
+ font-size: 12px;
|
|
|
+ color: @theme-color1;
|
|
|
+ margin: 10px 0 2px;
|
|
|
+ }
|
|
|
+ .cny{
|
|
|
+ font-size: 10px;
|
|
|
+ color: #8D8D8D;
|
|
|
+ margin-bottom: 8px;
|
|
|
+ }
|
|
|
+ .balance{
|
|
|
+ font-size: 12px;
|
|
|
+ color: #000000;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .information-btn{
|
|
|
+ height: 40px !important;
|
|
|
+ line-height: 40px !important;
|
|
|
+ background: linear-gradient( 90deg, @theme-color1 0%, #40A4FB 100%) !important;
|
|
|
+ border-radius:50px;
|
|
|
+ font-family: PingFang SC, PingFang SC;
|
|
|
+ font-weight: 500;
|
|
|
+ font-size: 15px;
|
|
|
+ padding: 9px 0;
|
|
|
+ box-sizing: border-box;
|
|
|
+ color: #fff;
|
|
|
+ }
|
|
|
+ .card-box{
|
|
|
+ background: #F1F1FF;
|
|
|
+ border-radius: 12px;
|
|
|
+ padding: 10px 0 6px;
|
|
|
+ margin: 16px 0;
|
|
|
+ height: 195px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ .card-ul{
|
|
|
+ margin-bottom: 18px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ .card-li{
|
|
|
+ width: calc(100% / 4);
|
|
|
+ text-align: center;
|
|
|
+ font-family: PingFang SC, PingFang SC;
|
|
|
+ font-weight: 400;
|
|
|
+ font-size: 12px;
|
|
|
+ color: @theme-color1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .list-ul{
|
|
|
+ flex: 1;
|
|
|
+ overflow: auto;
|
|
|
+ .list-li{
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ margin-bottom: 12px;
|
|
|
+ .list-text{
|
|
|
+ width: calc(100% / 4);
|
|
|
+ text-align: center;
|
|
|
+ font-family: PingFang SC, PingFang SC;
|
|
|
+ font-weight: 400;
|
|
|
+ font-size: 10px;
|
|
|
+ color: @font-color2;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ }
|
|
|
+ .list-btn{
|
|
|
+ background: @theme-color1;
|
|
|
+ border-radius: 4px;
|
|
|
+ height: 18px;
|
|
|
+ width: 44px;
|
|
|
+ color: #FFFFFF;
|
|
|
+ box-sizing: border-box;
|
|
|
+ line-height: 18px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .list-ul::-webkit-scrollbar{
|
|
|
+ width: 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .delegation{
|
|
|
+ flex: 1;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ overflow: hidden;
|
|
|
+ .delegation-label{
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-between;
|
|
|
+ margin-bottom: 8px;
|
|
|
+ font-family: PingFang SC, PingFang SC;
|
|
|
+ font-weight: 400;
|
|
|
+ font-size: 12px;
|
|
|
+ color: #000000;
|
|
|
+ }
|
|
|
+ .active-label{
|
|
|
+ font-weight: 500;
|
|
|
+ color: #FF0000;
|
|
|
+ }
|
|
|
+ .delegation-ul{
|
|
|
+ flex: 1;
|
|
|
+ overflow: auto;
|
|
|
+ .delegation-li{
|
|
|
+ border-radius: 8px;
|
|
|
+ border: 1px solid #D8D8D8;
|
|
|
+ padding: 8px 12px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-between;
|
|
|
+ font-family: PingFang SC, PingFang SC;
|
|
|
+ font-weight: 400;
|
|
|
+ font-size: 10px;
|
|
|
+ color: #8D8D8D;
|
|
|
+ box-sizing: border-box;
|
|
|
+ margin-bottom: 10px;
|
|
|
+ .m4{
|
|
|
+ margin-bottom: 4px;
|
|
|
+ }
|
|
|
+ .m8{
|
|
|
+ margin-bottom: 8px;
|
|
|
+ }
|
|
|
+ .text-ri{
|
|
|
+ text-align: right;
|
|
|
+ }
|
|
|
+ .cell-label{
|
|
|
+ width: 48px;
|
|
|
+ display: inline-block;
|
|
|
+ }
|
|
|
+ .cell-btn{
|
|
|
+ height: 19px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ padding: 2px 10px;
|
|
|
+ border-radius: 4px;
|
|
|
+ border: 1px solid #FF0000;
|
|
|
+ }
|
|
|
+ .red{
|
|
|
+ color: #FF0000;
|
|
|
+ }
|
|
|
+ .green{
|
|
|
+ color: #00B42A;
|
|
|
+ }
|
|
|
+ .blue{
|
|
|
+ color: @theme-color1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .delegation-li:last-child{
|
|
|
+ margin-bottom: 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .delegation-ul::-webkit-scrollbar{
|
|
|
+ width: 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .pop-content{
|
|
|
+ .pop-title{
|
|
|
+ padding: 16px;
|
|
|
+ border-bottom: 1px solid #F2F2F2;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ font-family: PingFang SC, PingFang SC;
|
|
|
+ font-weight: 500;
|
|
|
+ font-size: 17px;
|
|
|
+ color: #000000;
|
|
|
+ .title{
|
|
|
+ flex: 1;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ position: relative;
|
|
|
+ left: -15px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .subtitle{
|
|
|
+ text-align: center;
|
|
|
+ margin: 16px 16px 12px;
|
|
|
+ font-family: PingFang SC, PingFang SC;
|
|
|
+ font-weight: 500;
|
|
|
+ font-size: 15px;
|
|
|
+ color: #000000;
|
|
|
+ }
|
|
|
+ .address{
|
|
|
+ margin: 0 16px 24px;
|
|
|
+ background: #F2F2F2;
|
|
|
+ border-radius: 8px;
|
|
|
+ border: 1px solid #D8D8D8;
|
|
|
+ padding: 14px 16px;
|
|
|
+ font-family: PingFang SC, PingFang SC;
|
|
|
+ font-weight: 400;
|
|
|
+ font-size: 15px;
|
|
|
+ color: @font-color2;
|
|
|
+ .address-text{
|
|
|
+ margin-top: 8px;
|
|
|
+ font-size: 12px;
|
|
|
+ color: #8D8D8D;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .pop-btn{
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ margin-bottom: 32px;
|
|
|
+ .btn{
|
|
|
+ width: 96px;
|
|
|
+ height: 32px;
|
|
|
+ line-height: 32px;
|
|
|
+ padding: 6px 0 !important;
|
|
|
+ border-radius: 6px;
|
|
|
+ font-family: PingFang SC, PingFang SC;
|
|
|
+ font-weight: 400;
|
|
|
+ font-size: 15px;
|
|
|
+ box-sizing:border-box;
|
|
|
+ }
|
|
|
+ .cancel{
|
|
|
+ margin-right: 17px !important;
|
|
|
+ border: 1px solid #D8D8D8;
|
|
|
+ color: #000 !important;
|
|
|
+ }
|
|
|
+ .confirm{
|
|
|
+ background: @theme-color1;
|
|
|
+ color: #FFF;
|
|
|
+ font-weight: 500;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+:deep(.van-cell){
|
|
|
+ padding: 0 0 0 10px !important;
|
|
|
+}
|
|
|
+:deep(.van-button--primary){
|
|
|
+ border: none !important;
|
|
|
+}
|
|
|
+</style>
|