From c458385ca5ead811aecf9d15e9be0995144221c3 Mon Sep 17 00:00:00 2001 From: wally <18603454788@163.com> Date: Tue, 10 Aug 2021 15:59:11 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=82=B9=E5=87=BB=E6=97=A5=E5=8E=86?= =?UTF-8?q?=E6=97=A5=E6=9C=9F=E6=9F=A5=E8=AF=A2=E9=A1=B9=E7=9B=AE=E5=88=97?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + src/pages/index/index.vue | 10 ++++++---- src/utils/upload.js | 1 - 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 935d1d0..2fbb2a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -48,6 +48,7 @@ - | 代码格式细节调整 | cb2532b - | 任务快捷方式图标增加 | 4aba872 - | 修改角色样式 | 73e268e + - | 删除mock,console;upload添加loading | 99d42e2 - | 删除多余字段 | 5ae3973 - | 删除插件携带的多余文件 | 0f392bb - | 删除没用代码 | 34b20e1 diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index 7fa1d25..855ae00 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -54,7 +54,6 @@ export default { }, onShow() { - console.log('index onShow'); if (!this.token) return; this.getProjects(); }, @@ -76,15 +75,18 @@ export default { this.days = [{ date: '2021-08-03' }, { date: '2021-08-04' }, { date: '2021-08-06' }]; }, + // 点击了某个日期 onDateChange(event) { - console.log(event); + const day = this.$moment(event.fullDate); + const start = day.startOf('date').valueOf(); + const end = day.endOf('date').valueOf(); + this.getProjects(start, end); }, - // 受到展示alert的消息 + // 收到展示alert的消息 onShowAlert(event) { this.alert.description = event || '发生了点小意外'; this.alert.show = true; - setTimeout(() => (this.alert.show = false), 10000); }, }, diff --git a/src/utils/upload.js b/src/utils/upload.js index 1eebe8b..1a20a91 100644 --- a/src/utils/upload.js +++ b/src/utils/upload.js @@ -34,7 +34,6 @@ export default { formData, header: { Authorization: `Bearer ${token}` }, success: ({ data, statusCode }) => { - console.log('s'); clearTimeout(timer); uni.hideLoading();