From e0319762c9995dcfbb8d53b10e999b6bd9c4d08c Mon Sep 17 00:00:00 2001 From: luyuan <1162963624@qq.com> Date: Fri, 30 Oct 2020 09:31:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=91=A8=E5=8E=86=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/regime/week.vue | 54 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 52 insertions(+), 2 deletions(-) diff --git a/src/views/regime/week.vue b/src/views/regime/week.vue index a11d2d2..5643380 100644 --- a/src/views/regime/week.vue +++ b/src/views/regime/week.vue @@ -39,7 +39,7 @@
-
+
{{ item > 10 ? item - 1 : "0" + (item - 1) }}:00-{{ item > 9 ? item : "0" + item }}:00 @@ -55,6 +55,13 @@
+
+
+
+
+
+
{{times}}
+
@@ -146,6 +153,7 @@ .body { width: 100%; overflow: hidden; + position: relative; .row { background-color: #fff; height: 63px; @@ -205,6 +213,32 @@ border: unset; } } + .lien{ + width: 100%; + position: absolute; + top: 0; + left: 128px; + .heng{ + display: flex; + align-items: center; + } + .dian{ + width: 6px; + height: 6px; + flex-shrink: 0; + background-color: #FFFA18; + border-radius: 50%; + } + .xian{ + width: 100%; + height: 2px; + background: linear-gradient(90deg, #FFFA18, #D0EB3D, #87E062, #42DE9D, #00DAC2); + } + } + .times{ + font-size: 11px; + color: #FFFA18; + } } } } @@ -215,6 +249,7 @@ import { getDay, gethour, getminute, gettime, getweek } from "@/utils/date"; import store from '@/store'; import { getdatelist, userinfo } from '@/api'; import router from '@/router'; +import dayjs from 'dayjs'; export default defineComponent({ props: {}, @@ -247,6 +282,18 @@ export default defineComponent({ getdates(userid); + const top = ref(0); + const times = ref(''); + const xs = ref(0); + setInterval(()=>{ + const now = dayjs(); + const xiaoshi = now.month() + const fenzhong = now.minute() + top.value = (xiaoshi + (fenzhong / 60)) * 0.63; + times.value = (xiaoshi > 10 ? xiaoshi : '0' + xiaoshi) + ":" + (fenzhong > 10 ? fenzhong : '0' + fenzhong); + xs.value = xiaoshi; + }, 2000) + watch(zhou, (value) => { week.value = getweek(value); console.log(week.value); @@ -272,7 +319,10 @@ export default defineComponent({ zhou, week, navto, - zhuangtai + zhuangtai, + top, + times, + xs }; }, });