|
@@ -3,7 +3,7 @@
|
|
<div class="tradingPage flex-col">
|
|
<div class="tradingPage flex-col">
|
|
<div class="listBox">
|
|
<div class="listBox">
|
|
<s-header :name="sys ? sys.title : $t('trading.tradingCenter')" :noback="true" :isFixed="false"></s-header>
|
|
<s-header :name="sys ? sys.title : $t('trading.tradingCenter')" :noback="true" :isFixed="false"></s-header>
|
|
-
|
|
|
|
|
|
+ <van-notice-bar scrollable text="每周日15:00停盘,周一00:00开始新的一轮。" left-icon="info-o" />
|
|
<!-- 挂单交易 -->
|
|
<!-- 挂单交易 -->
|
|
<div class="tradingBox1 flex-col">
|
|
<div class="tradingBox1 flex-col">
|
|
<div class="searchRow flex-row justify-between">
|
|
<div class="searchRow flex-row justify-between">
|
|
@@ -18,14 +18,17 @@
|
|
|
|
|
|
<!-- 交易时间 倒计时 -->
|
|
<!-- 交易时间 倒计时 -->
|
|
<div class="countDown" style="text-align: center; display: flex; align-items: center; justify-content: center;">
|
|
<div class="countDown" style="text-align: center; display: flex; align-items: center; justify-content: center;">
|
|
- <span>距离今日停盘还有:</span>
|
|
|
|
|
|
+ <span>距离每周停盘还有:</span>
|
|
<van-count-down :time="countDownTime">
|
|
<van-count-down :time="countDownTime">
|
|
<template #default="timeData">
|
|
<template #default="timeData">
|
|
|
|
+ <span class="block">{{ timeData.days }}</span>
|
|
|
|
+ <span class="colon">日</span>
|
|
<span class="block">{{ timeData.hours }}</span>
|
|
<span class="block">{{ timeData.hours }}</span>
|
|
- <span class="colon">:</span>
|
|
|
|
|
|
+ <span class="colon">时</span>
|
|
<span class="block">{{ timeData.minutes }}</span>
|
|
<span class="block">{{ timeData.minutes }}</span>
|
|
- <span class="colon">:</span>
|
|
|
|
|
|
+ <span class="colon">分</span>
|
|
<span class="block">{{ timeData.seconds }}</span>
|
|
<span class="block">{{ timeData.seconds }}</span>
|
|
|
|
+ <span class="colon">秒</span>
|
|
</template>
|
|
</template>
|
|
</van-count-down>
|
|
</van-count-down>
|
|
</div>
|
|
</div>
|
|
@@ -83,7 +86,7 @@
|
|
</div>
|
|
</div>
|
|
<!-- 买家挂单详情 -->
|
|
<!-- 买家挂单详情 -->
|
|
|
|
|
|
- <div class="buy-box" >
|
|
|
|
|
|
+ <div class="buy-box">
|
|
<van-row justify="center" class="bold-row" style="font-weight: bold; color: #CD5C5C;">
|
|
<van-row justify="center" class="bold-row" style="font-weight: bold; color: #CD5C5C;">
|
|
<van-col span="8">用户名</van-col>
|
|
<van-col span="8">用户名</van-col>
|
|
<van-col span="8">交易数量</van-col>
|
|
<van-col span="8">交易数量</van-col>
|
|
@@ -137,7 +140,7 @@ import { onMounted, reactive, toRefs, ref } from "vue";
|
|
import sHeader from "@/components/SimpleHeader";
|
|
import sHeader from "@/components/SimpleHeader";
|
|
import { getLoginUser, Format_calcuDecial, styleUrl } from "@/common/js/utils";
|
|
import { getLoginUser, Format_calcuDecial, styleUrl } from "@/common/js/utils";
|
|
import {
|
|
import {
|
|
-
|
|
|
|
|
|
+
|
|
} from "../../service/trading/index";
|
|
} from "../../service/trading/index";
|
|
import { useRouter } from "vue-router";
|
|
import { useRouter } from "vue-router";
|
|
|
|
|
|
@@ -157,7 +160,33 @@ export default {
|
|
const user = getLoginUser();
|
|
const user = getLoginUser();
|
|
const labelList = ref([]);
|
|
const labelList = ref([]);
|
|
|
|
|
|
- const countDownTime = ref(0);
|
|
|
|
|
|
+ // const countDownTime = ref(0);
|
|
|
|
+
|
|
|
|
+ const countDownTime = ref(calculateCountDownTime());
|
|
|
|
+
|
|
|
|
+ function calculateCountDownTime() {
|
|
|
|
+ const now = new Date();
|
|
|
|
+ const day = now.getDay();
|
|
|
|
+ const hours = now.getHours();
|
|
|
|
+ const minutes = now.getMinutes();
|
|
|
|
+ const seconds = now.getSeconds();
|
|
|
|
+
|
|
|
|
+ let remainingTime = 0;
|
|
|
|
+
|
|
|
|
+ // Sunday 3 PM to Monday 12 AM (0 AM)
|
|
|
|
+ if (day === 0 && hours >= 15) {
|
|
|
|
+ remainingTime = (8 - hours) * 3600 - minutes * 60 - seconds;
|
|
|
|
+ } else {
|
|
|
|
+ remainingTime = (7 - day) * 24 * 3600 + (15 - hours) * 3600 - minutes * 60 - seconds;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return remainingTime * 1000; // Convert to milliseconds
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ setInterval(() => {
|
|
|
|
+ countDownTime.value = calculateCountDownTime();
|
|
|
|
+ }, 1000);
|
|
|
|
+
|
|
|
|
|
|
const buyerList = ref([]);
|
|
const buyerList = ref([]);
|
|
buyerList.value = [
|
|
buyerList.value = [
|
|
@@ -178,8 +207,8 @@ export default {
|
|
const pushPageList = (url) => {
|
|
const pushPageList = (url) => {
|
|
router.push(url);
|
|
router.push(url);
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
// 页面列表查询参数
|
|
// 页面列表查询参数
|
|
let searchParams = reactive({
|
|
let searchParams = reactive({
|
|
current: 1, // 当前页,默认第一页,1
|
|
current: 1, // 当前页,默认第一页,1
|
|
@@ -191,7 +220,7 @@ export default {
|
|
init();
|
|
init();
|
|
// 加载样式
|
|
// 加载样式
|
|
styleUrl('trading');
|
|
styleUrl('trading');
|
|
-
|
|
|
|
|
|
+
|
|
});
|
|
});
|
|
// 初始化
|
|
// 初始化
|
|
const init = () => {
|
|
const init = () => {
|
|
@@ -212,8 +241,8 @@ export default {
|
|
searchParams.current = searchParams.current + 1;
|
|
searchParams.current = searchParams.current + 1;
|
|
}
|
|
}
|
|
};
|
|
};
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
return {
|
|
return {
|
|
...toRefs(searchParams),
|
|
...toRefs(searchParams),
|
|
list,
|
|
list,
|