From b515fae43490ab20977d559e19d4e5f63a4fd96d Mon Sep 17 00:00:00 2001 From: riku <risaku@163.com> Date: 星期五, 25 四月 2025 16:42:39 +0800 Subject: [PATCH] 应急线索模块 --- pages/cluetask/home/index.js | 15 +++++++++++---- 1 files changed, 11 insertions(+), 4 deletions(-) diff --git a/pages/cluetask/home/index.js b/pages/cluetask/home/index.js index 7af513c..1069fa1 100644 --- a/pages/cluetask/home/index.js +++ b/pages/cluetask/home/index.js @@ -3,7 +3,7 @@ import { useStatistic } from './statistic-proxy.js'; import { useTasks } from './tasks-proxy.js'; -import clueApi from '../../../services/clue/fetchClue'; +import { fetchClueTask } from '../../../services/clue/fetchClue'; const app = getApp(); @@ -18,7 +18,10 @@ onLoad(options) {}, onShow() { - this.getTabBar().init(); + if (this.getTabBar()) { + this.getTabBar().init(); + } + this.refresh(); }, onPullDownRefresh() { @@ -38,11 +41,15 @@ optionsCount: 0, init() { this.optionsCount++; - if (this.optionsCount == 2) this._startLoad(); + this.refresh(); + }, + + refresh() { + this._startLoad(); }, _fetchData(page) { - return clueApi.fetchClueTask({}).then(res => { + return fetchClueTask({}).then(res => { this.setData({ clueTaskList: res.data }); this.calClueCount(); this.formatClueTask(); -- Gitblit v1.9.3