li.shaoyi 1 mesiac pred
rodič
commit
dc9f7c6723

+ 3 - 1
src/packages/digital/views/contract/components/order/history/index.vue

@@ -9,7 +9,9 @@
                         <time class="text-small">{{ formatDate(item.ordertime) }}</time>
                     </th>
                     <th>
-                        <span>{{ getBuyOrSellName(item.buyorsell) }}</span>
+                        <span :class="item.buyorsell ? 'g-price-down' : 'g-price-up'">
+                            {{ getBuyOrSellName(item.buyorsell, 1) }}
+                        </span>
                     </th>
                 </tr>
                 <tr>

+ 3 - 1
src/packages/digital/views/contract/components/order/list/index.vue

@@ -9,7 +9,9 @@
                         <time class="text-small">{{ formatDate(item.ordertime) }}</time>
                     </th>
                     <th>
-                        <span>{{ getBuyOrSellName(item.buyorsell) }}</span>
+                        <span :class="item.buyorsell ? 'g-price-down' : 'g-price-up'">
+                            {{ getBuyOrSellName(item.buyorsell, 1) }}
+                        </span>
                     </th>
                 </tr>
                 <tr>

+ 1 - 1
src/packages/digital/views/contract/components/position/detail/index.vue

@@ -15,7 +15,7 @@
                             </th>
                             <th>
                                 <span :class="item.buyorsell === 0 ? 'g-price-up' : 'g-price-down'">
-                                    {{ getBuyOrSellName(item.buyorsell) }}
+                                    {{ getBuyOrSellName(item.buyorsell, 1) }}
                                 </span>
                             </th>
                         </tr>

+ 3 - 3
src/packages/digital/views/contract/components/trade/history/index.vue

@@ -6,13 +6,13 @@
                 <tr>
                     <th>
                         <span>{{ item.goodscode }}/{{ item.goodsname }}</span>
-                        <span :class="!item.buyorsell ? 'g-price-up' : 'g-price-down'">
+                        <span class="text-small">
                             {{ formatDate(item.tradetime) }}
                         </span>
                     </th>
                     <th>
-                        <span :class="!item.buyorsell ? 'g-price-up' : 'g-price-down'">
-                            {{ getBuyOrSellName(item.buyorsell) }}
+                        <span :class="item.buyorsell ? 'g-price-down' : 'g-price-up'">
+                            {{ getBuyOrSellName(item.buyorsell, 1) }}
                         </span>
                     </th>
                 </tr>

+ 3 - 3
src/packages/digital/views/contract/components/trade/list/index.vue

@@ -6,13 +6,13 @@
                 <tr>
                     <th>
                         <span>{{ item.goodscode }}/{{ item.goodsname }}</span>
-                        <span :class="!item.buyorsell ? 'g-price-up' : 'g-price-down'">
+                        <span class="text-small">
                             {{ formatDate(item.tradetime) }}
                         </span>
                     </th>
                     <th>
-                        <span :class="!item.buyorsell ? 'g-price-up' : 'g-price-down'">
-                            {{ getBuyOrSellName(item.buyorsell) }}
+                        <span :class="item.buyorsell ? 'g-price-down' : 'g-price-up'">
+                            {{ getBuyOrSellName(item.buyorsell, 1) }}
                         </span>
                     </th>
                 </tr>

+ 6 - 2
src/packages/digital/views/contract/detail/index.vue

@@ -12,7 +12,7 @@
             <table cellspacing="0" cellpadding="0">
                 <tbody>
                     <tr>
-                        <td colspan="2">
+                        <td>
                             <span class="text-small">账户权益(USDT)</span>
                             <span>{{ accountItem.balance }}</span>
                         </td>
@@ -20,6 +20,10 @@
                             <span class="text-small">浮动盈亏</span>
                             <span>{{ formatDecimal(accountItem.profitLoss) }}</span>
                         </td>
+                        <td>
+                            <span class="text-small">风险率</span>
+                            <span :class="accountItem.hazardRatioColor">{{ parsePercent(accountItem.hazardRatio) }}</span>
+                        </td>
                     </tr>
                     <tr>
                         <td>
@@ -66,13 +70,13 @@
 <script lang="ts" setup>
 import { shallowRef, computed } from 'vue'
 import { Cell, CellGroup, Tab, Tabs, Grid, GridItem, ActionSheet } from 'vant'
+import { formatDecimal,parsePercent } from '@/filters'
 import { useNavigation } from '@mobile/router/navigation'
 import { useAccountStore, useFuturesStore } from '@/stores'
 import ContractOrder from '../components/order/index.vue'
 import ContractTrade from '../components/trade/index.vue'
 import ContractPosition from '../components/position/list/index.vue'
 import ContractStatement from '../components/statement/index.vue'
-import { formatDecimal } from '@/filters'
 
 const { router, getQueryStringToNumber } = useNavigation()