From 663d2974b925e20601d4f077ed0fad4c4137eecf Mon Sep 17 00:00:00 2001
From: DESKTOP-CVS3R96\我恁爹 <11>
Date: Wed, 09 Nov 2022 05:37:37 +0800
Subject: [PATCH] 123123
---
src/page/user/Warehouse.vue | 1004 +++++++++++++++++++++------------
src/components/foot.vue | 8
src/page/home/home.vue | 9
src/assets/img/youyou.png | 0
src/page/list/trading-list.vue | 730 +++++++++++++++++------
5 files changed, 1,187 insertions(+), 564 deletions(-)
diff --git a/src/assets/img/youyou.png b/src/assets/img/youyou.png
new file mode 100644
index 0000000..a70e1d0
--- /dev/null
+++ b/src/assets/img/youyou.png
Binary files differ
diff --git a/src/components/foot.vue b/src/components/foot.vue
index f985d38..72737a2 100644
--- a/src/components/foot.vue
+++ b/src/components/foot.vue
@@ -19,12 +19,12 @@
</div>
<div :class="$store.state.select == '/trading-list'?'blueFont':''">交易</div>
</div>
- <div :class="touch==3?'footDemos':'footDemo'" @click="goRouter('/orderlist',3)">
+ <div :class="touch==3?'footDemos':'footDemo'" @click="goRouter('/warehouse',3)">
<div class="footImgDeft">
- <img v-show="$store.state.select == '/orderlist'" src="~@/assets/foot/positions_selected.png" />
- <img v-show="$store.state.select != '/orderlist'" src="~@/assets/foot/tab_main_positions_default.png" />
+ <img v-show="$store.state.select == '/warehouse'" src="~@/assets/foot/positions_selected.png" />
+ <img v-show="$store.state.select != '/warehouse'" src="~@/assets/foot/tab_main_positions_default.png" />
</div>
- <div :class="$store.state.select == '/orderlist'?'blueFont':''">仓位</div>
+ <div :class="$store.state.select == '/warehouse'?'blueFont':''">仓位</div>
</div>
<div :class="touch==4?'footDemos':'footDemo'" @click="goRouter('/user',4)">
<div class="footImgDeft">
diff --git a/src/page/home/home.vue b/src/page/home/home.vue
index add45d9..75d22bf 100644
--- a/src/page/home/home.vue
+++ b/src/page/home/home.vue
@@ -408,7 +408,8 @@
},
handleSearchClick() {
- this.loading = !this.loading;
+ //this.loading = !this.loading;
+ this.$router.push({path:"/trading-list",query:{type:1}});
}
},
filters: {
@@ -570,7 +571,7 @@
align-items: center;
.an_left_icon {
- width: 5%;
+ width: 4%;
height: 70%;
display: flex;
align-items: center;
@@ -582,7 +583,7 @@
}
.an_right_message {
- width: 90%;
+ width: 93%;
height: 100%;
line-height: 0.559rem;
align-items: center;
@@ -955,7 +956,7 @@
padding-left: 20px;
-font-size: 12px;
+font-size: 0.29rem;
color: #000;
diff --git a/src/page/list/trading-list.vue b/src/page/list/trading-list.vue
index 9881129..f518010 100644
--- a/src/page/list/trading-list.vue
+++ b/src/page/list/trading-list.vue
@@ -11,25 +11,24 @@
<img src="../../assets/img/searchs.png" alt />
</div>
<div class="search_input">
- <input type="text" class="searchs" placeholder="输入品种名称/代码搜索" />
+ <input type="text" class="searchs" placeholder="输入品种名称/代码搜索" ref="search" id="sousuo" onkeyup="value=value.replace(/[^a-zA-Z0-9]/g,'')" v-model="gpcode" @input="gpinput"/>
</div>
</div>
</div>
</div>
<div class="tab_class">
<div class="scroll_tab">
- <div class="tab_items" v-for="(item, index) in tabsClassArr" :key="index"
- :class="index==0?'mrt':''"
+ <div class="tab_items" v-for="(item, index) in tabsClassArr" :key="index" :class="index == 0 ? 'mrt' : ''"
@click="handleTabsItem(item, index)">
<span :class="tabsItemIndex === index ? 'active' : ''">{{ item.name }}</span>
</div>
</div>
</div>
- <div class="kai_mess" v-show="isToken==''" @click="$router.push('/login')">
+ <div class="kai_mess" v-show="isToken == ''" @click="$router.push('/login')">
<div class="left_identity_img">
<img src="../../assets/img/shenfen2.png" alt />
</div>
- <div class="text" >
+ <div class="text">
<span>{{ '开户即可入金交易' }}</span>
</div>
<div class="right_go">
@@ -47,56 +46,139 @@
<span>{{ '涨跌幅' }}</span>
</div>
</div>
- <div class="list" :class="isToken==''?'listHeight':'listHeights'">
- <van-list
- v-model="loading"
- :finished="finished"
- finished-text="没有更多了"
- @load="onLoad"
->
- <div class="list_items">
- <div class="item" v-for="(item, index) in listArr" :key="index">
- <div class="left_title">
- <div class="tp">
- <span class="collection" @click="options(item)">
- <span class="shu" :class="item.isOption == '1'?'shublue':''"></span>
- </span>
- <span class="title_color">{{ tabsItemIndex == 3 ? item.futuresName : tabsItemIndex == 2?item.name : tabsItemIndex == 0?item.name :item.indexName }}</span>
- </div>
- <div class="bt">
- <span>{{ tabsItemIndex == 3 ? item.futuresCode : tabsItemIndex == 2?item.code : tabsItemIndex == 0?item.code : item.indexCode }}</span>
-
- </div>
- </div>
- <div class="center_price">
- <div class="tp">
- <span class="price_color" v-if="tabsItemIndex == 0||tabsItemIndex == 2" :class="item.hcrate>0?'green':'red'">{{ item.nowPrice
- }}</span>
- <span class="price_color" v-else>{{ tabsItemIndex == 3 ? Number(item.nowPrice).toFixed(2) : item.currentPoint
- }}</span>
- </div>
- <div class="bt">
- <span v-if="tabsItemIndex == 3 ||tabsItemIndex == 1">{{'手续费:'+item.transFee}}</span>
- <span v-else>{{ item.today_min }}</span>
- </div>
- </div>
- <div class="right_bs">
- <div class="tp">
- <span class="price_color" v-if="tabsItemIndex == 0||tabsItemIndex == 2" :class="item.hcrate>0?'green':'red'">{{ item.hcrate }}</span>
- <span class="price_color" v-if="tabsItemIndex == 1" :class="item.floatRate>0?'green':'red'">{{ item.floatRate + '%' }}</span>
- <span class="price_color" v-if="tabsItemIndex == 3" :class="((item.nowPrice - item.lastClose) / item.lastClose * 100).toFixed(2)>0?'green':'red'" >{{ item.lastClose == "" ? 0.00 : ((Number(item.nowPrice) - Number(item.lastClose)) / Number(item.lastClose) * 100).toFixed(2) +'%' }}</span>
- </div>
- <div class="bt">
- <div v-if="tabsItemIndex != 1&&tabsItemIndex != 3">{{item.stock_type.toUpperCase()}}</div>
- <!-- class="codeIcon" -->
+ <div class="list" :class="isToken == '' ? 'listHeight' : 'listHeights'">
+ <van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="onLoad"
+ :immediate-check="false">
+ <div class="van-clearfix">
+ <div class="list_items">
+ <div class="item" v-for="(item, index) in listArr" :key="index">
+ <div class="left_title">
+ <div class="tp">
+ <span class="collection" @click="options(item)">
+ <span class="shu" :class="item.isOption == '1' ? 'shublue' : ''"></span>
+ </span>
+ <span class="title_color">{{ tabsItemIndex == 3 ? item.futuresName : tabsItemIndex ==
+ 2 ? item.name : tabsItemIndex == 0 ? item.name : item.indexName
+ }}</span>
+ </div>
+ <div class="bt">
+ <span>{{ tabsItemIndex == 3 ? item.futuresCode : tabsItemIndex == 2 ? item.code : tabsItemIndex
+ ==
+ 0 ? item.code : item.indexCode
+ }}</span>
+ </div>
+ </div>
+ <div class="center_price">
+ <div class="tp">
+ <span class="price_color" v-if="tabsItemIndex == 0 || tabsItemIndex == 2"
+ :class="item.hcrate > 0 ? 'green' : 'red'">{{ item.nowPrice
+ }}</span>
+ <span class="price_color" v-else>{{ tabsItemIndex == 3 ? Number(item.nowPrice).toFixed(2) :
+ item.currentPoint
+ }}</span>
+ </div>
+ <div class="bt">
+ <span v-if="tabsItemIndex == 3 || tabsItemIndex == 1">{{ '手续费:' + item.transFee }}</span>
+ <span v-else>{{ item.today_min }}</span>
+ </div>
+ </div>
+ <div class="right_bs">
+ <div class="tp">
+ <span class="price_color" v-if="tabsItemIndex == 0 || tabsItemIndex == 2"
+ :class="item.hcrate > 0 ? 'green' : 'red'">{{ item.hcrate }}</span>
+ <span class="price_color" v-if="tabsItemIndex == 1"
+ :class="item.floatRate > 0 ? 'green' : 'red'">{{
+ item.floatRate + '%'
+ }}</span>
+ <span class="price_color" v-if="tabsItemIndex == 3"
+ :class="((item.nowPrice - item.lastClose) / item.lastClose * 100).toFixed(2) > 0 ? 'green' : 'red'">{{
+ item.lastClose == "" ? 0.00 : ((Number(item.nowPrice) - Number(item.lastClose)) /
+ Number(item.lastClose) * 100).toFixed(2) + '%'
+ }}</span>
+ </div>
+ <div class="bt">
+ <div v-if="tabsItemIndex != 1 && tabsItemIndex != 3">{{ item.stock_type.toUpperCase() }}</div>
+ <!-- class="codeIcon" -->
+ </div>
+ </div>
</div>
</div>
</div>
- </div>
-
- </van-list>
+ </van-list>
</div>
+ </div>
+ <div class="bottom_content" v-if="tabsIndex === 0">
+ <!-- 搜索框 -->
+ <div class="search">
+ <div class="search_content">
+ <div class="left_search">
+ <div class="search_img">
+ <img src="../../assets/img/searchs.png" alt />
+ </div>
+ <div class="search_input">
+ <input type="text" class="searchs" placeholder="输入品种名称/代码搜索" onkeyup="value=value.replace(/[^a-zA-Z0-9]/g,'')" v-model="gpcodes" @input="gpinputs" />
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="list_title">
+ <div class="item_title varieties">
+ <span>{{ '品种' }}</span>
+ </div>
+ <div class="item_title latest_price">
+ <span>{{ '最新价' }}</span>
+ </div>
+ <div class="item_title applies">
+ <span>{{ '涨跌幅' }}</span>
+ </div>
+ </div>
+
+ <div class="list zxlist">
+ <van-list v-model="loadings" :finished="finisheds" finished-text="没有更多了" @load="onLoads"
+ :immediate-check="false">
+ <div class="van-clearfix">
+ <div class="list_items">
+ <div class="item" v-for="(item, index) in listArrs" :key="item.indexCode">
+ <div class="left_title">
+ <div class="tp">
+ <span class="collection" @click="optionszx(item)">
+ <span class="shu" :class="item.isOption == '1' ? 'shublue' : ''"></span>
+ </span>
+ <span class="title_color">{{ item.stockName}}</span>
+ </div>
+ <div class="bt">
+ <span>{{ item.stockCode}}</span>
+ </div>
+ </div>
+ <div class="center_price">
+ <div class="tp">
+
+ <span class="price_color">{{item.nowPrice}}</span>
+ </div>
+ <div class="bt">
+
+ <span>{{ item.addTime }}</span>
+ </div>
+ </div>
+ <div class="right_bs">
+ <div class="tp">
+
+ <span class="price_color" :class="item.hcrate > 0 ? 'green' : 'red'">{{ item.hcrate }}</span>
+
+ </div>
+ <div class="bt">
+ <!-- <div>{{ item.stock_type.toUpperCase() }}</div> -->
+ <!-- class="codeIcon" -->
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </van-list>
+
+ </div>
+
</div>
</div>
</div>
@@ -115,13 +197,20 @@
<span>{{ '余额' }}</span>
</div>
<div class="right">
- <span style="white-space: nowarp;" v-show="tabsItemIndex == 1" >{{ '¥ '+$store.state.userInfo.userIndexAmt }}</span>
- <span style="white-space: nowarp;" v-show="tabsItemIndex == 0">{{ '¥ '+$store.state.userInfo.userAmt }}</span>
- <span style="white-space: nowarp;" v-show="tabsItemIndex == 2">{{ '¥ '+$store.state.userInfo.userAmt }}</span>
- <span style="white-space: nowarp;" v-show="tabsItemIndex == 3">{{ '¥ '+$store.state.userInfo.userFuturesAmt }}</span>
+ <span v-if="$store.state.userInfo.userAmt==undefined">¥0.00</span>
+ <span v-if="$store.state.userInfo&&tabsItemIndex == 1" style="white-space: nowarp;" >{{ '¥' + $store.state.userInfo.userIndexAmt
+ }}</span>
+ <span v-if="$store.state.userInfo.userAmt!=undefined&&tabsItemIndex == 0" style="white-space: nowarp;" >{{ '¥ ' + $store.state.userInfo.userAmt
+ }}</span>
+ <span v-if="$store.state.userInfo.userAmt!=undefined&&tabsItemIndex == 2" style="white-space: nowarp;">{{ '¥ ' + $store.state.userInfo.userAmt
+ }}</span>
+ <span v-if="$store.state.userInfo&&tabsItemIndex == 3" style="white-space: nowarp;">{{
+ '¥' + $store.state.userInfo.userFuturesAmt
+ }}</span>
</div>
<div class="sanjiao">
- <img :class="dialogFlag?'xuanz':''" style="transition: all 0.5s;" src="../../assets/img/xiala.png" alt />
+ <img :class="dialogFlag ? 'xuanz' : ''" style="transition: all 0.5s;" src="../../assets/img/xiala.png"
+ alt />
</div>
</div>
<div class="bottom_balance">
@@ -138,41 +227,62 @@
<div><span>{{ '总资产' }}</span></div>
</div>
<div class="bottom_price">
- <div><p v-if="this.$store.state.settingForm.indexDisplay && !this.$store.state.settingForm.futuresDisplay "
- class="account">¥{{$store.state.hide?'****':Number($store.state.userInfo.userAmt +
- $store.state.userInfo.userIndexAmt).toFixed(2)}}</p>
+ <div>
+ <p v-if="this.$store.state.settingForm.indexDisplay && !this.$store.state.settingForm.futuresDisplay"
+ class="account">¥{{ $store.state.hide ? '****' : Number($store.state.userInfo.userAmt +
+ $store.state.userInfo.userIndexAmt).toFixed(2)
+ }}</p>
<p v-else-if="!this.$store.state.settingForm.indexDisplay && this.$store.state.settingForm.futuresDisplay"
- class="account">¥{{$store.state.hide?'****':Number($store.state.userInfo.userAmt +
- $store.state.userInfo.userFuturesAmt).toFixed(2)}}</p>
+ class="account">¥{{ $store.state.hide ? '****' : Number($store.state.userInfo.userAmt +
+ $store.state.userInfo.userFuturesAmt).toFixed(2)
+ }}</p>
<p v-else-if="!this.$store.state.settingForm.indexDisplay && !this.$store.state.settingForm.futuresDisplay"
- class="account">¥{{$store.state.hide?'****':Number($store.state.userInfo.userAmt).toFixed(2)}}</p>
+ class="account">¥{{ $store.state.hide ? '****' : Number($store.state.userInfo.userAmt).toFixed(2) }}</p>
<p v-else-if="this.$store.state.settingForm.indexDisplay && this.$store.state.settingForm.futuresDisplay"
- class="account">¥{{$store.state.hide?'****':Number($store.state.userInfo.userAmt +
- $store.state.userInfo.userIndexAmt + $store.state.userInfo.userFuturesAmt).toFixed(2)}}</p>
- </div>
+ class="account">¥{{ $store.state.hide ? '****' : Number($store.state.userInfo.userAmt +
+ $store.state.userInfo.userIndexAmt + $store.state.userInfo.userFuturesAmt).toFixed(2)
+ }}</p>
+ </div>
</div>
</div>
-
+
<div class="card_item">
<div class="tops_title">
<div><span>{{ '强平线' }}</span></div>
</div>
<div class="bottom_price">
- <div><span v-show="tabsItemIndex == 1">{{$store.state.hide?'****':Number(($store.state.userInfo.enableIndexAmt + $store.state.userInfo.allIndexFreezAmt) * indexSettingInfo.forceSellPercent).toFixed(2)}}</span>
- <span v-show="tabsItemIndex == 0">{{$store.state.hide?'****':Number(($store.state.userInfo.enableAmt + $store.state.userInfo.allFreezAmt) * settingInfo.forceStopPercent).toFixed(2)}} </span>
- <span v-show="tabsItemIndex == 2">{{$store.state.hide?'****':Number(($store.state.userInfo.enableAmt + $store.state.userInfo.allFreezAmt) * settingInfo.forceStopPercent).toFixed(2)}} </span>
- <span v-show="tabsItemIndex == 3">{{$store.state.hide?'****':Number(($store.state.userInfo.enableFuturesAmt + $store.state.userInfo.allFuturesFreezAmt) * futuresSettingInfo.forceSellPercent).toFixed(2)}}</span></div>
+ <div><span v-show="tabsItemIndex == 1">{{ $store.state.hide ? '****' :
+ Number(($store.state.userInfo.enableIndexAmt +
+ $store.state.userInfo.allIndexFreezAmt) * indexSettingInfo.forceSellPercent).toFixed(2)
+ }}</span>
+ <span v-show="tabsItemIndex == 0">{{ $store.state.hide ? '****' : Number(($store.state.userInfo.enableAmt
+ +
+ $store.state.userInfo.allFreezAmt) * settingInfo.forceStopPercent).toFixed(2)
+ }} </span>
+ <span v-show="tabsItemIndex == 2">{{ $store.state.hide ? '****' : Number(($store.state.userInfo.enableAmt
+ +
+ $store.state.userInfo.allFreezAmt) * settingInfo.forceStopPercent).toFixed(2)
+ }} </span>
+ <span v-show="tabsItemIndex == 3">{{ $store.state.hide ? '****' :
+ Number(($store.state.userInfo.enableFuturesAmt +
+ $store.state.userInfo.allFuturesFreezAmt) * futuresSettingInfo.forceSellPercent).toFixed(2)
+ }}</span>
+ </div>
</div>
</div>
<div class="card_item">
<div class="tops_title">
- <div><span>{{tabsItemIndex == 1? '指数':tabsItemIndex == 0?'沪深':tabsItemIndex == 2?'科创':tabsItemIndex == 3?'期货':''}}</span><span>{{ '资产' }}</span></div>
+ <div><span>{{ tabsItemIndex == 1 ? '指数' : tabsItemIndex == 0 ? '沪深' : tabsItemIndex == 2 ? '科创' :
+ tabsItemIndex ==
+ 3 ? '期货' : ''
+ }}</span><span>{{ '资产' }}</span></div>
</div>
<div class="bottom_price">
- <div><span v-show="tabsItemIndex == 1">{{ '¥ '+$store.state.userInfo.userIndexAmt }}</span>
- <span v-show="tabsItemIndex == 0">{{ '¥ '+$store.state.userInfo.userAmt }}</span>
- <span v-show="tabsItemIndex == 2">{{ '¥ '+$store.state.userInfo.userAmt }}</span>
- <span v-show="tabsItemIndex == 3">{{ '¥ '+$store.state.userInfo.userFuturesAmt }}</span></div>
+ <div><span v-show="tabsItemIndex == 1">{{ '¥ ' + $store.state.userInfo.userIndexAmt }}</span>
+ <span v-show="tabsItemIndex == 0">{{ '¥ ' + $store.state.userInfo.userAmt }}</span>
+ <span v-show="tabsItemIndex == 2">{{ '¥ ' + $store.state.userInfo.userAmt }}</span>
+ <span v-show="tabsItemIndex == 3">{{ '¥ ' + $store.state.userInfo.userFuturesAmt }}</span>
+ </div>
</div>
</div>
<div class="card_item">
@@ -180,10 +290,11 @@
<div><span>{{ '可用资金' }}</span></div>
</div>
<div class="bottom_price">
- <div><span v-show="tabsItemIndex == 1">{{ '¥ '+$store.state.userInfo.enableIndexAmt }}</span>
- <span v-show="tabsItemIndex == 0">{{ '¥ '+$store.state.userInfo.enableAmt }}</span>
- <span v-show="tabsItemIndex == 2">{{ '¥ '+$store.state.userInfo.enableAmt }}</span>
- <span v-show="tabsItemIndex == 3">{{ '¥ '+$store.state.userInfo.enableFuturesAmt }}</span></div>
+ <div><span v-show="tabsItemIndex == 1">{{ '¥ ' + $store.state.userInfo.enableIndexAmt }}</span>
+ <span v-show="tabsItemIndex == 0">{{ '¥ ' + $store.state.userInfo.enableAmt }}</span>
+ <span v-show="tabsItemIndex == 2">{{ '¥ ' + $store.state.userInfo.enableAmt }}</span>
+ <span v-show="tabsItemIndex == 3">{{ '¥ ' + $store.state.userInfo.enableFuturesAmt }}</span>
+ </div>
</div>
</div>
<div class="card_item">
@@ -191,10 +302,11 @@
<div><span>{{ '冻结保证金' }}</span></div>
</div>
<div class="bottom_price">
- <div><span v-show="tabsItemIndex == 1">{{ '¥ '+$store.state.userInfo.allIndexFreezAmt }}</span>
- <span v-show="tabsItemIndex == 0">{{ '¥ '+$store.state.userInfo.allFreezAmt }}</span>
- <span v-show="tabsItemIndex == 2">{{ '¥ '+$store.state.userInfo.allFreezAmt }}</span>
- <span v-show="tabsItemIndex == 3">{{ '¥ '+$store.state.userInfo.allFuturesFreezAmt }}</span></div>
+ <div><span v-show="tabsItemIndex == 1">{{ '¥ ' + $store.state.userInfo.allIndexFreezAmt }}</span>
+ <span v-show="tabsItemIndex == 0">{{ '¥ ' + $store.state.userInfo.allFreezAmt }}</span>
+ <span v-show="tabsItemIndex == 2">{{ '¥ ' + $store.state.userInfo.allFreezAmt }}</span>
+ <span v-show="tabsItemIndex == 3">{{ '¥ ' + $store.state.userInfo.allFuturesFreezAmt }}</span>
+ </div>
</div>
</div>
<div class="card_item">
@@ -202,10 +314,19 @@
<div><span>{{ '持仓总盈亏' }}</span></div>
</div>
<div class="bottom_price">
- <div><span :class="$store.state.userInfo.allIndexProfitAndLose>0?' red':$store.state.userInfo.allIndexProfitAndLose<0?' green':''" v-show="tabsItemIndex == 1">{{ '¥ '+$store.state.userInfo.allIndexProfitAndLose }}</span>
- <span :class="$store.state.userInfo.allProfitAndLose>0?' red':$store.state.userInfo.allProfitAndLose<0?' green':''" v-show="tabsItemIndex == 0">{{ '¥ '+$store.state.userInfo.allProfitAndLose }}</span>
- <span :class="$store.state.userInfo.allProfitAndLose>0?' red':$store.state.userInfo.allProfitAndLose<0?' green':''" v-show="tabsItemIndex == 2">{{ '¥ '+$store.state.userInfo.allProfitAndLose }}</span>
- <span :class="$store.state.userInfo.allFuturesProfitAndLose>0?'red':$store.state.userInfo.allFuturesProfitAndLose<0?' green':''" v-show="tabsItemIndex == 3">{{ '¥ '+Number($store.state.userInfo.allFuturesProfitAndLose).toFixed(2)}}</span></div>
+ <div><span
+ :class="$store.state.userInfo.allIndexProfitAndLose > 0 ? ' red' : $store.state.userInfo.allIndexProfitAndLose < 0 ? ' green' : ''"
+ v-show="tabsItemIndex == 1">{{ '¥ ' + $store.state.userInfo.allIndexProfitAndLose }}</span>
+ <span
+ :class="$store.state.userInfo.allProfitAndLose > 0 ? ' red' : $store.state.userInfo.allProfitAndLose < 0 ? ' green' : ''"
+ v-show="tabsItemIndex == 0">{{ '¥ ' + $store.state.userInfo.allProfitAndLose }}</span>
+ <span
+ :class="$store.state.userInfo.allProfitAndLose > 0 ? ' red' : $store.state.userInfo.allProfitAndLose < 0 ? ' green' : ''"
+ v-show="tabsItemIndex == 2">{{ '¥ ' + $store.state.userInfo.allProfitAndLose }}</span>
+ <span
+ :class="$store.state.userInfo.allFuturesProfitAndLose > 0 ? 'red' : $store.state.userInfo.allFuturesProfitAndLose < 0 ? ' green' : ''"
+ v-show="tabsItemIndex == 3">{{ '¥ '+Number($store.state.userInfo.allFuturesProfitAndLose).toFixed(2)}}</span>
+ </div>
</div>
</div>
</div>
@@ -228,18 +349,23 @@
tabClassActive: 1,
dialogFlag: false,
pageNum: 1,
+ pageNums: 1,
stockPlate: "",
alertShow: false,
- isToken:'',
+ isToken: '',
elType: "warning",
indexSettingInfo: {},
- futuresSettingInfo:{},
- settingInfo:{},
+ futuresSettingInfo: {},
+ settingInfo: {},
loading: false,
+ loadings: false,
finished: false,
+ finisheds: false,
+ gpcode: "",
+ gpcodes: "",
texts: "",
tabsClassArr: [
- {
+ {
name: "沪深京",
type: 0
},
@@ -247,7 +373,7 @@
name: "指数",
type: 1
},
-
+
{
name: "科创",
type: 2
@@ -259,21 +385,106 @@
],
tabsItemIndex: 0,
listArr: [],
+ listArrs: [],
};
},
+
+ created() {
+ if(this.$route.query.type==1){
+ //选中sousuo输入框
+ this.$nextTick(() => {
+ this.$refs.search.focus();
+ })
+ }
+
+
+ },
+
mounted() {
+ this.loading=true;
this.getStock();
- this.isToken=window.localStorage.getItem('USERTOKEN')
+ this.isToken = window.localStorage.getItem('USERTOKEN')
this.getUserInfo()
this.getIndexSettingInfo()
this.getSettingInfo()
this.getFuturesSetting()
},
methods: {
+ onLoad() {
+ this.pageNum++;
+ // 异步更新数据
+ // setTimeout 仅做示例,真实场景中一般为 ajax 请求
+ switch (this.tabsItemIndex) {
+ case 1:
+ this.loading = true;
+ this.getListMarket();
+ break;
+ case 0:
+ this.stockPlate = "";
+ this.loading = true;
+ this.getStock();
+ break;
+ case 2:
+ this.stockPlate = "科创";
+ this.loading = true;
+ this.getStocks();
+ break;
+ case 3:
+ this.loading = true;
+ this.getFutures();
+ break;
+ }
+
+ // 加载状态结束
+ // this.loading = false;
+
+ // 数据全部加载完成
+ // if (this.list.length >= 40) {
+ // this.finished = true;
+ // }
+ },
+ gpinput() {
+ this.pageNum = 1;
+ this.listArr = [];
+ this.loading = true;
+ this.finished = false;
+ switch (this.tabsItemIndex) {
+ case 1:
+
+ this.getListMarket();
+ break;
+ case 0:
+ this.stockPlate = "";
+
+ this.getStock();
+ break;
+ case 2:
+ this.stockPlate = "科创";
+
+ this.getStocks();
+ break;
+ case 3:
+
+ this.getFutures();
+ break;
+ }
+ },
+ gpinputs() {
+ this.pageNums= 1;
+ this.listArrs = [];
+ this.loadings = true;
+ this.finisheds = false;
+ this.getMyList();
+ },
+ onLoads() {
+ this.pageNums++;
+ this.loadings = true;
+ this.getMyList();
+ },
closeAlert() {
this.alertShow = false;
},
- async getUserInfo () {
+ async getUserInfo() {
// 获取用户信息
// let showcookie = this.getCookie('USER_TOKEN');
let data = await api.getUserInfo()
@@ -285,7 +496,7 @@
}
this.$store.state.user = this.user
},
- async getIndexSettingInfo () {
+ async getIndexSettingInfo() {
// 网站设置信息 指数
let data = await api.getIndexSetting()
if (data.status === 0) {
@@ -295,7 +506,7 @@
Toast(data.msg)
}
},
- async getFuturesSetting () {
+ async getFuturesSetting() {
// 网站设置信息 期货
let data = await api.getFuturesSetting()
if (data.status === 0) {
@@ -305,7 +516,7 @@
Toast(data.msg)
}
},
- async getSettingInfo () {
+ async getSettingInfo() {
let data = await api.getSetting()
if (data.status === 0) {
// 成功
@@ -315,11 +526,21 @@
}
},
async getListMarket() {
-
+ let val = {
+ pageNum: this.pageNum,
+ pageSize: 15,
+
+ };
// 获取指数列表
- let result = await api.getListMarket()
+ let result = await api.getListMarket(val)
+ this.loading = false;
if (result.status === 0) {
- this.listArr = result.data
+
+ if (this.tabsItemIndex == 1) {
+ this.listArr = result.data
+ this.finished = true;
+ }
+
} else {
this.texts = result.msg;
this.alertShow = true;
@@ -331,12 +552,45 @@
pageNum: this.pageNum,
pageSize: 15,
stockPlate: this.stockPlate,
+ keyWords:this.gpcode,
}
let data = await api.getStock(opt)
+ this.loading = false;
if (data.status === 0) {
- data.data.list.forEach(element => {
- this.listArr.push(element)
- })
+
+ if (data.data.list.length < 15) {
+ this.finished = true;
+ }
+ if (this.tabsItemIndex == 0) {
+ data.data.list.forEach(element => {
+ this.listArr.push(element)
+ })
+ }
+ } else {
+ this.texts = data.msg;
+ this.alertShow = true;
+ }
+ },
+ async getStocks() {
+ //科创
+ let opt = {
+ pageNum: this.pageNum,
+ pageSize: 15,
+ stockPlate: this.stockPlate,
+ keyWords:this.gpcode,
+ }
+ let data = await api.getStock(opt)
+ this.loading = false;
+ if (data.status === 0) {
+
+ if (data.data.list.length < 15) {
+ this.finished = true;
+ }
+ if (this.tabsItemIndex == 2) {
+ data.data.list.forEach(element => {
+ this.listArr.push(element)
+ })
+ }
} else {
this.texts = data.msg;
this.alertShow = true;
@@ -350,25 +604,61 @@
pageSize: 15
}
let data = await api.getListFutures(opt)
+ this.loading = false;
+ if (data.data.length < 15) {
+ this.finished = true;
+ }
if (data.status === 0) {
- console.log(this.tabsItemIndex)
- this.listArr = data.data
- console.log("期货", this.listArr)
+ if (this.tabsItemIndex == 3) {
+ data.data.forEach(element => {
+ this.listArr.push(element)
+ })
+ }
} else {
this.texts = data.msg;
this.alertShow = true;
}
},
+ async getMyList() {
+ this.loadings = true;
+ //获取自选列表
+ let opt = {
+ pageNum: this.pageNums,
+ pageSize: 15,
+ keyWords:this.gpcodes,
+ }
+ let data = await api.getMyList(opt)
+ this.loadings = false;
+ if (data.status == 0) {
+ data.data.list.forEach(element => {
+ this.listArrs.push(element)
+ })
+ }
+ if (data.data.list.length < 15) {
+ this.finisheds = true;
+ }
+ },
handleTabsClick(item, index) {
if (index == 0) {
- if(this.dialogFlag){
+ if (this.dialogFlag) {
this.$refs['topTitle'].style.height = '1.2821rem'
- setTimeout(() => {
- this.dialogFlag = false;
+ setTimeout(() => {
+ this.dialogFlag = false;
+
+ this.listArrs = [];
+ this.pageNums = 1;
+ this.finisheds = false;
+ this.tabsIndex = index;
+ this.getMyList();
+
+ }, 800);
+ } else {
+ this.listArrs = [];
+ this.pageNums = 1;
+ this.finisheds = false;
this.tabsIndex = index;
- }, 800);
- }else{
- this.tabsIndex = index;
+ this.getMyList();
+
}
} else {
this.tabsIndex = index;
@@ -376,6 +666,9 @@
},
handleTabsItem(item, index) {
this.tabsItemIndex = index;
+ this.pageNum = 1;
+ this.finished = false;
+ this.loading = true;
switch (item.type) {
case 1:
this.listArr = [];
@@ -389,7 +682,7 @@
case 2:
this.stockPlate = "科创"
this.listArr = [];
- this.getStock();
+ this.getStocks();
break;
case 3:
this.listArr = [];
@@ -398,86 +691,112 @@
}
},
async options(val) {
- if(val.isOption=='1'){
- let data = await api.delOption({ code: val.indexCode })
- if (data.status === 0) {
- switch (this.tabsItemIndex) {
- case 1:
- this.listArr = [];
- this.getListMarket();
- break;
+ var codes = "";
+ switch (this.tabsItemIndex) {
case 0:
- this.stockPlate = ""
- this.listArr = [];
- this.getStock();
+ codes = val.code;
+ break;
+ case 1:
+ codes = val.indexGid;
break;
case 2:
- this.stockPlate = "科创"
- this.listArr = [];
- this.getStock();
+ codes = val.code;
break;
case 3:
- this.listArr = [];
- this.getFutures();
+ codes = val.futuresGid;
break;
- }
- this.refreshList()
- } else {
-
+ default:
+ break;
}
- }else{
- var codes="";
- switch (this.tabsItemIndex) {
-
- case 0:
- codes = val.code;
- break;
-
+ if (val.isOption == '1') {
+ let data = await api.delOption({ code: codes })
+ if (data.status === 0) {
+ switch (this.tabsItemIndex) {
case 1:
- codes = val.indexGid;
- break;
+ this.pageNum = 1;
+ this.listArr = [];
+ this.loading = true;
+ this.finished = false;
+ this.getListMarket();
+ break;
+ case 0:
+ this.stockPlate = "";
+ this.pageNum = 1;
+ this.loading = true;
+ this.listArr = [];
+ this.finished = false;
+ this.getStock();
+ break;
case 2:
- codes = val.code;
- break;
+ this.stockPlate = "科创";
+ this.pageNum = 1;
+ this.loading = true;
+ this.listArr = [];
+ this.finished = false;
+ this.getStocks();
+ break;
case 3:
- codes = val.futuresGid;
- break;
-
- default:
- break;
- }
-
- let data = await api.addOption({ code: codes });
- if (data.status === 0) {
- switch (this.tabsItemIndex) {
- case 1:
- this.listArr = [];
- this.getListMarket();
- break;
- case 0:
- this.stockPlate = ""
- this.listArr = [];
- this.getStock();
- break;
- case 2:
- this.stockPlate = "科创"
- this.listArr = [];
- this.getStock();
- break;
- case 3:
- this.listArr = [];
- this.getFutures();
- break;
+ this.listArr = [];
+ this.loading = true;
+ this.pageNum = 1;
+ this.finished = false;
+ this.getFutures();
+ break;
+ }
+ this.refreshList()
+ } else {
+ console.log(data.msg)
}
} else {
-
+ let data = await api.addOption({ code: codes });
+ if (data.status === 0) {
+ switch (this.tabsItemIndex) {
+ case 1:
+ this.listArr = [];
+ this.pageNum = 1;
+ this.finished = false;
+ this.getListMarket();
+ break;
+ case 0:
+ this.stockPlate = ""
+ this.pageNum = 1;
+ this.finished = false;
+ this.listArr = [];
+ this.getStock();
+ break;
+ case 2:
+ this.stockPlate = "科创"
+ this.pageNum = 1;
+ this.finished = false;
+ this.listArr = [];
+ this.getStocks();
+ break;
+ case 3:
+ this.listArr = [];
+ this.pageNum = 1;
+ this.finished = false;
+ this.getFutures();
+ break;
+ }
+ } else {
+ console.log(data.msg)
+ }
}
- }
-
+ },
+ async optionszx(val) {
+ let data = await api.delOption({ code: val.stockGid })
+ if (data.status === 0) {
+ this.listArrs = [];
+ this.pageNums = 1;
+ this.finisheds = false;
+ this.getMyList()
+ } else {
+ console.log(data.msg)
+ }
},
- async refreshList () {
+ async refreshList() {
// 刷新指数
if (this.loading) {
return
@@ -559,7 +878,7 @@
align-items: center;
justify-content: center;
padding: 0 0.3rem;
-
+ position: relative;
.search_content {
width: 100%;
height: 90%;
@@ -621,6 +940,7 @@
transition: all 0.5s;
overflow: hidden;
border-radius: 0 0 0.2rem 0.2rem;
+
>div {
width: 100%;
height: 1.2821rem;
@@ -630,7 +950,7 @@
}
.tabs_title {
- width: 23%;
+ width: 26%;
height: 100%;
display: flex;
}
@@ -746,7 +1066,7 @@
.list {
width: 100%;
-
+
overflow-x: auto;
padding-bottom: 1.2821rem;
padding: 0 0.3rem;
@@ -883,7 +1203,7 @@
height: 70%;
display: flex;
align-items: center;
- justify-content: space-between;
+
.left {
width: 0.8rem;
@@ -895,7 +1215,7 @@
display: flex;
align-items: center;
justify-content: center;
-
+
span {
display: inline-block;
@@ -911,8 +1231,12 @@
align-items: center;
justify-content: flex-end;
white-space: nowrap;
+ margin-left: 0.1rem;
+ margin-right: 0.1rem;
+ min-width: 1.9rem;
span {
font-weight: 600;
+ text-align: right;
}
}
}
@@ -926,7 +1250,7 @@
color: #acaeaf;
transform: scale(0.9);
margin-left: 0.2rem;
- padding-right: 0.48rem;
+ padding-right: 0.68rem;
}
}
@@ -970,54 +1294,65 @@
.shai.open {
top: 4%;
}
+
.cards {
width: 100%;
display: flex;
flex-wrap: wrap;
}
+
.card_item {
width: 48%;
height: 1.5385rem;
background: #f6f6f7;
border-radius: .2rem;
margin-top: 0.2rem;
- .tops_title{
+
+ .tops_title {
width: 100%;
height: 40%;
display: flex;
align-items: flex-end;
padding-left: .5rem;
}
+
.bottom_price {
width: 100%;
height: 60%;
display: flex;
align-items: center;
padding-left: .5rem;
+
span {
font-weight: 600;
}
}
}
-.shublue{
- background: #0263e2!important;
+
+.shublue {
+ background: #0263e2 !important;
}
-.xuanz{
+
+.xuanz {
//旋转
transform: rotate(180deg);
transition: all 0.5s;
}
-.red{
+
+.red {
color: #ff0000;
}
-.green{
+
+.green {
color: #27ab63;
}
-.mrt{
+
+.mrt {
margin-right: 0.35rem;
}
-.codeIcon{
+
+.codeIcon {
width: 0.6rem;
height: 0.6rem;
background-color: #0263e2;
@@ -1031,10 +1366,21 @@
justify-content: center;
align-items: center;
}
-.listHeight{
+
+.listHeight {
height: calc(100% - 1.2821rem - 1rem - 1.1538rem - 1.3333rem);
}
-.listHeights{
+
+.listHeights {
height: calc(100% - 1rem - 1.1538rem - 1.3333rem);
}
+
+.zxlist {
+ height: calc(100% - 1rem - 1rem);
+ padding-bottom: 0.2rem;
+}
+
+/deep/.van-list__loading {
+ margin-top: 0.2rem;
+}
</style>
\ No newline at end of file
diff --git a/src/page/user/Warehouse.vue b/src/page/user/Warehouse.vue
index c88d750..fc3e8ed 100644
--- a/src/page/user/Warehouse.vue
+++ b/src/page/user/Warehouse.vue
@@ -5,7 +5,7 @@
<div class="titles">
<div class="left_title" @click="handleOpenDialog()">
<div class="title">
- <span>{{ '模拟账户' }}</span>
+ <span>{{ titleName }}</span>
</div>
<div class="img">
<img src="../../assets/img/xiala.png" alt />
@@ -13,12 +13,28 @@
</div>
<div class="right_box"></div>
</div>
- <div class="overflow_box item">
+ <div class="overflow_box item" @click="SetTitleIndex(0)">
<div class="left_titles">
- <span>{{ '虚拟账户' }}</span>
+ <span>{{ '沪深京账户' }}</span>
</div>
<div class="right_price">
- <span>{{ '净值: ¥49,611.0' }}</span>
+ <span>{{ '' }}</span>
+ </div>
+ </div>
+ <div class="overflow_box item" @click="SetTitleIndex(1)">
+ <div class="left_titles">
+ <span>{{ '指数账户' }}</span>
+ </div>
+ <div class="right_price">
+ <span>{{ '' }}</span>
+ </div>
+ </div>
+ <div class="overflow_box item" @click="SetTitleIndex(2)">
+ <div class="left_titles">
+ <span>{{ '期货账户' }}</span>
+ </div>
+ <div class="right_price">
+ <span>{{ '' }}</span>
</div>
</div>
</div>
@@ -26,42 +42,88 @@
<div class="top_card">
<div class="card_content">
<div class="t_title">
- <span>{{ '净值(USD)' }}</span>
+ <span>{{ '总资产' }}</span>
</div>
<div class="t_price">
- <span class="price">{{ '49,619.05' }}</span>
- <span class="profits">{{ '-370.00' }}</span>
+ <!-- <span class="price">{{ '49,619.05' }}</span>
+ <span class="profits">{{ '-370.00' }}</span> -->
+ <p v-if="this.$store.state.settingForm.indexDisplay && !this.$store.state.settingForm.futuresDisplay"
+ class="price">¥{{ $store.state.hide ? '****' : Number($store.state.userInfo.userAmt +
+ $store.state.userInfo.userIndexAmt).toFixed(2)
+ }}</p>
+ <p v-else-if="!this.$store.state.settingForm.indexDisplay && this.$store.state.settingForm.futuresDisplay"
+ class="price">¥{{ $store.state.hide ? '****' : Number($store.state.userInfo.userAmt +
+ $store.state.userInfo.userFuturesAmt).toFixed(2)
+ }}</p>
+ <p v-else-if="!this.$store.state.settingForm.indexDisplay && !this.$store.state.settingForm.futuresDisplay"
+ class="price">¥{{ $store.state.hide ? '****' : Number($store.state.userInfo.userAmt).toFixed(2) }}</p>
+ <p v-else-if="this.$store.state.settingForm.indexDisplay && this.$store.state.settingForm.futuresDisplay"
+ class="price">¥{{ $store.state.hide ? '****' : Number($store.state.userInfo.userAmt +
+ $store.state.userInfo.userIndexAmt + $store.state.userInfo.userFuturesAmt).toFixed(2)
+ }}</p>
+ <!-- <span class="profits" v-show="titleIndex == 1">{{ '¥ ' + $store.state.userInfo.userIndexAmt }}</span>
+ <span class="profits" v-show="titleIndex == 0">{{ '¥ ' + $store.state.userInfo.userAmt }}</span>
+ <span class="profits" v-show="titleIndex == 2">{{ '¥ ' + $store.state.userInfo.userFuturesAmt }}</span> -->
</div>
<div class="balance">
<div class="left_titles">
- <span>{{ '可用余额' }}</span>
+ {{ '强平线' }}
</div>
<div class="right_titles">
- <span>{{ '保证金水平' }}</span>
+ {{ '可用资金' }}
</div>
</div>
<div class="num">
<div class="left_price">
- <span>{{ '49,386.26' }}</span>
+ <span v-show="titleIndex == 1">{{ $store.state.hide ? '****' :
+ Number(($store.state.userInfo.enableIndexAmt +
+ $store.state.userInfo.allIndexFreezAmt) * indexSettingInfo.forceSellPercent).toFixed(2)
+ }}</span>
+ <span v-show="titleIndex == 0">{{ $store.state.hide ? '****' : Number(($store.state.userInfo.enableAmt
+ +
+ $store.state.userInfo.allFreezAmt) * settingInfo.forceStopPercent).toFixed(2)
+ }} </span>
+
+ <span v-show="titleIndex == 2">{{ $store.state.hide ? '****' :
+ Number(($store.state.userInfo.enableFuturesAmt +
+ $store.state.userInfo.allFuturesFreezAmt) * futuresSettingInfo.forceSellPercent).toFixed(2)
+ }}</span>
</div>
<div class="right_margin">
- <span>{{ '21314.94%' }}</span>
+ <span v-show="titleIndex == 1">{{ '¥ ' + $store.state.userInfo.enableIndexAmt }}</span>
+ <span v-show="titleIndex == 0">{{ '¥ ' + $store.state.userInfo.enableAmt }}</span>
+
+ <span v-show="titleIndex == 2">{{ '¥ ' + $store.state.userInfo.enableFuturesAmt }}</span>
</div>
</div>
<div class="margin">
<div class="left_titles">
- <span>{{ '保证金' }}</span>
+ {{ '冻结保证金' }}
</div>
<div class="right_titles">
- <span>{{ '维持保证金' }}</span>
+ {{ '持仓总盈亏' }}
</div>
</div>
<div class="prices">
<div class="left_titles">
- <span>{{ '232.79' }}</span>
+ <span class="numDemo" v-show="titleIndex == 1">{{ '¥ ' + $store.state.userInfo.allIndexFreezAmt? $store.state.userInfo.allIndexFreezAmt:'0.00'
+ }}</span>
+ <span class="numDemo" v-show="titleIndex == 0">{{ '¥ ' + $store.state.userInfo.allFreezAmt?$store.state.userInfo.allFreezAmt :'0.00'}}</span>
+ <span class="numDemo" v-show="titleIndex == 2">{{ '¥ ' + $store.state.userInfo.allFuturesFreezAmt?$store.state.userInfo.allFuturesFreezAmt:'0.00'
+ }}</span>
</div>
<div class="right_titles">
- <span>{{ '116.40' }}</span>
+ <span class="numDemo"
+ :class="$store.state.userInfo.allIndexProfitAndLose > 0 ? ' red' : $store.state.userInfo.allIndexProfitAndLose < 0 ? ' green' : ''"
+ v-show="titleIndex == 1">{{ '¥ ' + $store.state.userInfo.allIndexProfitAndLose?$store.state.userInfo.allIndexProfitAndLose:'0.00' }}</span>
+ <span class="numDemo"
+ :class="$store.state.userInfo.allProfitAndLose > 0 ? ' red' : $store.state.userInfo.allProfitAndLose < 0 ? ' green' : ''"
+ v-show="titleIndex == 0">{{ '¥ ' + $store.state.userInfo.allProfitAndLose?$store.state.userInfo.allProfitAndLose:'0.00' }}</span>
+
+ <span class="numDemo"
+ :class="$store.state.userInfo.allFuturesProfitAndLose > 0 ? 'red' : $store.state.userInfo.allFuturesProfitAndLose < 0 ? ' green' : ''"
+ v-show="titleIndex == 2">{{ '¥'+$store.state.userInfo.allFuturesProfitAndLose?Number($store.state.userInfo.allFuturesProfitAndLose).toFixed(2):'0.00'}}</span>
+
</div>
</div>
</div>
@@ -69,82 +131,98 @@
<div class="tabs_card">
<div class="tabs_card_content">
<div class="tabs_top_title">
- <div
- class="title_items"
- v-for="(item, index) in tabsArr"
- :key="index"
- @click="handleTabsClick(item, index)"
- >
- <span :class="tabsCurrentIndex === index ? 'active' : ''">{{ item }}</span>
+ <div class="title_items" v-for="(item, index) in tabsArr" :key="index"
+ @click="handleTabsClick(item, index)" :class="index == 0 ? 'kuan' : 'kuan'">
+ <span :class="tabsCurrentIndex === index ? 'active' : ''">{{ item }}{{ index == 0 ? '(' + total + ')' : '(' + totals + ')'}}</span>
</div>
</div>
<!-- 持仓 currentIndex: 0 -->
<div class="over">
- <div class="tabs_o" v-if="tabsCurrentIndex === 0">
- <div class="tabs_o_items" v-for="(item, index) in tabsPositionNumArr" :key="index">
- <div class="tabs_o_title">
- <span class="title">{{ item.name }}</span>
- <span class="buy_to_sell">{{ item.mr }}</span>
- <span class="multiple">{{ item.multiple + 'X' }}</span>
- <span class="nums">{{ item.hd + '手'}}</span>
- </div>
- <div class="center_price">
- <div class="profit">
- <span>{{ item.ProfitLoss }}</span>
+
+ <van-list v-model="loading" :finished="finished" finished-text="没有更多了" v-show="tabsCurrentIndex === 0&&total != 0" @load="onLoad" :immediate-check="immediate">
+ <div class="tabs_o" >
+ <div class="tabs_o_items" v-for="(item, index) in tabsPositionNumArr" :key="item.buyOrderId">
+ <div class="tabs_o_title">
+ <span class="title">{{ item.stockName }}</span>
+ <span class="buy_to_sell" :class="item.orderDirection=='买跌'?'maichu':'mairu'">{{ item.orderDirection=="买跌"?'卖出':'买入' }}</span>
+ <span class="multiple">{{ item.allProfitAndLose }}</span>
+ <span class="nums">{{ item.orderNum / 100 + '手' }}</span>
+ </div>
+ <div class="center_price">
+ <div class="profit">
+ <span>{{ item.profitAndLose }}</span>
+ </div>
+ <div class="start_price jiantou">
+ <span>{{ item.buyOrderPrice }}</span>
+ </div>
+ <div class="new_price">
+ <span>{{ item.now_price }}</span>
+ </div>
+ </div>
+ <div class="bottom_price_title">
+ <div class="profit_title">
+ <span>{{ '浮动净盈亏' }}</span>
+ </div>
+ <div class="start_price">
+ <span>{{ '开仓价格' }}</span>
+ </div>
+ <div class="new_price">
+ <span>{{ '当前价格' }}</span>
+ </div>
+ </div>
+ <div class="right_btn">
+ <span>{{ '平仓' }}</span>
+ </div>
</div>
- <div class="start_price">
- <span>{{ item.startPrice }}</span>
- </div>
- <div class="new_price">
- <span>{{ item.newPrice }}</span>
- </div>
- </div>
- <div class="bottom_price_title">
- <div class="profit_title">
- <span>{{ '浮动净盈亏' }}</span>
- </div>
- <div class="start_price">
- <span>{{ '开仓价格' }}</span>
- </div>
- <div class="new_price">
- <span>{{ '当前价格' }}</span>
- </div>
- </div>
- <div class="right_btn">
- <span>{{ '平仓' }}</span>
- </div>
- </div>
+
+
</div>
- <div class="waiting" v-if="tabsCurrentIndex === 1">
+ </van-list>
+ <div class="waiting" v-if="total == 0 && tabsCurrentIndex === 0">
<div class="waiting_box">
<div class="img_cont">
<img src="../../assets/img/zhaobudao.png" alt />
<span class="gd">{{ '当前无挂单' }}</span>
- <div class="trading">
+ <div class="trading" @click="$router.push('/trading-list')">
<span>{{ '开始交易' }}</span>
</div>
</div>
</div>
</div>
- <div class="tabs_o" v-if="tabsCurrentIndex === 2">
- <div class="tabs_o_items oes" v-for="(item, index) in tabsPcArr" :key="index">
- <div class="tabs_o_title">
- <span class="title">{{ item.name }}</span>
- <span class="buy_to_sell">{{ item.mr }}</span>
- <span class="multiple">{{ item.multiple + 'X' }}</span>
- <span class="nums">{{ item.hd + '手'}}</span>
- </div>
- <div class="bottom_price_title">
- <div class="profit_res">
- <span>{{ '平仓时间: 2022年11月7日 18:18:05' }}</span>
+ <div class="waiting" v-if="totals == 0 && tabsCurrentIndex === 1">
+ <div class="waiting_box">
+ <div class="img_cont">
+ <img src="../../assets/img/zhaobudao.png" alt />
+ <span class="gd">{{ '当前无挂单' }}</span>
+ <div class="trading" @click="$router.push('/trading-list')">
+ <span>{{ '开始交易' }}</span>
</div>
- </div>
- <div class="right_count">
- <span>{{ item.countNum }}</span>
</div>
</div>
</div>
+
+ <van-list v-model="loadings" :finished="finisheds" finished-text="没有更多了" @load="onLoads" :immediate-check="immediate" v-show="tabsCurrentIndex === 1&&totals != 0">
+ <div class="tabs_o">
+ <div class="tabs_o_items oes" v-for="(item, index) in tabsPcArr" :key="index">
+ <div class="tabs_o_title">
+ <span class="title">{{ item.stockName }}</span>
+ <span class="buy_to_sell">{{ item.orderDirection }}</span>
+ <span class="multiple">{{ item.allProfitAndLose }}</span>
+ <span class="nums">{{ item.orderNum / 100 + '手' }}</span>
+ </div>
+ <div class="bottom_price_title">
+ <div class="profit_res">
+ <span>平仓时间: {{ item.buyOrderTime | gettime }}</span>
+ </div>
+ </div>
+ <div class="right_count" :class="item.profitAndLose > 0 ? 'red' : item.profitAndLose == 0 ? '' : 'green'">
+ <span>{{ item.profitAndLose }}</span>
+ </div>
+ </div>
+ </div>
+ </van-list>
</div>
+
</div>
</div>
</div>
@@ -154,276 +232,314 @@
</template>
<script>
+import * as api from "@/axios/api";
export default {
data() {
return {
- tabsArr: ["持仓", "挂单", "已平仓"],
+ tabsArr: ["持仓", "已平仓"],
tabsCurrentIndex: 0,
- tabsPositionNumArr: [
- {
- name: "美元/日元",
- mr: "买入",
- multiple: 200,
- hd: 0.01,
- ProfitLoss: -1.15,
- startPrice: 146.656,
- newPrice: 146.487
- },
- {
- name: "美元/日元",
- mr: "买入",
- multiple: 200,
- hd: 0.01,
- ProfitLoss: -1.15,
- startPrice: 146.656,
- newPrice: 146.487
- },
- {
- name: "美元/日元",
- mr: "买入",
- multiple: 200,
- hd: 0.01,
- ProfitLoss: -1.15,
- startPrice: 146.656,
- newPrice: 146.487
- },
- {
- name: "美元/日元",
- mr: "买入",
- multiple: 200,
- hd: 0.01,
- ProfitLoss: -1.15,
- startPrice: 146.656,
- newPrice: 146.487
- },
- {
- name: "美元/日元",
- mr: "买入",
- multiple: 200,
- hd: 0.01,
- ProfitLoss: -1.15,
- startPrice: 146.656,
- newPrice: 146.487
- },
- {
- name: "美元/日元",
- mr: "买入",
- multiple: 200,
- hd: 0.01,
- ProfitLoss: -1.15,
- startPrice: 146.656,
- newPrice: 146.487
- },
- {
- name: "美元/日元",
- mr: "买入",
- multiple: 200,
- hd: 0.01,
- ProfitLoss: -1.15,
- startPrice: 146.656,
- newPrice: 146.487
- },
- {
- name: "美元/日元",
- mr: "买入",
- multiple: 200,
- hd: 0.01,
- ProfitLoss: -1.15,
- startPrice: 146.656,
- newPrice: 146.487
- },
- {
- name: "美元/日元",
- mr: "买入",
- multiple: 200,
- hd: 0.01,
- ProfitLoss: -1.15,
- startPrice: 146.656,
- newPrice: 146.487
- },
- {
- name: "美元/日元",
- mr: "买入",
- multiple: 200,
- hd: 0.01,
- ProfitLoss: -1.15,
- startPrice: 146.656,
- newPrice: 146.487
- },
- {
- name: "美元/日元",
- mr: "买入",
- multiple: 200,
- hd: 0.01,
- ProfitLoss: -1.15,
- startPrice: 146.656,
- newPrice: 146.487
- },
- {
- name: "美元/日元",
- mr: "买入",
- multiple: 200,
- hd: 0.01,
- ProfitLoss: -1.15,
- startPrice: 146.656,
- newPrice: 146.487
- },
- {
- name: "美元/日元",
- mr: "买入",
- multiple: 200,
- hd: 0.01,
- ProfitLoss: -1.15,
- startPrice: 146.656,
- newPrice: 146.487
- }
- ],
- tabsPcArr: [
- {
- name: "美元/日元",
- mr: "买入",
- multiple: 200,
- hd: 0.01,
- ProfitLoss: -1.15,
- startPrice: 146.656,
- newPrice: 146.487,
- countNum: -1.18
- },
- {
- name: "美元/日元",
- mr: "买入",
- multiple: 200,
- hd: 0.01,
- ProfitLoss: -1.15,
- startPrice: 146.656,
- newPrice: 146.487,
- countNum: -1.52
- },
- {
- name: "美元/日元",
- mr: "买入",
- multiple: 200,
- hd: 0.01,
- ProfitLoss: -1.15,
- startPrice: 146.656,
- newPrice: 146.487,
- countNum: -2.36
- },
- {
- name: "美元/日元",
- mr: "买入",
- multiple: 200,
- hd: 0.01,
- ProfitLoss: -1.15,
- startPrice: 146.656,
- newPrice: 146.487,
- countNum: -1.18
- },
- {
- name: "美元/日元",
- mr: "买入",
- multiple: 200,
- hd: 0.01,
- ProfitLoss: -1.15,
- startPrice: 146.656,
- newPrice: 146.487,
- countNum: -1.18
- },
- {
- name: "美元/日元",
- mr: "买入",
- multiple: 200,
- hd: 0.01,
- ProfitLoss: -1.15,
- startPrice: 146.656,
- newPrice: 146.487,
- countNum: -1.18
- },
- {
- name: "美元/日元",
- mr: "买入",
- multiple: 200,
- hd: 0.01,
- ProfitLoss: -1.15,
- startPrice: 146.656,
- newPrice: 146.487,
- countNum: -1.18
- },
- {
- name: "美元/日元",
- mr: "买入",
- multiple: 200,
- hd: 0.01,
- ProfitLoss: -1.15,
- startPrice: 146.656,
- newPrice: 146.487,
- countNum: -1.18
- },
- {
- name: "美元/日元",
- mr: "买入",
- multiple: 200,
- hd: 0.01,
- ProfitLoss: -1.15,
- startPrice: 146.656,
- newPrice: 146.487,
- countNum: -1.18
- },
- {
- name: "美元/日元",
- mr: "买入",
- multiple: 200,
- hd: 0.01,
- ProfitLoss: -1.15,
- startPrice: 146.656,
- newPrice: 146.487,
- countNum: -1.18
- },
- {
- name: "美元/日元",
- mr: "买入",
- multiple: 200,
- hd: 0.01,
- ProfitLoss: -1.15,
- startPrice: 146.656,
- newPrice: 146.487,
- countNum: -1.18
- },
- {
- name: "美元/日元",
- mr: "买入",
- multiple: 200,
- hd: 0.01,
- ProfitLoss: -1.15,
- startPrice: 146.656,
- newPrice: 146.487,
- countNum: -1.18
- },
- {
- name: "美元/日元",
- mr: "买入",
- multiple: 200,
- hd: 0.01,
- ProfitLoss: -1.15,
- startPrice: 146.656,
- newPrice: 146.487,
- countNum: -1.18
- }
- ],
+ titleName: "沪深京账户",
+ indexSettingInfo: {},
+ futuresSettingInfo: {},
+ tabsPositionNumArr: [],
+ titleIndex: 0,
+ settingInfo: {},
+ tabsPcArr: [],
titleDialog: false,
+ total: 0,
+ totals: 0,
+ loading: false,
+ finished: false,
+ finisheds:false,
+ page: 1,
+ pages: 1,
+ immediate:false,
+ loadings:false,
};
},
+ mounted() {
+ this.getListDetail();
+ this.getUserInfo();
+ this.getIndexSettingInfo();
+ this.getSettingInfo();
+ this.getFuturesSetting();
+ this.getListDetails();
+ },
methods: {
+ onLoad() {
+ this.page++;
+ switch (this.titleIndex) {
+ case 0:
+ this.getListDetail();
+ break;
+ default:
+ break;
+ }
+ },
+ onLoads() {
+ this.pages++;
+ switch (this.titleIndex) {
+ case 1:
+ this.getListDetails();
+ break;
+ default:
+ break;
+ }
+ },
+ SetTitleIndex(index) {
+ //账户选项卡
+ this.titleIndex = index;
+ this.page = 1;
+ this.pages = 1;
+ this.finished = false;
+ this.finisheds = false;
+ this.tabsPositionNumArr = [];
+ this.tabsPcArr = [];
+ switch (index) {
+ case 0:
+ this.titleName = "沪深京账户";
+ this.getListDetail();
+ this.getListDetails();
+ break;
+ case 1:
+ this.titleName = "指数账户";
+ this.getzhishuListDetail();
+ this.getzhishuListDetails();
+ break;
+ case 2:
+ this.titleName = "期货账户";
+ this.getQhListDetail();
+ this.getQhListDetails();
+ break;
+ default:
+ break;
+ }
+ this.titleDialog = false;
+ },
handleTabsClick(item, index) {
+ //持仓已平仓选项卡
this.tabsCurrentIndex = index;
},
handleOpenDialog() {
this.titleDialog = !this.titleDialog;
},
+ async getIndexSettingInfo() {
+ // 网站设置信息 指数
+ let data = await api.getIndexSetting()
+ if (data.status === 0) {
+ // 成功
+ this.indexSettingInfo = data.data
+ } else {
+ Toast(data.msg)
+ }
+ },
+ async getFuturesSetting() {
+ // 网站设置信息 期货
+ let data = await api.getFuturesSetting()
+ if (data.status === 0) {
+ // 成功
+ this.futuresSettingInfo = data.data
+ } else {
+ Toast(data.msg)
+ }
+ },
+ async getSettingInfo() {
+ let data = await api.getSetting()
+ if (data.status === 0) {
+ // 成功
+ this.settingInfo = data.data
+ } else {
+ Toast(data.msg)
+ }
+ },
+ async getUserInfo() {
+ // 获取用户信息
+ // let showcookie = this.getCookie('USER_TOKEN');
+ let data = await api.getUserInfo()
+ if (data.status === 0) {
+ // this.getProductSetting()
+ this.$store.state.userInfo = data.data
+ } else {
+ Toast(data.msg)
+ }
+ this.$store.state.user = this.user
+ },
+ async getListDetail() {
+ //获取沪深我的持仓列表
+ this.loading = true;
+ let opt = {
+ state: 0,
+ stockCode: '', // 代码
+ stockSpell: '', // 简拼
+ pageNum: this.page,
+ pageSize: 15,
+ }
+ let data = await api.getOrderList(opt)
+ this.loading = false;
+ if (data.status === 0) {
+ if (data.data.list.length < 15) {
+ this.finished = true;
+ }
+ data.data.list.forEach(element => {
+ this.tabsPositionNumArr.push(element)
+ })
+ this.total = data.data.total
+ } else {
+ Toast(data.msg)
+ }
+ },
+ async getzhishuListDetail() {
+ //获取指数持仓
+ this.loading = true;
+ let opt = {
+ state: 0,
+ stockCode: '', // 代码
+ stockSpell: '', // 简拼
+ pageNum: this.pageNum,
+ pageSize: this.pageSize
+ }
+ let data = await api.getIndexOrderList(opt)
+ this.loading = false;
+ if (data.status === 0) {
+ if (data.data.list.length < 15) {
+ this.finished = true;
+ }
+ data.data.list.forEach(element => {
+ this.tabsPositionNumArr.push(element)
+ })
+ this.total = data.data.total
+ } else {
+ Toast(data.msg)
+ }
+ },
+ async getQhListDetail() {
+ //获取期货持仓
+ this.loading = true;
+ let opt = {
+ state: 0,
+ fnCode: '', // 代码
+ fnName: '', // 简拼
+ pageNum: this.pageNum,
+ pageSize: this.pageSize
+ }
+ let data = await api.getFuturesOrderList(opt)
+ this.loading = false;
+ if (data.status === 0) {
+ if (data.data.list.length < 15) {
+ this.finished = true;
+ }
+ data.data.list.forEach(element => {
+ this.tabsPositionNumArr.push(element)
+ })
+ this.total = data.data.total
+ } else {
+ Toast(data.msg)
+ }
+ },
+ async getListDetails() {
+ //获取沪深我的平仓列表
+ this.loadings = true;
+ let opt = {
+ state: 1,
+ stockCode: '', // 代码
+ stockSpell: '', // 简拼
+ pageNum: this.pages,
+ pageSize: 15
+ }
+ let data = await api.getOrderList(opt)
+ this.loadings = false;
+ if (data.status === 0) {
+ if(data.data.list.length <15){
+ this.finisheds = true;
+ }
+ data.data.list.forEach(element => {
+ this.tabsPcArr.push(element)
+ })
+ this.totals = data.data.total
+ } else {
+ Toast(data.msg)
+ }
+ },
+ async getzhishuListDetails() {
+ //获取指数平仓
+ this.loadings = true;
+ let opt = {
+ state: 1,
+ stockCode: '', // 代码
+ stockSpell: '', // 简拼
+ pageNum: this.pageNum,
+ pageSize: 15
+ }
+ let data = await api.getIndexOrderList(opt)
+ this.loadings = false;
+ if(data.data.list.length <15){
+ this.finisheds = true;
+ }
+ if (data.status === 0) {
+ data.data.list.forEach(element => {
+ this.tabsPcArr.push(element)
+ })
+ this.totals = data.data.total
+ } else {
+ Toast(data.msg)
+ }
+ },
+ async getQhListDetails() {
+ //获取期货平仓
+ this.loadings = true;
+ let opt = {
+ state: 1,
+ fnCode: '', // 代码
+ fnName: '', // 简拼
+ pageNum: this.pageNum,
+ pageSize: this.pageSize
+ }
+ let data = await api.getFuturesOrderList(opt)
+ this.loadings = false;
+ if (data.status === 0) {
+ if(data.data.list.length <15){
+ this.finisheds = true;
+ }
+ data.data.list.forEach(element => {
+ this.tabsPcArr.push(element)
+ })
+ this.totals = data.data.total
+ } else {
+ Toast(data.msg)
+ }
+ },
},
- mounted() {
-
- }
+ filters: {
+ gettime(time) {
+ if (!time) {
+ return "";
+ }
+ var nd = new Date(time);
+ var y = nd.getFullYear();
+ var mm = nd.getMonth() + 1;
+ var d = nd.getDate();
+ var h = nd.getHours();
+ var m = nd.getMinutes();
+ var c = nd.getSeconds();
+ if (mm < 10) {
+ mm = "0" + mm;
+ }
+ if (d < 10) {
+ d = "0" + d;
+ }
+ if (h < 10) {
+ h = "0" + h;
+ }
+ if (m < 10) {
+ m = "0" + m;
+ }
+ if (c < 10) {
+ c = "0" + c;
+ }
+ //17:35:2922-06-2022
+ return y + '/' + mm + '/' + d + ' ' + h + ":" + m + ":" + c;
+ }
+ },
};
</script>
@@ -438,94 +554,111 @@
width: 100%;
height: calc(100% - 1.2974rem);
}
+
.content {
width: 100%;
height: 100%;
position: relative;
}
+
.top_title.active {
- height: 3rem;
+ height: 6.5rem;
}
+
.top_title {
width: 100%;
height: 0.9231rem;
position: absolute;
- background: #fff;
- top: 0;
+ top: 0.6rem;
z-index: 10;
overflow: hidden;
- transition: all 1s;
+ transition: all 0.3s;
padding: 0 .3rem;
+
.titles {
width: 100%;
height: 0.9231rem;
display: flex;
}
+
.left_title,
.right_box {
width: 50%;
height: 100%;
display: flex;
}
+
.title {
- width: 60%;
+ width: auto;
height: 100%;
- font-size: 0.5897rem;
+ font-size: 0.4897rem;
display: flex;
align-items: center;
+
span {
- font-weight: 800;
+ font-size: 0.4897rem;
+ font-weight: 600;
}
}
+
.img {
width: 40%;
height: 100%;
display: flex;
align-items: center;
+
img {
width: 0.6rem;
height: 0.6rem;
}
}
}
+
.warehouse_card {
width: 100%;
height: calc(100% - 1rem);
position: absolute;
- top: 0.9231rem;
+ top: 1.5231rem;
z-index: 0;
padding: 0 0.3333rem;
background: rgb(242, 243, 247);
+
.top_card {
width: 100%;
height: 4.2308rem;
border-radius: 0.15rem;
margin-top: 0.3rem;
background: #fff;
+
.card_content {
width: 100%;
height: 100%;
padding: 0.4rem;
+
.t_title {
width: 100%;
height: 0.5128rem;
display: flex;
align-items: center;
+
span {
font-size: 0.3046rem;
font-weight: bold;
}
}
+
.t_price {
width: 100%;
height: 0.5128rem;
display: flex;
align-items: center;
+
.price {
- font-weight: 800;
- font-size: 0.3846rem;
+ font-weight: 600;
+ font-size: 0.4246rem;
margin-top: 0.07rem;
}
+
.profits {
font-weight: 800;
font-size: 0.2846rem;
@@ -534,58 +667,75 @@
margin-left: 0.2rem;
}
}
+
.balance {
width: 100%;
height: 0.3846rem;
margin-top: 0.428rem;
display: flex;
- > div {
+
+ >div {
width: 50%;
height: 100%;
color: @topCardColor;
+
span {
font-weight: 600;
}
}
}
+
.num {
width: 100%;
height: 0.3846rem;
margin-top: 0.1rem;
display: flex;
- > div {
+
+ >div {
width: 50%;
height: 100%;
+
span {
font-weight: 600;
}
}
+
.right_margin {
- color: rgb(100, 162, 117);
+ color: rgb(81, 164, 99);
+
+ span {
+ font-weight: normal !important;
+ }
}
}
+
.margin {
width: 100%;
height: 0.3846rem;
margin-top: 0.2rem;
display: flex;
- > div {
+
+ >div {
width: 50%;
height: 100%;
color: @topCardColor;
+
span {
font-weight: 600;
}
}
}
+
.prices {
width: 100%;
height: 0.3846rem;
margin-top: 0.1rem;
display: flex;
- > div {
+
+ >div {
width: 50%;
height: 100%;
+
span {
font-weight: 600;
}
@@ -594,113 +744,154 @@
}
}
}
+
.over {
width: 100%;
height: calc(100% - 0.7179rem);
overflow: auto;
+ padding: 0 0.3rem;
}
+
.tabs_card {
width: 100%;
- height: calc(100% - 4.24rem - 0.5rem);
+ height: calc(100% - 4.24rem - 0.5rem - 0.6rem);
margin-top: 0.3rem;
background: #fff;
+ border-radius: 0.2rem;
+ padding-top: 0.15rem;
}
+
.over::-webkit-scrollbar {
display: none;
}
+
.tabs_card_content {
width: 100%;
height: 100%;
- padding: 0 0.3rem;
+
.tabs_top_title {
width: 100%;
height: 1rem;
- border-radius: 0.15rem;
+ border-bottom: 0.01rem solid #ececec;
display: flex;
align-items: center;
font-size: 0.4103rem;
padding-top: 0.2rem;
- > div {
- width: 25%;
+
+ >div {
+ width: 20%;
height: 100%;
display: flex;
align-items: center;
- justify-content: left;
+ justify-content: center;
+
span {
display: inline-block;
height: 100%;
- font-weight: 600;
+ font-weight: 550;
line-height: 0.7179rem;
+ text-align: center;
+
}
+
span.active {
color: rgb(62, 121, 226);
- border-bottom: 0.1rem solid rgb(62, 121, 226);
+ text-align: center;
+ // border-bottom: 0.1rem solid rgb(62, 121, 226);
+
}
+
+ span.active::after {
+ content: '';
+ width: 80%;
+
+ height: 0.001rem;
+ display: block;
+ margin: 0 auto;
+ border-bottom: 0.06rem solid rgb(62, 121, 226);
+ }
+
}
}
+
.tabs_o {
width: 100%;
margin-top: 0.3rem;
- > .tabs_o_items {
+
+ >.tabs_o_items {
width: 100%;
- height: 2.3rem;
+ height: 2.2rem;
position: relative;
+ border-bottom: 0.01rem solid #ececec;
+ margin-bottom: 0.1rem;
.tabs_o_title {
width: 100%;
height: 0.7179rem;
display: flex;
align-items: center;
+
span {
display: inline-block;
margin-right: 0.2rem;
}
+
.title {
font-weight: 600;
font-size: 0.4059rem;
}
+
.buy_to_sell {
- background: rgb(215, 243, 235);
+
padding: 0.08rem 0.1rem;
- color: rgb(109, 175, 125);
+
font-weight: 600;
}
+
.multiple {
padding: 0.08rem 0.1rem;
background: rgb(236, 243, 252);
color: rgb(42, 108, 230);
font-weight: 600;
}
+
.nums {
color: @topCardColor;
}
}
+
.center_price {
width: 100%;
height: 0.3846rem;
display: flex;
align-items: center;
margin-top: 0.3rem;
- > div {
+
+ >div {
width: 28%;
height: 100%;
+
span {
font-weight: 600;
}
}
+
.profit {
color: rgb(209, 79, 91);
}
}
+
.bottom_price_title {
width: 100%;
height: 0.4rem;
margin-top: 0.1rem;
display: flex;
align-items: center;
- > div {
+
+ >div {
width: 28%;
height: 100%;
color: @topCardColor;
+
span {
font-weight: 600;
}
@@ -709,10 +900,12 @@
}
}
}
+
.waiting {
width: 100%;
margin-top: 0.3rem;
position: relative;
+
.waiting_box {
width: 100%;
height: 4rem;
@@ -720,25 +913,30 @@
align-items: center;
justify-content: center;
margin-top: 1rem;
- > div {
+
+ >div {
width: 60%;
height: 100%;
+
img {
width: 100%;
height: 100%;
}
+
.gd {
display: inline-block;
width: 100%;
text-align: center;
color: rgb(133, 133, 133);
}
+
.trading {
width: 100%;
height: 2rem;
display: flex;
align-items: center;
justify-content: center;
+
span {
display: inline-block;
width: 4.1026rem;
@@ -755,6 +953,7 @@
}
}
}
+
.right_btn {
width: 1.7949rem;
height: 0.6667rem;
@@ -767,66 +966,143 @@
align-items: center;
justify-content: center;
border-radius: 0.3rem;
+
span {
font-weight: 600;
font-size: 0.3846rem;
}
}
+
.right_count {
width: 1.7949rem;
height: 0.6667rem;
position: absolute;
right: 1%;
top: 20%;
- color: #d7343a;
+
display: flex;
align-items: center;
justify-content: center;
border-radius: 0.3rem;
+
span {
font-weight: 600;
font-size: 0.3846rem;
}
}
+
.profit_res {
width: 100% !important;
margin-top: .2rem;
}
+
.oes {
- height: 2rem !important;
+ height: 1.5rem !important;
}
+
.dialog {
width: 100%;
height: 100%;
position: absolute;
top: 0;
- background: rgba(0,0,0,.5);
+ background: rgba(0, 0, 0, .5);
z-index: 9;
}
+
.overflow_box {
width: 100%;
height: 1.5rem;
border-radius: .2rem;
padding: 0 .3rem;
margin: .3rem 0;
- background: rgb(236,243,253);
+ background: #fff;
display: flex;
align-items: center;
justify-content: space-between;
- > div {
+
+ >div {
height: 50%;
display: flex;
justify-content: center;
align-items: center;
}
+
.left_titles {
+ color: rgb(129, 131, 133);
+ font-size: .3815rem;
+
span {
- font-weight: 800;
- font-size: .3815rem;
+ font-weight: normal !important;
+
+
}
}
+
.right_price {
- color: rgb(128,135,145);
+ color: rgb(128, 135, 145);
}
}
+
+.kuan {
+ width: auto !important;
+ padding-left: 0.5rem;
+ letter-spacing: 0.02rem;
+}
+
+.kuans {
+ width: auto !important;
+ padding-left: 0.5rem;
+ letter-spacing: 0.02rem;
+}
+
+.left_price {
+ font-weight: normal;
+
+ span {
+ font-size: 0.3rem;
+ color: #000;
+ font-weight: 500 !important;
+ ;
+ }
+}
+
+.left_price {
+ font-weight: normal;
+
+ span {
+ font-size: 0.3rem;
+ color: #000;
+ font-weight: 500 !important;
+ ;
+ }
+}
+
+.numDemo {
+ font-size: 0.3rem;
+ color: #000;
+ font-weight: 500 !important;
+ ;
+}
+.maichu{
+ color: rgb(225,57,65);
+ background: rgb(252,238,240);
+}
+.mairu{
+ color: rgb(109, 175, 125);
+ background: rgb(215, 243, 235);
+}
+.jiantou{
+ position: relative;
+}
+.jiantou::before{
+ content: '';
+ background-image: url('../../assets/img/youyou.png') ;
+ background-size: 100% 100%;
+ width: 0.6rem;
+ height: 0.2rem;
+ font-size: 0.8rem;
+ position: absolute;
+ right: 0.5rem;
+ top: calc(50% - 0.15rem);
+}
</style>
\ No newline at end of file
--
Gitblit v1.9.3