Переглянути джерело

:recycle: 持仓中心不显示当前股价,改为持仓份额;:memo: 买卖列表状态字段调整

Ritchie 1 рік тому
батько
коміт
322748c4a8

+ 3 - 3
src/views/buyOrSell/BuyConfList.vue

@@ -11,10 +11,10 @@ import { useTradeStore } from '@/stores/trade';
 // 状态,0未确认,1已确认(双方已确认),2买家已付款(卖家未确认),3买家超时未确认,4特殊取消
 const showStatusText = (statusVal) => {
     const statusMap = {
-        0: '未确认',
-        1: '已确认',
+        0: '等待买家付款',
+        1: '已成交',
         2: '等待卖家确认',
-        3: '买家超时未确认',
+        3: '买家超时未付款',
         4: '特殊取消'
     }
     return statusMap[statusVal] || '未知状态';

+ 4 - 4
src/views/buyOrSell/SellConfList.vue

@@ -8,13 +8,13 @@ import dateUtil from "@/utils/dateUtil";
 import { useRouter } from 'vue-router'
 import { useTradeStore } from '@/stores/trade';
 
-// 状态,0未确认,1已确认(双方已确认),2买家已付款(卖家未确认),3买家超时未确认,4特殊取消
+// 状态,0买家未确认,1已确认(双方已确认),2买家已付款(卖家未确认)3买家超时未确认,4特殊取消
 const showStatusText = (statusVal) => {
     const statusMap = {
-        0: '买家付款',
-        1: '已确认',
+        0: '等待买家付款',
+        1: '已成交',
         2: '等待卖家确认',
-        3: '买家超时未确认',
+        3: '买家超时未付款',
         4: '特殊取消'
     }
     return statusMap[statusVal] || '未知状态';

+ 11 - 2
src/views/position/PositionIndex.vue

@@ -23,11 +23,18 @@
                         <div class="bd1 flex-col">
                             <div class="box2 l-f l-flex-c l-flex-j-a">
 
-                                <div class="TextGroup flex-col">
+                                <!-- <div class="TextGroup flex-col">
                                     <div class="main6 flex-col justify-between align-center">
                                         <span class="word5">{{ twoNumber(currentPrice) }}</span>
                                         <span class="word6">当前股价¥</span>
                                     </div>
+                                </div> -->
+
+                                <div class="TextGroup flex-col">
+                                    <div class="main6 flex-col justify-between align-center">
+                                        <span class="word5">{{ stockNum }}</span>
+                                        <span class="word6">持仓份额</span>
+                                    </div>
                                 </div>
 
                                 <div class="TextGroup flex-col">
@@ -158,6 +165,7 @@ const error = ref(false);
 const loading = ref(false)
 const finished = ref(false)
 const hisLength = ref(0)
+const stockNum = ref(0)
 
 
 
@@ -172,7 +180,7 @@ function twoNumber(val) {
 
 // 滚动加载
 const onLoad = async () => {
-    console.log("finished >>>", finished.value);
+    // console.log("finished >>>", finished.value);
     if (!finished.value) {
         loading.value = true
         searchParams.current = searchParams.current + 1;
@@ -236,6 +244,7 @@ const getMyStockFunc = async () => {
         currentPrice.value = data.data.currentPrice
         dailyDiff.value = data.data.dailyDiff
         totalDiff.value = data.data.totalDiff
+        stockNum.value = data.data.stockNum
     }
 }