功能完善

This commit is contained in:
2024-04-14 01:05:08 +08:00
parent a270c9be70
commit b676a1acd9
80 changed files with 118 additions and 52 deletions

View File

@@ -14,7 +14,7 @@
import { ref } from 'vue';
import { showToast } from '@/utils';
import { isPending } from '@/utils/order';
import { getOrderDeadline, isPending } from '@/utils/order';
import { getOrderList } from '@/api/order';
import OrderItem from '@/pages/mine/subs/order/components/order-item.vue';
import { OrderBean } from '@/api/order/types';
@@ -64,10 +64,10 @@ const fetchData = async (refresh: boolean = true) => {
const handleCountdown = (items: OrderBean[]) => {
clearInterval(currentInterval);
let second = 30 * 60;
currentInterval = setInterval(() => {
items.forEach(item => {
if(isPending(item)) {
let second = (getOrderDeadline(item) - Date.now()) / 1000;
item.countdown = second;
if(item.countdown <= 0) {
item.countdown = 0;