|
|
@@ -1,5 +1,6 @@
|
|
|
import {getOrderDateList} from '@apis';
|
|
|
import {useQuery} from '@tanstack/react-query';
|
|
|
+import {useReady} from '@tarojs/taro';
|
|
|
import dayjs from 'dayjs';
|
|
|
import {groupBy} from 'lodash-es';
|
|
|
import {useState} from 'react';
|
|
|
@@ -12,6 +13,13 @@ export function useList() {
|
|
|
'-' +
|
|
|
dayjs().daysInMonth().toString().padStart(2, '0'),
|
|
|
});
|
|
|
+ const [enabled, setEnabled] = useState(false);
|
|
|
+
|
|
|
+ useReady(function () {
|
|
|
+ setTimeout(function () {
|
|
|
+ setEnabled(true);
|
|
|
+ }, 50);
|
|
|
+ });
|
|
|
|
|
|
function onDateChange(start, end) {
|
|
|
setParams({agoScrq: start, endScrq: end});
|
|
|
@@ -32,6 +40,7 @@ export function useList() {
|
|
|
},
|
|
|
placeholderData: [],
|
|
|
keepPreviousData: true,
|
|
|
+ enabled,
|
|
|
});
|
|
|
|
|
|
return [
|