From 21636aeaa95fae4044da2606958bf97ccb295174 Mon Sep 17 00:00:00 2001 From: "271556543@qq.com" <271556543@qq.com> Date: Fri, 21 Oct 2022 14:44:47 +0800 Subject: [PATCH] 2022.10.21 --- pages/home/home.vue | 12 +++++++++--- pages/list/list.vue | 17 ++++++++++++----- pages/todayNursing/todayNursing.vue | 13 +++++++++++-- store/index.js | 3 ++- 4 files changed, 34 insertions(+), 11 deletions(-) diff --git a/pages/home/home.vue b/pages/home/home.vue index cdd545e..beaa66a 100644 --- a/pages/home/home.vue +++ b/pages/home/home.vue @@ -77,7 +77,7 @@ - + @@ -89,7 +89,7 @@ - + @@ -101,7 +101,7 @@ - + @@ -203,6 +203,12 @@ } }, methods: { + toList(index) { + this.$u.vuex('vuex_list_status', index) + uni.switchTab({ + url: '/pages/list/list' + }) + }, swiperChange(e) { this.swiperIndex = e.detail.current }, diff --git a/pages/list/list.vue b/pages/list/list.vue index a71c45e..a6f1575 100644 --- a/pages/list/list.vue +++ b/pages/list/list.vue @@ -252,18 +252,25 @@ } }, }, - mounted() { + onReachBottom() { + this.select.page++ + this.status = 'loading'; + this.getList() + }, + onShow() { + this.select.page = 1 + this.nursingList = [] + this.select.status = this.vuex_list_status uni.getLocation().then(res => { this.select.lat = res[1]?.latitude this.select.lng = res[1]?.longitude this.getList() }) + console.log(this.vuex_list_status); }, - onReachBottom() { - this.select.page++ - this.status = 'loading'; - this.getList() + onHide() { + this.$u.vuex('vuex_list_status', '') } } diff --git a/pages/todayNursing/todayNursing.vue b/pages/todayNursing/todayNursing.vue index d23dc8b..c300b8d 100644 --- a/pages/todayNursing/todayNursing.vue +++ b/pages/todayNursing/todayNursing.vue @@ -19,7 +19,8 @@ - {{item.start_time}} + {{timeFormat(item.start_time)}}~{{timeFormat(item.end_time,"HH:mm")}} + @@ -90,6 +91,7 @@