功能完善
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user