|
@@ -59,11 +59,16 @@
|
|
<van-col span="8">交易数量</van-col>
|
|
<van-col span="8">交易数量</van-col>
|
|
<van-col span="8">单价¥</van-col>
|
|
<van-col span="8">单价¥</van-col>
|
|
</van-row>
|
|
</van-row>
|
|
- <van-row v-for="item in sellerList" :key="item.id" justify="center">
|
|
|
|
|
|
+ <van-row v-for="item in visibleSellerList" :key="item.id" justify="center">
|
|
<van-col span="8">{{ item.userAnonymousName }}</van-col>
|
|
<van-col span="8">{{ item.userAnonymousName }}</van-col>
|
|
<van-col span="8">{{ item.entrustNumber }}</van-col>
|
|
<van-col span="8">{{ item.entrustNumber }}</van-col>
|
|
<van-col span="8">{{ item.price }}</van-col>
|
|
<van-col span="8">{{ item.price }}</van-col>
|
|
</van-row>
|
|
</van-row>
|
|
|
|
+ <van-row v-if="sellListLength >= 10" justify="center">
|
|
|
|
+ <van-col span="8">...</van-col>
|
|
|
|
+ <van-col span="8">...</van-col>
|
|
|
|
+ <van-col span="8">...</van-col>
|
|
|
|
+ </van-row>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<!-- 分割线 -->
|
|
<!-- 分割线 -->
|
|
@@ -92,11 +97,16 @@
|
|
<van-col span="8">交易数量</van-col>
|
|
<van-col span="8">交易数量</van-col>
|
|
<van-col span="8">单价¥</van-col>
|
|
<van-col span="8">单价¥</van-col>
|
|
</van-row>
|
|
</van-row>
|
|
- <van-row v-for="item in buyerList" :key="item.id" justify="center">
|
|
|
|
|
|
+ <van-row v-for="item in visibleBuyerList" :key="item.id" justify="center">
|
|
<van-col span="8">{{ item.userAnonymousName }}</van-col>
|
|
<van-col span="8">{{ item.userAnonymousName }}</van-col>
|
|
<van-col span="8">{{ item.entrustNumber }}</van-col>
|
|
<van-col span="8">{{ item.entrustNumber }}</van-col>
|
|
<van-col span="8">{{ item.price }}</van-col>
|
|
<van-col span="8">{{ item.price }}</van-col>
|
|
</van-row>
|
|
</van-row>
|
|
|
|
+ <van-row v-if="buyListLength >= 10" justify="center">
|
|
|
|
+ <van-col span="8">...</van-col>
|
|
|
|
+ <van-col span="8">...</van-col>
|
|
|
|
+ <van-col span="8">...</van-col>
|
|
|
|
+ </van-row>
|
|
</div>
|
|
</div>
|
|
<!-- 分割线 -->
|
|
<!-- 分割线 -->
|
|
<img class="pic1" src="../../assets/trading/line.png" />
|
|
<img class="pic1" src="../../assets/trading/line.png" />
|
|
@@ -131,7 +141,7 @@
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
|
|
|
|
-import { onMounted, ref } from "vue";
|
|
|
|
|
|
+import { onMounted, ref, computed } from "vue";
|
|
import sHeader from "@/components/SimpleHeader";
|
|
import sHeader from "@/components/SimpleHeader";
|
|
import { styleUrl } from "@/common/js/utils";
|
|
import { styleUrl } from "@/common/js/utils";
|
|
import {
|
|
import {
|
|
@@ -177,20 +187,30 @@ setInterval(() => {
|
|
}, 1000);
|
|
}, 1000);
|
|
|
|
|
|
|
|
|
|
-const buyerList = ref([]);
|
|
|
|
-const sellerList = ref([]);
|
|
|
|
|
|
+const buyerList = ref([])
|
|
|
|
+const sellerList = ref([])
|
|
|
|
+const buyListLength = ref(0)
|
|
|
|
+const sellListLength = ref(0)
|
|
|
|
|
|
async function getBuySellListFunc() {
|
|
async function getBuySellListFunc() {
|
|
const { data } = await getBuySellList()
|
|
const { data } = await getBuySellList()
|
|
if (data.code === '00000') {
|
|
if (data.code === '00000') {
|
|
- console.log("buyerList >>", data.data.buyOrderList);
|
|
|
|
- console.log("sellerList >>", data.data.sellOrderList);
|
|
|
|
buyerList.value = data.data.buyOrderList
|
|
buyerList.value = data.data.buyOrderList
|
|
sellerList.value = data.data.sellOrderList
|
|
sellerList.value = data.data.sellOrderList
|
|
|
|
+
|
|
|
|
+ buyListLength.value = buyerList.value.length
|
|
|
|
+ sellListLength.value = sellerList.value.length
|
|
}
|
|
}
|
|
// 加载状态结束
|
|
// 加载状态结束
|
|
loading.value = false;
|
|
loading.value = false;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+// 使用 computed 确保不会返回超过10个元素的列表
|
|
|
|
+const visibleSellerList = computed(() => sellerList.value.slice(0, 10));
|
|
|
|
+const visibleBuyerList = computed(() => buyerList.value.slice(0, 10));
|
|
|
|
+
|
|
const pushPageList = (url) => {
|
|
const pushPageList = (url) => {
|
|
router.push(url);
|
|
router.push(url);
|
|
}
|
|
}
|