From 233a467167e2b363098cc7fa63e7f26d1d15507b Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期日, 27 四月 2025 16:23:28 +0800
Subject: [PATCH] 线索任务

---
 pages/cluetask/home/index.js |   30 +++++++++++++++++++++---------
 1 files changed, 21 insertions(+), 9 deletions(-)

diff --git a/pages/cluetask/home/index.js b/pages/cluetask/home/index.js
index 1069fa1..b148dff 100644
--- a/pages/cluetask/home/index.js
+++ b/pages/cluetask/home/index.js
@@ -1,9 +1,9 @@
+import dayjs from 'dayjs';
+
 import { useLoading } from '../../../behaviors/loading';
 import { useOptions } from './options-proxy.js';
 import { useStatistic } from './statistic-proxy.js';
 import { useTasks } from './tasks-proxy.js';
-
-import { fetchClueTask } from '../../../services/clue/fetchClue';
 
 const app = getApp();
 
@@ -19,9 +19,9 @@
 
   onShow() {
     if (this.getTabBar()) {
-      this.getTabBar().init();      
+      this.getTabBar().init();
     }
-    this.refresh();
+    // this.refresh();
   },
 
   onPullDownRefresh() {
@@ -45,14 +45,26 @@
   },
 
   refresh() {
-    this._startLoad();
+    if (this.optionsCount >= 2) this._startLoad();
   },
 
   _fetchData(page) {
-    return fetchClueTask({}).then(res => {
-      this.setData({ clueTaskList: res.data });
-      this.calClueCount();
-      this.formatClueTask();
+    const array = [];
+    array.push(this.searchClueTask(page));
+    if (page == 1) {
+      array.push(this.fetchClueTaskSummary(page));
+    }
+    return Promise.all(array).then(res => {
+      return res[0].head;
     });
   },
+
+  _getOptions() {
+    const { location, time } = this.data;
+    return {
+      ...location,
+      startTime: dayjs(time).startOf('month').format('YYYY-MM-DD HH:mm:ss'),
+      endTime: dayjs(time).endOf('month').format('YYYY-MM-DD HH:mm:ss'),
+    };
+  },
 });

--
Gitblit v1.9.3