From 465b68fbef2ad7385b5b9a9f415dcd1fed9b7351 Mon Sep 17 00:00:00 2001 From: WindowBird <13870814+windows-bird@user.noreply.gitee.com> Date: Thu, 6 Nov 2025 09:40:48 +0800 Subject: [PATCH] =?UTF-8?q?=E8=81=94=E9=80=9A=E5=86=85=E5=AE=B9=E7=9C=8B?= =?UTF-8?q?=E6=9D=BF=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index/index.vue | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/pages/index/index.vue b/pages/index/index.vue index c500844..5fba5fc 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -140,6 +140,41 @@ onMounted(() => { }).catch(err => { console.error('getInfo 接口请求失败:', err); }); + + // 请求 dashboard/brief 接口 + const keys = [ + 'taskStatus', + 'taskTodayCompleted', + 'taskSoonExpire', + 'taskOverdueUncompleted', + 'projectStatus', + 'projectDevSoonExpire', + 'projectDevOverdue', + 'customerTodayCreate', + 'customerTodayFollowed', + 'customerTodayWaitFollow', + 'customerSoonFollow', + 'customerMonthFollow', + 'customerMonthFollowCount' + ]; + + + const params = ['joinUserId=23']; + keys.forEach((key) => { + params.push(`keys=${encodeURIComponent(key)}`); + }); + const queryString = params.join('&'); + + + uni.$uv.http.get(`dashboard/brief?${queryString}`, { + custom: { + auth: true // 启用 token 认证 + } + }).then(res => { + console.log('dashboard/brief 接口返回:', res); + }).catch(err => { + console.error('dashboard/brief 接口请求失败:', err); + }); }); // 页面显示时处理从新建日程页面返回的数据