Leon 2 anni fa
parent
commit
f5f589f095

+ 184 - 0
dist/base.wxml

@@ -61,6 +61,14 @@
   </button>
 </template>
 
+<template name="tmpl_0_23">
+  <form report-submit="{{xs.b(i.p1,!1)}}" bindsubmit="eh" bindreset="eh" name="{{i.p0}}" report-submit-timeout="{{xs.b(i.p2,0)}}" style="{{i.st}}" class="{{i.cl}}" bindtap="eh"  id="{{i.uid||i.sid}}" data-sid="{{i.sid}}">
+    <block wx:for="{{i.cn}}" wx:key="sid">
+      <template is="{{xs.a(c, item.nn, l)}}" data="{{i:item,c:c+1,l:xs.f(l,item.nn)}}" />
+    </block>
+  </form>
+</template>
+
 <template name="tmpl_0_27">
   <template is="{{xs.c(i, 'tmpl_0_')}}" data="{{i:i,c:c}}" />
 </template>
@@ -73,6 +81,14 @@
   <input value="{{i.p24}}" type="{{xs.b(i.p23,'')}}" password="{{xs.b(i.p11,!1)}}" placeholder="{{i.p12}}" placeholder-style="{{i.p14}}" placeholder-class="{{xs.b(i.p13,'input-placeholder')}}" disabled="{{i.p7}}" maxlength="{{xs.b(i.p9,140)}}" cursor-spacing="{{xs.b(i.p6,0)}}" confirm-type="{{xs.b(i.p4,'done')}}" confirm-hold="{{xs.b(i.p3,!1)}}" cursor="{{xs.b(i.p5,i.p24?i.p24.length:-1)}}" selection-start="{{xs.b(i.p22,-1)}}" selection-end="{{xs.b(i.p21,-1)}}" bindinput="eh" bindfocus="eh" bindblur="eh" bindconfirm="eh" name="{{i.p10}}" always-embed="{{xs.b(i.p1,false)}}" adjust-position="{{xs.b(i.p0,true)}}" hold-keyboard="{{xs.b(i.p8,false)}}" safe-password-cert-path="{{i.p15}}" safe-password-length="{{i.p17}}" safe-password-time-stamp="{{i.p20}}" safe-password-nonce="{{i.p18}}" safe-password-salt="{{i.p19}}" safe-password-custom-hash="{{i.p16}}" auto-fill="{{i.p2}}" bindkeyboardheightchange="eh" bindnicknamereview="eh" style="{{i.st}}" class="{{i.cl}}" bindtap="eh"  id="{{i.uid||i.sid}}" data-sid="{{i.sid}}"></input>
 </template>
 
+<template name="tmpl_0_29">
+  <label for="{{i.p0}}" name="{{i.p1}}" style="{{i.st}}" class="{{i.cl}}" bindtap="eh"  id="{{i.uid||i.sid}}" data-sid="{{i.sid}}">
+    <block wx:for="{{i.cn}}" wx:key="sid">
+      <template is="{{xs.a(c, item.nn, l)}}" data="{{i:item,c:c+1,l:xs.f(l,item.nn)}}" />
+    </block>
+  </label>
+</template>
+
 <template name="tmpl_0_44">
   <picker mode="{{xs.b(i.p6,'selector')}}" disabled="{{i.p1}}" range="{{i.p8}}" range-key="{{i.p9}}" value="{{i.p11}}" start="{{i.p10}}" end="{{i.p2}}" fields="{{xs.b(i.p3,'day')}}" custom-item="{{i.p0}}" name="{{i.p7}}" bindcancel="eh" bindchange="eh" bindcolumnchange="eh" header-text="{{i.p4}}" level="{{xs.b(i.p5,region)}}" style="{{i.st}}" class="{{i.cl}}" bindtap="eh"  id="{{i.uid||i.sid}}" data-sid="{{i.sid}}">
     <block wx:for="{{i.cn}}" wx:key="sid">
@@ -81,6 +97,42 @@
   </picker>
 </template>
 
+<template name="tmpl_0_54">
+  <slider min="{{xs.b(i.p7,0)}}" max="{{xs.b(i.p6,100)}}" step="{{xs.b(i.p11,1)}}" disabled="{{i.p5}}" value="{{xs.b(i.p12,0)}}" activeColor="{{xs.b(i.p0,'#1aad19')}}" backgroundColor="{{xs.b(i.p1,'#e9e9e9')}}" block-size="{{xs.b(i.p3,28)}}" block-color="{{xs.b(i.p2,'#ffffff')}}" show-value="{{xs.b(i.p10,!1)}}" bindchange="eh" bindchanging="eh" name="{{i.p8}}" color="{{xs.b(i.p4,'#e9e9e9')}}" selected-color="{{xs.b(i.p9,'#1aad19')}}" style="{{i.st}}" class="{{i.cl}}" bindtap="eh"  id="{{i.uid||i.sid}}" data-sid="{{i.sid}}"></slider>
+</template>
+
+<template name="tmpl_0_61">
+  <switch checked="{{xs.b(i.p0,!1)}}" disabled="{{i.p2}}" type="{{xs.b(i.p4,'switch')}}" color="{{xs.b(i.p1,'#04BE02')}}" bindchange="eh" name="{{i.p3}}" style="{{i.st}}" class="{{i.cl}}" bindtap="eh"  id="{{i.uid||i.sid}}" data-sid="{{i.sid}}"></switch>
+</template>
+
+<template name="tmpl_0_62">
+  <template is="{{xs.c(i, 'tmpl_0_')}}" data="{{i:i,c:c}}" />
+</template>
+
+<template name="tmpl_0_62_focus">
+  <textarea value="{{i.p19}}" placeholder="{{i.p13}}" placeholder-style="{{i.p15}}" placeholder-class="{{xs.b(i.p14,'textarea-placeholder')}}" disabled="{{i.p8}}" maxlength="{{xs.b(i.p11,140)}}" auto-focus="{{xs.b(i.p1,!1)}}" focus="{{xs.b(i.focus,!1)}}" auto-height="{{xs.b(i.p2,!1)}}" fixed="{{xs.b(i.p9,!1)}}" cursor-spacing="{{xs.b(i.p6,0)}}" cursor="{{xs.b(i.p5,i.p19?i.p19.length:-1)}}" selection-start="{{xs.b(i.p17,-1)}}" selection-end="{{xs.b(i.p16,-1)}}" bindfocus="eh" bindblur="eh" bindlinechange="eh" bindinput="eh" bindconfirm="eh" name="{{i.p12}}" show-confirm-bar="{{xs.b(i.p18,true)}}" adjust-position="{{xs.b(i.p0,true)}}" hold-keyboard="{{xs.b(i.p10,false)}}" disable-default-padding="{{xs.b(i.p7,false)}}" confirm-type="{{xs.b(i.p4,'return')}}" confirm-hold="{{xs.b(i.p3,false)}}" bindkeyboardheightchange="eh" style="{{i.st}}" class="{{i.cl}}" bindtap="eh"  id="{{i.uid||i.sid}}" data-sid="{{i.sid}}"></textarea>
+</template>
+
+<template name="tmpl_0_62_blur">
+  <textarea value="{{i.p19}}" placeholder="{{i.p13}}" placeholder-style="{{i.p15}}" placeholder-class="{{xs.b(i.p14,'textarea-placeholder')}}" disabled="{{i.p8}}" maxlength="{{xs.b(i.p11,140)}}" auto-focus="{{xs.b(i.p1,!1)}}" auto-height="{{xs.b(i.p2,!1)}}" fixed="{{xs.b(i.p9,!1)}}" cursor-spacing="{{xs.b(i.p6,0)}}" cursor="{{xs.b(i.p5,i.p19?i.p19.length:-1)}}" selection-start="{{xs.b(i.p17,-1)}}" selection-end="{{xs.b(i.p16,-1)}}" bindfocus="eh" bindblur="eh" bindlinechange="eh" bindinput="eh" bindconfirm="eh" name="{{i.p12}}" show-confirm-bar="{{xs.b(i.p18,true)}}" adjust-position="{{xs.b(i.p0,true)}}" hold-keyboard="{{xs.b(i.p10,false)}}" disable-default-padding="{{xs.b(i.p7,false)}}" confirm-type="{{xs.b(i.p4,'return')}}" confirm-hold="{{xs.b(i.p3,false)}}" bindkeyboardheightchange="eh" style="{{i.st}}" class="{{i.cl}}" bindtap="eh"  id="{{i.uid||i.sid}}" data-sid="{{i.sid}}"></textarea>
+</template>
+
+<template name="tmpl_0_35">
+  <movable-area scale-area="{{xs.b(i.p0,!1)}}" style="{{i.st}}" class="{{i.cl}}" bindtap="eh"  id="{{i.uid||i.sid}}" data-sid="{{i.sid}}">
+    <block wx:for="{{i.cn}}" wx:key="sid">
+      <template is="{{xs.a(c, item.nn, l)}}" data="{{i:item,c:c+1,l:xs.f(l,item.nn)}}" />
+    </block>
+  </movable-area>
+</template>
+
+<template name="tmpl_0_36">
+  <movable-view direction="{{xs.b(i.p2,none)}}" inertia="{{xs.b(i.p6,!1)}}" out-of-bounds="{{xs.b(i.p7,!1)}}" x="{{i.p13}}" y="{{i.p14}}" damping="{{xs.b(i.p1,20)}}" friction="{{xs.b(i.p4,2)}}" disabled="{{i.p3}}" scale="{{xs.b(i.p8,!1)}}" scale-min="{{xs.b(i.p10,0.5)}}" scale-max="{{xs.b(i.p9,10)}}" scale-value="{{xs.b(i.p11,1)}}" bindchange="eh" bindscale="eh" bindhtouchmove="eh" bindvtouchmove="eh" width="{{xs.b(i.p12,'10px')}}" height="{{xs.b(i.p5,'10px')}}" bindtouchstart="eh" bindtouchmove="eh" bindtouchend="eh" bindtouchcancel="eh" bindlongpress="eh" animation="{{i.p0}}" bindanimationstart="eh" bindanimationiteration="eh" bindanimationend="eh" bindtransitionend="eh" style="{{i.st}}" class="{{i.cl}}" bindtap="eh"  id="{{i.uid||i.sid}}" data-sid="{{i.sid}}">
+    <block wx:for="{{i.cn}}" wx:key="sid">
+      <template is="{{xs.a(c, item.nn, l)}}" data="{{i:item,c:c+1,l:xs.f(l,item.nn)}}" />
+    </block>
+  </movable-view>
+</template>
+
 <template name="tmpl_0_52">
   <scroll-view scroll-x="{{xs.b(i.p23,!1)}}" scroll-y="{{xs.b(i.p24,!1)}}" upper-threshold="{{xs.b(i.p27,50)}}" lower-threshold="{{xs.b(i.p8,50)}}" scroll-top="{{i.p21}}" scroll-left="{{i.p20}}" scroll-into-view="{{i.p17}}" scroll-with-animation="{{xs.b(i.p22,!1)}}" enable-back-to-top="{{xs.b(i.p3,!1)}}" bindscrolltoupper="eh" bindscrolltolower="eh" bindscroll="eh" bindtouchstart="eh" bindtouchmove="eh" bindtouchend="eh" bindtouchcancel="eh" bindlongpress="eh" animation="{{i.p0}}" bindanimationstart="eh" bindanimationiteration="eh" bindanimationend="eh" bindtransitionend="eh" type="{{xs.b(i.p26,'list')}}" event-passive="{{xs.b(i.p6,false)}}" enable-flex="{{xs.b(i.p4,false)}}" scroll-anchoring="{{xs.b(i.p16,false)}}" refresher-enabled="{{xs.b(i.p12,false)}}" refresher-threshold="{{xs.b(i.p13,45)}}" refresher-default-style="{{xs.b(i.p11,'black')}}" refresher-background="{{xs.b(i.p10,'#FFF')}}" refresher-triggered="{{xs.b(i.p14,false)}}" enhanced="{{xs.b(i.p5,false)}}" bounces="{{xs.b(i.p1,true)}}" show-scrollbar="{{xs.b(i.p25,true)}}" paging-enabled="{{xs.b(i.p9,false)}}" fast-deceleration="{{xs.b(i.p7,false)}}" reverse="{{xs.b(i.p15,false)}}" cache-extent="{{xs.b(i.p2,0)}}" scroll-into-view-within-extent="{{xs.b(i.p19,false)}}" scroll-into-view-alignment="{{xs.b(i.p18,'start')}}" binddragstart="eh" binddragging="eh" binddragend="eh" bindrefresherpulling="eh" bindrefresherrefresh="eh" bindrefresherrestore="eh" bindrefresherabort="eh" bindscrollstart="eh" bindscrollend="eh" bindrefresherwillrefresh="eh" style="{{i.st}}" class="{{i.cl}}" bindtap="eh"  id="{{i.uid||i.sid}}" data-sid="{{i.sid}}">
     <block wx:for="{{i.cn}}" wx:key="sid">
@@ -89,6 +141,22 @@
   </scroll-view>
 </template>
 
+<template name="tmpl_0_59">
+  <swiper indicator-dots="{{xs.b(i.p8,!1)}}" indicator-color="{{xs.b(i.p7,'rgba(0, 0, 0, .3)')}}" indicator-active-color="{{xs.b(i.p6,'#000000')}}" autoplay="{{xs.b(i.p0,!1)}}" current="{{xs.b(i.p2,0)}}" interval="{{xs.b(i.p9,5000)}}" duration="{{xs.b(i.p4,500)}}" circular="{{xs.b(i.p1,!1)}}" vertical="{{xs.b(i.p13,!1)}}" previous-margin="{{xs.b(i.p11,'0px')}}" next-margin="{{xs.b(i.p10,'0px')}}" display-multiple-items="{{xs.b(i.p3,1)}}" bindchange="eh" bindtransition="eh" bindanimationfinish="eh" bindtouchstart="eh" bindtouchmove="eh" bindtouchend="eh" bindtouchcancel="eh" bindlongpress="eh" snap-to-edge="{{xs.b(i.p12,false)}}" easing-function="{{xs.b(i.p5,'default')}}" style="{{i.st}}" class="{{i.cl}}" bindtap="eh"  id="{{i.uid||i.sid}}" data-sid="{{i.sid}}">
+    <block wx:for="{{i.cn}}" wx:key="sid">
+      <template is="{{xs.a(c, item.nn, l)}}" data="{{i:item,c:c+1,l:xs.f(l,item.nn)}}" />
+    </block>
+  </swiper>
+</template>
+
+<template name="tmpl_0_60">
+  <swiper-item item-id="{{i.p0}}" skip-hidden-item-layout="{{xs.b(i.p1,false)}}" class="{{i.cl}}" bindtap="eh"  id="{{i.uid||i.sid}}" data-sid="{{i.sid}}">
+    <block wx:for="{{i.cn}}" wx:key="sid">
+      <template is="{{xs.a(c, item.nn, l)}}" data="{{i:item,c:c+1,l:xs.f(l,item.nn)}}" />
+    </block>
+  </swiper-item>
+</template>
+
 <template name="tmpl_0_3">
   <image src="{{i.p3}}" mode="{{xs.b(i.p1,'scaleToFill')}}" lazy-load="{{xs.b(i.p0,!1)}}" webp="{{xs.b(i.p4,false)}}" show-menu-by-longpress="{{xs.b(i.p2,false)}}" style="{{i.st}}" class="{{i.cl}}"  id="{{i.uid||i.sid}}" data-sid="{{i.sid}}">
     <block wx:for="{{i.cn}}" wx:key="sid">
@@ -121,6 +189,10 @@
   </web-view>
 </template>
 
+<template name="tmpl_0_41">
+  <open-data type="{{i.p4}}" open-gid="{{i.p3}}" lang="{{xs.b(i.p2,'en')}}" default-text="{{i.p1}}" default-avatar="{{i.p0}}" binderror="eh" style="{{i.st}}" class="{{i.cl}}" bindtap="eh"  id="{{i.uid||i.sid}}" data-sid="{{i.sid}}"></open-data>
+</template>
+
 <template name="tmpl_0_8">
   <block>{{i.v}}</block>
 </template>
@@ -181,6 +253,22 @@
   </text>
 </template>
 
+<template name="tmpl_1_23">
+  <form report-submit="{{xs.b(i.p1,!1)}}" bindsubmit="eh" bindreset="eh" name="{{i.p0}}" report-submit-timeout="{{xs.b(i.p2,0)}}" style="{{i.st}}" class="{{i.cl}}" bindtap="eh"  id="{{i.uid||i.sid}}" data-sid="{{i.sid}}">
+    <block wx:for="{{i.cn}}" wx:key="sid">
+      <template is="{{xs.a(c, item.nn, l)}}" data="{{i:item,c:c+1,l:xs.f(l,item.nn)}}" />
+    </block>
+  </form>
+</template>
+
+<template name="tmpl_1_29">
+  <label for="{{i.p0}}" name="{{i.p1}}" style="{{i.st}}" class="{{i.cl}}" bindtap="eh"  id="{{i.uid||i.sid}}" data-sid="{{i.sid}}">
+    <block wx:for="{{i.cn}}" wx:key="sid">
+      <template is="{{xs.a(c, item.nn, l)}}" data="{{i:item,c:c+1,l:xs.f(l,item.nn)}}" />
+    </block>
+  </label>
+</template>
+
 <template name="tmpl_1_52">
   <scroll-view scroll-x="{{xs.b(i.p23,!1)}}" scroll-y="{{xs.b(i.p24,!1)}}" upper-threshold="{{xs.b(i.p27,50)}}" lower-threshold="{{xs.b(i.p8,50)}}" scroll-top="{{i.p21}}" scroll-left="{{i.p20}}" scroll-into-view="{{i.p17}}" scroll-with-animation="{{xs.b(i.p22,!1)}}" enable-back-to-top="{{xs.b(i.p3,!1)}}" bindscrolltoupper="eh" bindscrolltolower="eh" bindscroll="eh" bindtouchstart="eh" bindtouchmove="eh" bindtouchend="eh" bindtouchcancel="eh" bindlongpress="eh" animation="{{i.p0}}" bindanimationstart="eh" bindanimationiteration="eh" bindanimationend="eh" bindtransitionend="eh" type="{{xs.b(i.p26,'list')}}" event-passive="{{xs.b(i.p6,false)}}" enable-flex="{{xs.b(i.p4,false)}}" scroll-anchoring="{{xs.b(i.p16,false)}}" refresher-enabled="{{xs.b(i.p12,false)}}" refresher-threshold="{{xs.b(i.p13,45)}}" refresher-default-style="{{xs.b(i.p11,'black')}}" refresher-background="{{xs.b(i.p10,'#FFF')}}" refresher-triggered="{{xs.b(i.p14,false)}}" enhanced="{{xs.b(i.p5,false)}}" bounces="{{xs.b(i.p1,true)}}" show-scrollbar="{{xs.b(i.p25,true)}}" paging-enabled="{{xs.b(i.p9,false)}}" fast-deceleration="{{xs.b(i.p7,false)}}" reverse="{{xs.b(i.p15,false)}}" cache-extent="{{xs.b(i.p2,0)}}" scroll-into-view-within-extent="{{xs.b(i.p19,false)}}" scroll-into-view-alignment="{{xs.b(i.p18,'start')}}" binddragstart="eh" binddragging="eh" binddragend="eh" bindrefresherpulling="eh" bindrefresherrefresh="eh" bindrefresherrestore="eh" bindrefresherabort="eh" bindscrollstart="eh" bindscrollend="eh" bindrefresherwillrefresh="eh" style="{{i.st}}" class="{{i.cl}}" bindtap="eh"  id="{{i.uid||i.sid}}" data-sid="{{i.sid}}">
     <block wx:for="{{i.cn}}" wx:key="sid">
@@ -189,6 +277,22 @@
   </scroll-view>
 </template>
 
+<template name="tmpl_1_59">
+  <swiper indicator-dots="{{xs.b(i.p8,!1)}}" indicator-color="{{xs.b(i.p7,'rgba(0, 0, 0, .3)')}}" indicator-active-color="{{xs.b(i.p6,'#000000')}}" autoplay="{{xs.b(i.p0,!1)}}" current="{{xs.b(i.p2,0)}}" interval="{{xs.b(i.p9,5000)}}" duration="{{xs.b(i.p4,500)}}" circular="{{xs.b(i.p1,!1)}}" vertical="{{xs.b(i.p13,!1)}}" previous-margin="{{xs.b(i.p11,'0px')}}" next-margin="{{xs.b(i.p10,'0px')}}" display-multiple-items="{{xs.b(i.p3,1)}}" bindchange="eh" bindtransition="eh" bindanimationfinish="eh" bindtouchstart="eh" bindtouchmove="eh" bindtouchend="eh" bindtouchcancel="eh" bindlongpress="eh" snap-to-edge="{{xs.b(i.p12,false)}}" easing-function="{{xs.b(i.p5,'default')}}" style="{{i.st}}" class="{{i.cl}}" bindtap="eh"  id="{{i.uid||i.sid}}" data-sid="{{i.sid}}">
+    <block wx:for="{{i.cn}}" wx:key="sid">
+      <template is="{{xs.a(c, item.nn, l)}}" data="{{i:item,c:c+1,l:xs.f(l,item.nn)}}" />
+    </block>
+  </swiper>
+</template>
+
+<template name="tmpl_1_60">
+  <swiper-item item-id="{{i.p0}}" skip-hidden-item-layout="{{xs.b(i.p1,false)}}" class="{{i.cl}}" bindtap="eh"  id="{{i.uid||i.sid}}" data-sid="{{i.sid}}">
+    <block wx:for="{{i.cn}}" wx:key="sid">
+      <template is="{{xs.a(c, item.nn, l)}}" data="{{i:item,c:c+1,l:xs.f(l,item.nn)}}" />
+    </block>
+  </swiper-item>
+</template>
+
 <template name="tmpl_1_demo">
   <demo  id="{{i.uid||i.sid}}" data-sid="{{i.sid}}">
     <block wx:for="{{i.cn}}" wx:key="sid">
@@ -245,6 +349,22 @@
   </text>
 </template>
 
+<template name="tmpl_2_23">
+  <form report-submit="{{xs.b(i.p1,!1)}}" bindsubmit="eh" bindreset="eh" name="{{i.p0}}" report-submit-timeout="{{xs.b(i.p2,0)}}" style="{{i.st}}" class="{{i.cl}}" bindtap="eh"  id="{{i.uid||i.sid}}" data-sid="{{i.sid}}">
+    <block wx:for="{{i.cn}}" wx:key="sid">
+      <template is="{{xs.a(c, item.nn, l)}}" data="{{i:item,c:c+1,l:xs.f(l,item.nn)}}" />
+    </block>
+  </form>
+</template>
+
+<template name="tmpl_2_29">
+  <label for="{{i.p0}}" name="{{i.p1}}" style="{{i.st}}" class="{{i.cl}}" bindtap="eh"  id="{{i.uid||i.sid}}" data-sid="{{i.sid}}">
+    <block wx:for="{{i.cn}}" wx:key="sid">
+      <template is="{{xs.a(c, item.nn, l)}}" data="{{i:item,c:c+1,l:xs.f(l,item.nn)}}" />
+    </block>
+  </label>
+</template>
+
 <template name="tmpl_2_52">
   <scroll-view scroll-x="{{xs.b(i.p23,!1)}}" scroll-y="{{xs.b(i.p24,!1)}}" upper-threshold="{{xs.b(i.p27,50)}}" lower-threshold="{{xs.b(i.p8,50)}}" scroll-top="{{i.p21}}" scroll-left="{{i.p20}}" scroll-into-view="{{i.p17}}" scroll-with-animation="{{xs.b(i.p22,!1)}}" enable-back-to-top="{{xs.b(i.p3,!1)}}" bindscrolltoupper="eh" bindscrolltolower="eh" bindscroll="eh" bindtouchstart="eh" bindtouchmove="eh" bindtouchend="eh" bindtouchcancel="eh" bindlongpress="eh" animation="{{i.p0}}" bindanimationstart="eh" bindanimationiteration="eh" bindanimationend="eh" bindtransitionend="eh" type="{{xs.b(i.p26,'list')}}" event-passive="{{xs.b(i.p6,false)}}" enable-flex="{{xs.b(i.p4,false)}}" scroll-anchoring="{{xs.b(i.p16,false)}}" refresher-enabled="{{xs.b(i.p12,false)}}" refresher-threshold="{{xs.b(i.p13,45)}}" refresher-default-style="{{xs.b(i.p11,'black')}}" refresher-background="{{xs.b(i.p10,'#FFF')}}" refresher-triggered="{{xs.b(i.p14,false)}}" enhanced="{{xs.b(i.p5,false)}}" bounces="{{xs.b(i.p1,true)}}" show-scrollbar="{{xs.b(i.p25,true)}}" paging-enabled="{{xs.b(i.p9,false)}}" fast-deceleration="{{xs.b(i.p7,false)}}" reverse="{{xs.b(i.p15,false)}}" cache-extent="{{xs.b(i.p2,0)}}" scroll-into-view-within-extent="{{xs.b(i.p19,false)}}" scroll-into-view-alignment="{{xs.b(i.p18,'start')}}" binddragstart="eh" binddragging="eh" binddragend="eh" bindrefresherpulling="eh" bindrefresherrefresh="eh" bindrefresherrestore="eh" bindrefresherabort="eh" bindscrollstart="eh" bindscrollend="eh" bindrefresherwillrefresh="eh" style="{{i.st}}" class="{{i.cl}}" bindtap="eh"  id="{{i.uid||i.sid}}" data-sid="{{i.sid}}">
     <block wx:for="{{i.cn}}" wx:key="sid">
@@ -253,6 +373,22 @@
   </scroll-view>
 </template>
 
+<template name="tmpl_2_59">
+  <swiper indicator-dots="{{xs.b(i.p8,!1)}}" indicator-color="{{xs.b(i.p7,'rgba(0, 0, 0, .3)')}}" indicator-active-color="{{xs.b(i.p6,'#000000')}}" autoplay="{{xs.b(i.p0,!1)}}" current="{{xs.b(i.p2,0)}}" interval="{{xs.b(i.p9,5000)}}" duration="{{xs.b(i.p4,500)}}" circular="{{xs.b(i.p1,!1)}}" vertical="{{xs.b(i.p13,!1)}}" previous-margin="{{xs.b(i.p11,'0px')}}" next-margin="{{xs.b(i.p10,'0px')}}" display-multiple-items="{{xs.b(i.p3,1)}}" bindchange="eh" bindtransition="eh" bindanimationfinish="eh" bindtouchstart="eh" bindtouchmove="eh" bindtouchend="eh" bindtouchcancel="eh" bindlongpress="eh" snap-to-edge="{{xs.b(i.p12,false)}}" easing-function="{{xs.b(i.p5,'default')}}" style="{{i.st}}" class="{{i.cl}}" bindtap="eh"  id="{{i.uid||i.sid}}" data-sid="{{i.sid}}">
+    <block wx:for="{{i.cn}}" wx:key="sid">
+      <template is="{{xs.a(c, item.nn, l)}}" data="{{i:item,c:c+1,l:xs.f(l,item.nn)}}" />
+    </block>
+  </swiper>
+</template>
+
+<template name="tmpl_2_60">
+  <swiper-item item-id="{{i.p0}}" skip-hidden-item-layout="{{xs.b(i.p1,false)}}" class="{{i.cl}}" bindtap="eh"  id="{{i.uid||i.sid}}" data-sid="{{i.sid}}">
+    <block wx:for="{{i.cn}}" wx:key="sid">
+      <template is="{{xs.a(c, item.nn, l)}}" data="{{i:item,c:c+1,l:xs.f(l,item.nn)}}" />
+    </block>
+  </swiper-item>
+</template>
+
 <template name="tmpl_2_demo">
   <demo  id="{{i.uid||i.sid}}" data-sid="{{i.sid}}">
     <block wx:for="{{i.cn}}" wx:key="sid">
@@ -309,6 +445,22 @@
   </text>
 </template>
 
+<template name="tmpl_3_23">
+  <form report-submit="{{xs.b(i.p1,!1)}}" bindsubmit="eh" bindreset="eh" name="{{i.p0}}" report-submit-timeout="{{xs.b(i.p2,0)}}" style="{{i.st}}" class="{{i.cl}}" bindtap="eh"  id="{{i.uid||i.sid}}" data-sid="{{i.sid}}">
+    <block wx:for="{{i.cn}}" wx:key="sid">
+      <template is="{{xs.a(c, item.nn, l)}}" data="{{i:item,c:c+1,l:xs.f(l,item.nn)}}" />
+    </block>
+  </form>
+</template>
+
+<template name="tmpl_3_29">
+  <label for="{{i.p0}}" name="{{i.p1}}" style="{{i.st}}" class="{{i.cl}}" bindtap="eh"  id="{{i.uid||i.sid}}" data-sid="{{i.sid}}">
+    <block wx:for="{{i.cn}}" wx:key="sid">
+      <template is="{{xs.a(c, item.nn, l)}}" data="{{i:item,c:c+1,l:xs.f(l,item.nn)}}" />
+    </block>
+  </label>
+</template>
+
 <template name="tmpl_3_52">
   <scroll-view scroll-x="{{xs.b(i.p23,!1)}}" scroll-y="{{xs.b(i.p24,!1)}}" upper-threshold="{{xs.b(i.p27,50)}}" lower-threshold="{{xs.b(i.p8,50)}}" scroll-top="{{i.p21}}" scroll-left="{{i.p20}}" scroll-into-view="{{i.p17}}" scroll-with-animation="{{xs.b(i.p22,!1)}}" enable-back-to-top="{{xs.b(i.p3,!1)}}" bindscrolltoupper="eh" bindscrolltolower="eh" bindscroll="eh" bindtouchstart="eh" bindtouchmove="eh" bindtouchend="eh" bindtouchcancel="eh" bindlongpress="eh" animation="{{i.p0}}" bindanimationstart="eh" bindanimationiteration="eh" bindanimationend="eh" bindtransitionend="eh" type="{{xs.b(i.p26,'list')}}" event-passive="{{xs.b(i.p6,false)}}" enable-flex="{{xs.b(i.p4,false)}}" scroll-anchoring="{{xs.b(i.p16,false)}}" refresher-enabled="{{xs.b(i.p12,false)}}" refresher-threshold="{{xs.b(i.p13,45)}}" refresher-default-style="{{xs.b(i.p11,'black')}}" refresher-background="{{xs.b(i.p10,'#FFF')}}" refresher-triggered="{{xs.b(i.p14,false)}}" enhanced="{{xs.b(i.p5,false)}}" bounces="{{xs.b(i.p1,true)}}" show-scrollbar="{{xs.b(i.p25,true)}}" paging-enabled="{{xs.b(i.p9,false)}}" fast-deceleration="{{xs.b(i.p7,false)}}" reverse="{{xs.b(i.p15,false)}}" cache-extent="{{xs.b(i.p2,0)}}" scroll-into-view-within-extent="{{xs.b(i.p19,false)}}" scroll-into-view-alignment="{{xs.b(i.p18,'start')}}" binddragstart="eh" binddragging="eh" binddragend="eh" bindrefresherpulling="eh" bindrefresherrefresh="eh" bindrefresherrestore="eh" bindrefresherabort="eh" bindscrollstart="eh" bindscrollend="eh" bindrefresherwillrefresh="eh" style="{{i.st}}" class="{{i.cl}}" bindtap="eh"  id="{{i.uid||i.sid}}" data-sid="{{i.sid}}">
     <block wx:for="{{i.cn}}" wx:key="sid">
@@ -317,6 +469,22 @@
   </scroll-view>
 </template>
 
+<template name="tmpl_3_59">
+  <swiper indicator-dots="{{xs.b(i.p8,!1)}}" indicator-color="{{xs.b(i.p7,'rgba(0, 0, 0, .3)')}}" indicator-active-color="{{xs.b(i.p6,'#000000')}}" autoplay="{{xs.b(i.p0,!1)}}" current="{{xs.b(i.p2,0)}}" interval="{{xs.b(i.p9,5000)}}" duration="{{xs.b(i.p4,500)}}" circular="{{xs.b(i.p1,!1)}}" vertical="{{xs.b(i.p13,!1)}}" previous-margin="{{xs.b(i.p11,'0px')}}" next-margin="{{xs.b(i.p10,'0px')}}" display-multiple-items="{{xs.b(i.p3,1)}}" bindchange="eh" bindtransition="eh" bindanimationfinish="eh" bindtouchstart="eh" bindtouchmove="eh" bindtouchend="eh" bindtouchcancel="eh" bindlongpress="eh" snap-to-edge="{{xs.b(i.p12,false)}}" easing-function="{{xs.b(i.p5,'default')}}" style="{{i.st}}" class="{{i.cl}}" bindtap="eh"  id="{{i.uid||i.sid}}" data-sid="{{i.sid}}">
+    <block wx:for="{{i.cn}}" wx:key="sid">
+      <template is="{{xs.a(c, item.nn, l)}}" data="{{i:item,c:c+1,l:xs.f(l,item.nn)}}" />
+    </block>
+  </swiper>
+</template>
+
+<template name="tmpl_3_60">
+  <swiper-item item-id="{{i.p0}}" skip-hidden-item-layout="{{xs.b(i.p1,false)}}" class="{{i.cl}}" bindtap="eh"  id="{{i.uid||i.sid}}" data-sid="{{i.sid}}">
+    <block wx:for="{{i.cn}}" wx:key="sid">
+      <template is="{{xs.a(c, item.nn, l)}}" data="{{i:item,c:c+1,l:xs.f(l,item.nn)}}" />
+    </block>
+  </swiper-item>
+</template>
+
 <template name="tmpl_3_demo">
   <demo  id="{{i.uid||i.sid}}" data-sid="{{i.sid}}">
     <block wx:for="{{i.cn}}" wx:key="sid">
@@ -373,6 +541,14 @@
   </text>
 </template>
 
+<template name="tmpl_4_29">
+  <label for="{{i.p0}}" name="{{i.p1}}" style="{{i.st}}" class="{{i.cl}}" bindtap="eh"  id="{{i.uid||i.sid}}" data-sid="{{i.sid}}">
+    <block wx:for="{{i.cn}}" wx:key="sid">
+      <template is="{{xs.a(c, item.nn, l)}}" data="{{i:item,c:c+1,l:xs.f(l,item.nn)}}" />
+    </block>
+  </label>
+</template>
+
 <template name="tmpl_4_demo">
   <demo  id="{{i.uid||i.sid}}" data-sid="{{i.sid}}">
     <block wx:for="{{i.cn}}" wx:key="sid">
@@ -429,6 +605,14 @@
   </text>
 </template>
 
+<template name="tmpl_5_29">
+  <label for="{{i.p0}}" name="{{i.p1}}" style="{{i.st}}" class="{{i.cl}}" bindtap="eh"  id="{{i.uid||i.sid}}" data-sid="{{i.sid}}">
+    <block wx:for="{{i.cn}}" wx:key="sid">
+      <template is="{{xs.a(c, item.nn, l)}}" data="{{i:item,c:c+1,l:xs.f(l,item.nn)}}" />
+    </block>
+  </label>
+</template>
+
 <template name="tmpl_5_demo">
   <demo  id="{{i.uid||i.sid}}" data-sid="{{i.sid}}">
     <block wx:for="{{i.cn}}" wx:key="sid">

+ 15 - 1
dist/common.js

@@ -273,6 +273,7 @@ function Component(props) {
 /* harmony export */   API_CHECK_UNIQUE: function() { return /* binding */ API_CHECK_UNIQUE; },
 /* harmony export */   API_CLEAR_USER: function() { return /* binding */ API_CLEAR_USER; },
 /* harmony export */   API_FAST_CHECKS: function() { return /* binding */ API_FAST_CHECKS; },
+/* harmony export */   API_FAST_CLOCKS: function() { return /* binding */ API_FAST_CLOCKS; },
 /* harmony export */   API_FAST_PLANS: function() { return /* binding */ API_FAST_PLANS; },
 /* harmony export */   API_LOGIN: function() { return /* binding */ API_LOGIN; },
 /* harmony export */   API_LOGOUT: function() { return /* binding */ API_LOGOUT; },
@@ -305,6 +306,7 @@ var API_CHECK_UNIQUE = "".concat(baseUrl, "/api/user/check-unique");
 //track time duration
 var API_FAST_PLANS = "".concat(baseUrl, "/api/fast/plans");
 var API_FAST_CHECKS = "".concat(baseUrl, "/api/fast/checks");
+var API_FAST_CLOCKS = "".concat(baseUrl, "/api/fast/clocks");
 var API_FAST_CHECK_ABANDONED = "".concat(baseUrl, "/api/fast/check-abandoned");
 var API_FAST_RECORDS = "".concat(baseUrl, "/api/fast/records");
 var API_FAST_SCHEDULES = "".concat(baseUrl, "/api/fast/schedules");
@@ -548,6 +550,7 @@ var wxPubFollow = function wxPubFollow() {
 
 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
 /* harmony export */   getChecks: function() { return /* binding */ getChecks; },
+/* harmony export */   getClocks: function() { return /* binding */ getClocks; },
 /* harmony export */   getPlans: function() { return /* binding */ getPlans; },
 /* harmony export */   recordCheck: function() { return /* binding */ recordCheck; },
 /* harmony export */   setPlan: function() { return /* binding */ setPlan; }
@@ -597,10 +600,21 @@ var getChecks = function getChecks() {
     });
   });
 };
+var getClocks = function getClocks() {
+  return new Promise(function (resolve) {
+    (0,_http_request__WEBPACK_IMPORTED_MODULE_1__.request)({
+      url: _http_api__WEBPACK_IMPORTED_MODULE_0__.API_FAST_CLOCKS,
+      method: 'GET',
+      data: {}
+    }).then(function (res) {
+      resolve(res);
+    });
+  });
+};
 var recordCheck = function recordCheck(params) {
   return new Promise(function (resolve) {
     (0,_http_request__WEBPACK_IMPORTED_MODULE_1__.request)({
-      url: _http_api__WEBPACK_IMPORTED_MODULE_0__.API_FAST_CHECKS,
+      url: _http_api__WEBPACK_IMPORTED_MODULE_0__.API_FAST_CLOCKS,
       method: 'POST',
       data: (0,_Users_Work_hola_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__["default"])({}, params)
     }).then(function (res) {

File diff suppressed because it is too large
+ 0 - 0
dist/common.js.map


File diff suppressed because it is too large
+ 5824 - 52
dist/pages/Clock.js


File diff suppressed because it is too large
+ 0 - 0
dist/pages/Clock.js.map


+ 6 - 6
dist/prebundle/remoteEntry.js

@@ -18,12 +18,12 @@ var moduleMap = {
 	"./react-redux": function() {
 		return Promise.all([__webpack_require__.e("vendors-node_modules_taro_weapp_prebundle_chunk-77KB62LY_js"), __webpack_require__.e("vendors-node_modules_taro_weapp_prebundle_chunk-3EXGJ5BE_js"), __webpack_require__.e("vendors-node_modules_taro_weapp_prebundle_chunk-LNJCN3VW_js"), __webpack_require__.e("vendors-node_modules_taro_weapp_prebundle_chunk-2Y2U3MWF_js"), __webpack_require__.e("vendors-node_modules_taro_weapp_prebundle_react-redux_js")]).then(function() { return function() { return (__webpack_require__(/*! ./node_modules/.taro/weapp/prebundle/react-redux.js */ "./node_modules/.taro/weapp/prebundle/react-redux.js")); }; });
 	},
-	"./react-i18next": function() {
-		return Promise.all([__webpack_require__.e("vendors-node_modules_taro_weapp_prebundle_chunk-LNJCN3VW_js"), __webpack_require__.e("vendors-node_modules_taro_weapp_prebundle_react-i18next_js")]).then(function() { return function() { return (__webpack_require__(/*! ./node_modules/.taro/weapp/prebundle/react-i18next.js */ "./node_modules/.taro/weapp/prebundle/react-i18next.js")); }; });
-	},
 	"./@reduxjs/toolkit": function() {
 		return Promise.all([__webpack_require__.e("vendors-node_modules_taro_weapp_prebundle_chunk-77KB62LY_js"), __webpack_require__.e("vendors-node_modules_taro_weapp_prebundle_chunk-3EXGJ5BE_js"), __webpack_require__.e("vendors-node_modules_taro_weapp_prebundle_reduxjs_toolkit_js")]).then(function() { return function() { return (__webpack_require__(/*! ./node_modules/.taro/weapp/prebundle/@reduxjs_toolkit.js */ "./node_modules/.taro/weapp/prebundle/@reduxjs_toolkit.js")); }; });
 	},
+	"./react-i18next": function() {
+		return Promise.all([__webpack_require__.e("vendors-node_modules_taro_weapp_prebundle_chunk-LNJCN3VW_js"), __webpack_require__.e("vendors-node_modules_taro_weapp_prebundle_react-i18next_js")]).then(function() { return function() { return (__webpack_require__(/*! ./node_modules/.taro/weapp/prebundle/react-i18next.js */ "./node_modules/.taro/weapp/prebundle/react-i18next.js")); }; });
+	},
 	"./i18next-browser-languagedetector": function() {
 		return Promise.all([__webpack_require__.e("vendors-node_modules_taro_weapp_prebundle_chunk-77KB62LY_js"), __webpack_require__.e("vendors-node_modules_taro_weapp_prebundle_chunk-3EXGJ5BE_js"), __webpack_require__.e("vendors-node_modules_taro_weapp_prebundle_i18next-browser-languagedetector_js")]).then(function() { return function() { return (__webpack_require__(/*! ./node_modules/.taro/weapp/prebundle/i18next-browser-languagedetector.js */ "./node_modules/.taro/weapp/prebundle/i18next-browser-languagedetector.js")); }; });
 	},
@@ -86,12 +86,12 @@ var taroModuleMap = {
 	"./react-redux": function() {
 		return function() { return (__webpack_require__(/*! ./node_modules/.taro/weapp/prebundle/react-redux.js */ "./node_modules/.taro/weapp/prebundle/react-redux.js")); };
 	},
-	"./react-i18next": function() {
-		return function() { return (__webpack_require__(/*! ./node_modules/.taro/weapp/prebundle/react-i18next.js */ "./node_modules/.taro/weapp/prebundle/react-i18next.js")); };
-	},
 	"./@reduxjs/toolkit": function() {
 		return function() { return (__webpack_require__(/*! ./node_modules/.taro/weapp/prebundle/@reduxjs_toolkit.js */ "./node_modules/.taro/weapp/prebundle/@reduxjs_toolkit.js")); };
 	},
+	"./react-i18next": function() {
+		return function() { return (__webpack_require__(/*! ./node_modules/.taro/weapp/prebundle/react-i18next.js */ "./node_modules/.taro/weapp/prebundle/react-i18next.js")); };
+	},
 	"./i18next-browser-languagedetector": function() {
 		return function() { return (__webpack_require__(/*! ./node_modules/.taro/weapp/prebundle/i18next-browser-languagedetector.js */ "./node_modules/.taro/weapp/prebundle/i18next-browser-languagedetector.js")); };
 	},

+ 12 - 1
dist/taro.js

@@ -10,14 +10,25 @@
 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
 /* harmony export */   Button: function() { return /* binding */ Button; },
 /* harmony export */   Canvas: function() { return /* binding */ Canvas; },
+/* harmony export */   Form: function() { return /* binding */ Form; },
 /* harmony export */   Image: function() { return /* binding */ Image; },
 /* harmony export */   Input: function() { return /* binding */ Input; },
+/* harmony export */   Label: function() { return /* binding */ Label; },
+/* harmony export */   MovableArea: function() { return /* binding */ MovableArea; },
+/* harmony export */   MovableView: function() { return /* binding */ MovableView; },
+/* harmony export */   OpenData: function() { return /* binding */ OpenData; },
 /* harmony export */   Picker: function() { return /* binding */ Picker; },
+/* harmony export */   ScrollView: function() { return /* binding */ ScrollView; },
+/* harmony export */   Slider: function() { return /* binding */ Slider; },
+/* harmony export */   Swiper: function() { return /* binding */ Swiper; },
+/* harmony export */   SwiperItem: function() { return /* binding */ SwiperItem; },
+/* harmony export */   Switch: function() { return /* binding */ Switch; },
 /* harmony export */   Text: function() { return /* binding */ Text; },
+/* harmony export */   Textarea: function() { return /* binding */ Textarea; },
 /* harmony export */   View: function() { return /* binding */ View; },
 /* harmony export */   WebView: function() { return /* binding */ WebView; }
 /* harmony export */ });
-/* unused harmony exports Ad, AdCustom, Audio, Block, Camera, ChannelLive, ChannelVideo, Checkbox, CheckboxGroup, CoverImage, CoverView, CustomWrapper, Editor, Form, FunctionalPageNavigator, GridView, Icon, KeyboardAccessory, Label, ListView, LivePlayer, LivePusher, Map, MatchMedia, MovableArea, MovableView, NativeSlot, NavigationBar, Navigator, OfficialAccount, OpenData, PageContainer, PageMeta, PickerView, PickerViewColumn, Progress, Radio, RadioGroup, RichText, RootPortal, ScrollView, ShareElement, Slider, Slot, StickyHeader, StickySection, Swiper, SwiperItem, Switch, Textarea, Video, VoipRoom */
+/* unused harmony exports Ad, AdCustom, Audio, Block, Camera, ChannelLive, ChannelVideo, Checkbox, CheckboxGroup, CoverImage, CoverView, CustomWrapper, Editor, FunctionalPageNavigator, GridView, Icon, KeyboardAccessory, ListView, LivePlayer, LivePusher, Map, MatchMedia, NativeSlot, NavigationBar, Navigator, OfficialAccount, PageContainer, PageMeta, PickerView, PickerViewColumn, Progress, Radio, RadioGroup, RichText, RootPortal, ShareElement, Slot, StickyHeader, StickySection, Video, VoipRoom */
 var View = 'view';
 var Icon = 'icon';
 var Progress = 'progress';

+ 1 - 1
dist/taro.js.map

@@ -1 +1 @@
-{"version":3,"file":"taro.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACrBA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACHA;AACA;AACA;AACA","sources":["webpack://hola/.._src_components-react.ts","webpack://hola/._node_modules_@tarojs_webpack5-runner_dist_template_comp.js","webpack://hola/.._.._src_template_custom-wrapper.ts"],"sourcesContent":["// For React.createElement's type\nexport * from '@tarojs/components/mini'\nexport const Editor = 'editor'\nexport const MatchMedia = 'match-media'\nexport const FunctionalPageNavigator = 'functional-page-navigator'\nexport const LivePusher = 'live-pusher'\nexport const OfficialAccount = 'official-account'\nexport const OpenData = 'open-data'\nexport const NavigationBar = 'navigation-bar'\nexport const PageMeta = 'page-meta'\nexport const VoipRoom = 'voip-room'\nexport const AdCustom = 'ad-custom'\nexport const PageContainer = 'page-container'\nexport const ShareElement = 'share-element'\nexport const KeyboardAccessory = 'keyboard-accessory'\nexport const RootPortal = 'root-portal'\nexport const ChannelLive = 'channel-live'\nexport const ChannelVideo = 'channel-video'\nexport const ListView = 'list-view'\nexport const GridView = 'grid-view'\nexport const StickyHeader = 'sticky-header'\nexport const StickySection = 'sticky-section'\n","/* eslint-disable no-undef */\nimport { createRecursiveComponentConfig } from '@tarojs/runtime'\n// @ts-ignore\nComponent(createRecursiveComponentConfig())\n"],"names":[],"sourceRoot":""}
+{"version":3,"file":"taro.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACrBA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACHA;AACA;AACA;AACA","sources":["webpack://hola/.._src_components-react.ts","webpack://hola/._node_modules_@tarojs_webpack5-runner_dist_template_comp.js","webpack://hola/.._.._src_template_custom-wrapper.ts"],"sourcesContent":["// For React.createElement's type\nexport * from '@tarojs/components/mini'\nexport const Editor = 'editor'\nexport const MatchMedia = 'match-media'\nexport const FunctionalPageNavigator = 'functional-page-navigator'\nexport const LivePusher = 'live-pusher'\nexport const OfficialAccount = 'official-account'\nexport const OpenData = 'open-data'\nexport const NavigationBar = 'navigation-bar'\nexport const PageMeta = 'page-meta'\nexport const VoipRoom = 'voip-room'\nexport const AdCustom = 'ad-custom'\nexport const PageContainer = 'page-container'\nexport const ShareElement = 'share-element'\nexport const KeyboardAccessory = 'keyboard-accessory'\nexport const RootPortal = 'root-portal'\nexport const ChannelLive = 'channel-live'\nexport const ChannelVideo = 'channel-video'\nexport const ListView = 'list-view'\nexport const GridView = 'grid-view'\nexport const StickyHeader = 'sticky-header'\nexport const StickySection = 'sticky-section'\n","/* eslint-disable no-undef */\nimport { createRecursiveComponentConfig } from '@tarojs/runtime'\n// @ts-ignore\nComponent(createRecursiveComponentConfig())\n"],"names":[],"sourceRoot":""}

+ 9 - 5
src/features/trackTimeDuration/components/Console.tsx

@@ -57,7 +57,7 @@ export default function Component() {
     }
 
     function startFast() {
-        trackTimeService.send({ type: 'START_FAST' });
+        
         const start_time = new Date().getTime();
         const duration = 8 * 3600 * 1000;
         const extra = {
@@ -71,11 +71,12 @@ export default function Component() {
             extra: extra
         }).then(res => {
             console.log(res);
+            trackTimeService.send({ type: 'START_FAST' });
         });
         // dispatch(startFast());
     }
     function startSleep() {
-        trackTimeService.send({ type: 'START_SLEEP' });
+        
         const start_time = new Date().getTime();
         const duration = 8 * 3600 * 1000;
         const extra = {
@@ -89,11 +90,12 @@ export default function Component() {
             extra: extra
         }).then(res => {
             console.log(res);
+            trackTimeService.send({ type: 'START_SLEEP' });
         });
         // dispatch(startSleep());
     }
     function endSleep() {
-        trackTimeService.send({ type: 'END_SLEEP' });
+        
         const start_time = new Date().getTime();
         // const duration = 8 * 3600 * 1000;
         const extra = {
@@ -106,10 +108,11 @@ export default function Component() {
             extra: extra
         }).then(res => {
             console.log(res);
+            trackTimeService.send({ type: 'END_SLEEP' });
         });
     }
     function endFast() {
-        trackTimeService.send({ type: 'END_FAST' });
+        
         const start_time = new Date().getTime();
         // const duration = 8 * 3600 * 1000;
         const extra = {
@@ -122,8 +125,9 @@ export default function Component() {
             extra: extra
         }).then(res => {
             console.log(res);
+            trackTimeService.send({ type: 'END_FAST' });
             trackTimeService.send({ type: 'RESET' });
-            trackTimeService.send({ type: global.scenario.name });
+            trackTimeService.send({ type: global.scenario });
         });
     }
 

+ 1 - 1
src/features/trackTimeDuration/components/More.tsx

@@ -69,7 +69,7 @@ export default function Component() {
                                 console.log(res);
                                 trackTimeService.send({ type: 'RESET' });
 
-                                trackTimeService.send({ type: global.scenario.name });
+                                trackTimeService.send({ type: global.scenario });
                             });
                         }
                         break;

+ 210 - 17
src/features/trackTimeDuration/components/Schedule.tsx

@@ -3,16 +3,20 @@ import trackTimeService, { machine } from "@/store/trackTimeMachine"
 import { useEffect, useState } from "react";
 import Taro from "@tarojs/taro";
 import { TimeFormatter } from "@/utils/time_format";
-import {AtFloatLayout} from 'taro-ui';
+import { AtFloatLayout } from 'taro-ui';
 import "taro-ui/dist/style/components/float-layout.scss";
 
 
-export default function Component() {
+export default function Component(props: { type?: string }) {
     const [checkData, setCheckData] = useState(null)
 
     const [key, setKey] = useState('');
     const [value, setValue] = useState('');
+    const [isOpen, setIsOpen] = useState(false);
+    const [isLatest, setIsLatest] = useState(false);
 
+    const [timerId, setTimerId] = useState(null)
+    const [counter, setCounter] = useState(0)
 
     useEffect(() => {
         getStateDetail();
@@ -22,7 +26,7 @@ export default function Component() {
         if (machine.context.checkData) {
             setCheckData(machine.context.checkData as any);
         }
-
+        getStateDetail();
     }, [machine.context.checkData]);
     useEffect(() => {
         trackTimeService.onTransition(state => {
@@ -30,7 +34,44 @@ export default function Component() {
         });
     }, []);
 
+    useEffect(() => {
+        return () => {
+            // 在组件卸载时清除定时器
+            if (timerId) {
+                clearInterval(timerId);
+            }
+        };
+    }, [timerId]);
+
+    const startTimer = () => {
+        // 避免重复启动定时器
+        if (timerId) {
+            return;
+        }
+
+        const id = setInterval(() => {
+            setCounter((prevCounter) => prevCounter + 1);
+        }, 1000);
+
+        setTimerId(id as any);
+    };
+
+    const stopTimer = () => {
+        if (timerId) {
+            clearInterval(timerId);
+            setTimerId(null);
+        }
+    };
+
     function getStateDetail() {
+        if (props.type == 'latest') {
+            if (machine.context.checkData) {
+                setKey((machine.context.checkData as any).latest_record.scenario);
+                setValue((machine.context.checkData as any).latest_record.status);
+            }
+            return
+        }
+
         var state = trackTimeService.getSnapshot().value
         if ((state as any).FAST_SLEEP) {
             setKey('FAST_SLEEP');
@@ -53,26 +94,123 @@ export default function Component() {
         })
     }
 
+    function showStage() {
+        startTimer();
+        setIsLatest(false);
+        setIsOpen(true)
+    }
+
+    function showLatest() {
+        startTimer();
+        setIsLatest(true)
+        setIsOpen(true)
+    }
+
+    function getStepATime(obj) {
+        // if (obj.status == 'WAIT_FOR_START') return TimeFormatter.calculateTimeDifference(obj.sleep.)
+        if (obj.status == 'COMPLETED' && obj.sleep.status == 'NOT_STARTED') {
+            return '未知'
+        }
+        return obj.status == 'ONGOING1' ?
+            TimeFormatter.calculateTimeDifference(obj.fast.real_start_time, (new Date()).getTime()) :
+            obj.sleep.real_start_time ? TimeFormatter.calculateTimeDifference(obj.sleep.real_start_time, obj.fast.real_start_time ? obj.fast.real_start_time : obj.fast.target_start_time) :
+                TimeFormatter.calculateTimeDifference(obj.sleep.target_end_time, obj.fast.real_start_time ? obj.fast.real_start_time : obj.fast.target_start_time)
+    }
+
+    function getStepBTime(obj) {
+        if (obj.status == 'ONGOING1') return 'Next up'
+        if (obj.status == 'ONGOING2') return TimeFormatter.calculateTimeDifference(obj.sleep.real_start_time, (new Date()).getTime())
+        if (obj.status == 'WAIT_FOR_START') return TimeFormatter.calculateTimeDifference(obj.sleep.target_end_time, obj.sleep.target_start_time)
+        if (obj.sleep.status == 'NOT_COMPLETED' || obj.sleep.status == 'NOT_STARTED') return '未知'
+        return TimeFormatter.calculateTimeDifference(obj.sleep.real_end_time, obj.sleep.real_start_time)
+
+    }
+
+    function getStepCTime(obj) {
+        if (obj.status == 'ONGOING1') return 'Final stage'
+        if (obj.status == 'ONGOING2') return 'Next up'
+        if (obj.status == 'ONGOING3') return TimeFormatter.calculateTimeDifference(obj.sleep.real_end_time, (new Date()).getTime())
+        if (obj.status == 'WAIT_FOR_START') return TimeFormatter.calculateTimeDifference(obj.fast.target_end_time, obj.sleep.target_end_time)
+        if (obj.sleep.status == 'NOT_COMPLETED' || obj.sleep.status == 'NOT_STARTED') return '未知'
+        return TimeFormatter.calculateTimeDifference(obj.fast.real_end_time, obj.sleep.real_end_time)
+    }
+
+    function layoutContent() {
+        //当前断食阶段
+        var obj = isLatest ? (checkData as any).latest_record : (checkData as any).current_record
+        return <View style={{ flexDirection: 'column', display: 'flex' }}>
+            {
+                obj.status == 'WAIT_FOR_START' ? <Text>断食阶段目标</Text> :
+                    obj.status == 'COMPLETED' ? <Text>断食阶段</Text> :
+                        <Text>当前断食阶段</Text>
+            }
+            <View style={{ flexDirection: 'row', display: 'flex' }}>
+                <Text>阶段A</Text>
+                <Text style={{ color: obj.status == 'ONGOING1' ? '#AAFF00' : '', marginLeft: 20, marginRight: 20 }}> 睡前断食</Text>
+                <Text style={{ color: obj.status == 'ONGOING1' ? '#AAFF00' : '' }}> {
+                    getStepATime(obj)
+                }</Text>
+            </View>
+            <View style={{ flexDirection: 'row', display: 'flex' }}>
+                <Text>阶段B</Text>
+                <Text style={{ color: obj.status == 'ONGOING2' ? '#AAFF00' : '', marginLeft: 20, marginRight: 20 }}> 睡眠中断食</Text>
+
+                <Text style={{ color: obj.status == 'ONGOING2' ? '#AAFF00' : '' }}>
+                    {
+                        getStepBTime(obj)
+                    }
+                </Text>
+            </View>
+            <View style={{ flexDirection: 'row', display: 'flex' }}>
+                <Text>阶段C</Text>
+                <Text style={{ color: obj.status == 'ONGOING3' ? '#AAFF00' : '', marginLeft: 20, marginRight: 20 }}> 起床后断食</Text>
+                <Text style={{ color: obj.status == 'ONGOING3' ? '#AAFF00' : '' }}>
+                    {
+                        getStepCTime(obj)
+                    }
+                </Text>
+            </View>
+        </View>
+    }
+
     //🚫❌⭕️✅
     function statusString(isFast: boolean, isStart: boolean) {
+        if (props.type == 'latest') {
+            if (isFast) {
+                if ((checkData as any).latest_record.fast.status == 'COMPLETED') {
+                    return '✅'
+                }
+            }
+            else {
+                if ((checkData as any).latest_record.sleep.status == 'COMPLETED') {
+                    return '✅'
+                }
+                else if ((checkData as any).latest_record.sleep.status == 'NOT_STARTED') {
+                    return '🚫'
+                }
+                else if ((checkData as any).latest_record.sleep.status == 'NOT_COMPLETED') {
+                    return isStart ? '✅' : '🚫'
+                }
+            }
+        }
         if (value == 'WAIT_FOR_START') {
             return '⭕️'
         }
-        else if (value == 'ONGOING1'){
+        else if (value == 'ONGOING1') {
             if (isFast && isStart) {
                 return '✅'
             }
         }
-        else if (value == 'ONGOING2'){
-            if (isStart){
+        else if (value == 'ONGOING2') {
+            if (isStart) {
                 return '✅'
             }
         }
-        else if (value == 'ONGOING3'){
+        else if (value == 'ONGOING3') {
             if (isFast && !isStart) {
                 return '⭕️'
             }
-            else  {
+            else {
                 return '✅'
             }
         }
@@ -80,22 +218,77 @@ export default function Component() {
         return '⭕️'
     }
 
+    function scheduleItems() {
+        if (!checkData) {
+            return <View></View>
+        }
+        var obj = props.type == 'latest' ? (checkData as any).latest_record : (checkData as any).current_record;
+        return <View>
+            {
+                obj && <View style={{ flexDirection: 'column', display: 'flex' }}>
+                    {obj.fast && <Text>{statusString(true, true)}开始断食:{formateTime(obj.fast, false)}</Text>}
+                    {obj.sleep && <Text>{statusString(false, true)}开始睡眠:{formateTime(obj.sleep, false)}</Text>}
+                    {obj.sleep && <Text>{statusString(false, false)}结束睡眠:{formateTime(obj.sleep, true)}</Text>}
+                    {obj.fast && <Text>{statusString(true, false)}结束断食:{formateTime(obj.fast, true)}</Text>}
+                </View>
+            }
+        </View>
+    }
+
+    function formateTime(obj: any, isEnd: boolean) {
+
+        if (isEnd) {
+            if (obj.real_end_time) {
+                return TimeFormatter.formatTimestamp(obj.real_end_time)
+            }
+            else {
+                return TimeFormatter.formatTimestamp(obj.target_end_time)
+            }
+        }
+        else {
+            if (obj.real_start_time) {
+                return TimeFormatter.formatTimestamp(obj.real_start_time)
+            }
+            else {
+                return TimeFormatter.formatTimestamp(obj.target_start_time)
+            }
+        }
+
+    }
+
     return <View style={{ flexDirection: 'column', display: 'flex', alignItems: 'center' }}>
-        <Text>{value == 'WAIT_FOR_START' ? 'Schedule' : 'Log in Progress'}</Text>
         {
-            checkData && <View style={{ flexDirection: 'column', display: 'flex' }}>
-                {(checkData as any).target.fast && <Text>{statusString(true,true)}开始断食:{TimeFormatter.formatTimestamp((checkData as any).target.fast.start_time)}</Text>}
-                {(checkData as any).target.sleep && <Text>{statusString(false,true)}开始睡眠:{TimeFormatter.formatTimestamp((checkData as any).target.sleep.start_time)}</Text>}
-                {(checkData as any).target.sleep && <Text>{statusString(false,false)}结束睡眠:{TimeFormatter.formatTimestamp((checkData as any).target.sleep.end_time)}</Text>}
-                {(checkData as any).target.fast && <Text>{statusString(true,false)}结束断食:{TimeFormatter.formatTimestamp((checkData as any).target.fast.end_time)}</Text>}
-            </View>
+            props.type == 'latest' ? <Text style={{ color: 'red' }}>Latest</Text> :
+                <Text>{value == 'WAIT_FOR_START' ? 'Schedule' : 'Log in Progress'}</Text>
         }
+        {
+            scheduleItems()
+        }
+
         {
             value == 'WAIT_FOR_START' && <Text onClick={editSchedule}>调整日程</Text>
         }
         {
-            value == 'WAIT_FOR_START' ? <Text>Duration goals by stage</Text> : <Text>Current stage</Text>
+            props.type == 'latest' && <Text onClick={showLatest}>Durations by stage</Text>
+        }
+        {
+            props.type != 'latest' && (value == 'WAIT_FOR_START' ? <Text onClick={showStage}>Duration goals by stage</Text> : <Text onClick={showStage}>Current stage</Text>)
         }
 
-    </View>
+        <AtFloatLayout
+            isOpened={isOpen}
+            onClose={() => {
+                stopTimer()
+                setIsOpen(false)
+            }}
+            title="这是个标题">
+            {
+                checkData && layoutContent()
+            }
+
+
+        </AtFloatLayout>
+        <Text style={{ opacity: 0 }}>{counter}</Text>
+
+    </View >
 }

+ 44 - 10
src/pages/clock.tsx

@@ -14,10 +14,10 @@ import Clocks from '@/features/trackTimeDuration/components/Clock';
 import Console from '@/features/trackTimeDuration/components/Console';
 import More from '@/features/trackTimeDuration/components/More';
 import Schedule from '@/features/trackTimeDuration/components/Schedule';
-import { getChecks } from '@/services/trackTimeDuration';
+import { getChecks, getClocks } from '@/services/trackTimeDuration';
 import { setScenario } from '@/store/scenario';
 
-import { setSpecifiedStatus, setSpecifiedState,machine } from '@/store/trackTimeMachine';
+import { setSpecifiedStatus, setSpecifiedState, machine } from '@/store/trackTimeMachine';
 import trackTimeService from '@/store/trackTimeMachine';
 // import TabBar from '../../components/Tabbar';
 
@@ -31,7 +31,20 @@ export default function IndexPage() {
   array.push(<Text>ffff</Text>)
   // array.push(<Rings radius={50}/>)
 
-
+  useEffect(() => {
+    trackTimeService.onTransition(state => {
+      // console.log(state.value);
+      // console.log('aaaa')
+      if ((state.value as any).FAST_SLEEP == 'COMPLETED' ||
+        (state.value as any).FAST_SLEEP == 'ONGOING1' ||
+        (state.value as any).FAST_SLEEP == 'ONGOING2' ||
+        (state.value as any).FAST_SLEEP == 'ONGOING3' ||
+        (state.value as any).FAST == 'COMPLETED' ||
+        (state.value as any).SLEEP == 'COMPLETED') {
+        getCheckData()
+      }
+    })
+  }, [])
 
 
   useReady(async () => {
@@ -52,6 +65,25 @@ export default function IndexPage() {
   })
 
   function getCheckData() {
+    getClocks().then(res => {
+      machine.context.checkData = res as any;
+
+      global.scenario = (res as any).current_record.scenario;
+      trackTimeService.send({ type: 'RESET' });
+
+      trackTimeService.send({ type: (res as any).current_record.scenario });
+      const currentState = trackTimeService.getSnapshot();
+      let json = {};
+      var key = (res as any).current_record.scenario
+      var status = (res as any).current_record.status
+      json[key] = status
+      currentState.value = json;
+      // debugger
+      machine.context.currentStatus = `${key}.${status}`;//'mixed.ON_GOING2'
+
+      console.log(machine.context.checkData)
+    })
+    return
     getChecks().then(res => {
       if ((res as any).scenario) {
         dispatch(setScenario((res as any).scenario));
@@ -70,9 +102,9 @@ export default function IndexPage() {
         // setSpecifiedState();
         // console.log('name:'+(res as any).scenario.name)
         // machine.reset();
-        trackTimeService.send({type:'RESET'});
-        
-        trackTimeService.send({type:(res as any).scenario.name});
+        trackTimeService.send({ type: 'RESET' });
+
+        trackTimeService.send({ type: (res as any).scenario.name });
 
         const currentState = trackTimeService.getSnapshot();
         let json = {};
@@ -80,12 +112,12 @@ export default function IndexPage() {
         json[key] = (res as any).status
         currentState.value = json;
         // debugger
-        machine.context.currentStatus =  `${key}.${(res as any).status}`;//'mixed.ON_GOING2'
+        machine.context.currentStatus = `${key}.${(res as any).status}`;//'mixed.ON_GOING2'
         machine.context.checkData = res as any;
         // debugger
         // trackTimeService.send('APPLE');
         // machine.transition(`${key}.${(res as any).status}`,'' as any);
-        
+
         // trackTimeService.send({type:'START_FAST'});
         // trackTimeService.send({type:'START_SLEEP'});
         // trackTimeService.send({type:'END_SLEEP'});
@@ -93,7 +125,7 @@ export default function IndexPage() {
         // trackTimeService.send({type:'START_FAST'});
         // trackTimeService.send({type:'END_FAST'});
         // trackTimeService.send({type:'START_SLEEP'});
-        
+
         // console.log(currentState.value);
         // debugger
         // trackTimeService.send('setCurrentStatus', {status:(res as any).status});
@@ -162,7 +194,7 @@ export default function IndexPage() {
   return (
     <View style={{ backgroundColor: '#fff', flex: 1, flexDirection: 'column', display: 'flex' }}>
       {
-        permission.wxPubFollow == false ? <Text onClick={() => followWxPub()}>去关注公众号</Text>:<Text>已关注</Text>
+        permission.wxPubFollow == false ? <Text onClick={() => followWxPub()}>去关注公众号</Text> : <Text>已关注</Text>
       }
       {/* <ComponentA value="ABBBB" /> */}
       <Button onClick={() => goDetail()}>go detail</Button>
@@ -176,6 +208,8 @@ export default function IndexPage() {
       <More />
       <Schedule />
 
+      <Schedule type='latest' />
+
     </View>
   )
 }

+ 1 - 0
src/services/http/api.js

@@ -22,6 +22,7 @@ export const API_CHECK_UNIQUE = `${baseUrl}/api/user/check-unique`
 //track time duration
 export const API_FAST_PLANS = `${baseUrl}/api/fast/plans`
 export const API_FAST_CHECKS = `${baseUrl}/api/fast/checks`
+export const API_FAST_CLOCKS = `${baseUrl}/api/fast/clocks`
 export const API_FAST_CHECK_ABANDONED = `${baseUrl}/api/fast/check-abandoned`
 export const API_FAST_RECORDS = `${baseUrl}/api/fast/records`
 export const API_FAST_SCHEDULES = `${baseUrl}/api/fast/schedules`

+ 12 - 2
src/services/trackTimeDuration.tsx

@@ -1,5 +1,5 @@
 
-import { API_FAST_PLANS, API_FAST_CHECKS } from './http/api'
+import { API_FAST_PLANS, API_FAST_CHECKS,API_FAST_CLOCKS } from './http/api'
 import { request } from './http/request';
 
 export const getPlans = () => {
@@ -36,10 +36,20 @@ export const getChecks = () => {
     })
 }
 
+export const getClocks = () => {
+    return new Promise((resolve) => {
+        request({
+            url: API_FAST_CLOCKS, method: 'GET', data: {}
+        }).then(res => {
+            resolve(res);
+        })
+    })
+}
+
 export const recordCheck = (params: Record<string, any> | undefined) => {
     return new Promise((resolve) => {
         request({
-            url: API_FAST_CHECKS, method: 'POST', data: { ...params }
+            url: API_FAST_CLOCKS, method: 'POST', data: { ...params }
         }).then(res => {
             resolve(res);
         })

+ 8 - 8
src/store/trackTimeMachine.tsx

@@ -45,11 +45,11 @@ export const machine = createMachine(
           ONGOING: {
             on: {
               END_SLEEP: {
-                target: "DONE"
+                target: "COMPLETED"
               },
             },
           },
-          DONE: {},
+          COMPLETED: {},
         },
       },
       FAST_SLEEP: {
@@ -68,25 +68,25 @@ export const machine = createMachine(
                 target: "ONGOING2"
               },
               END_FAST: {
-                target: "DONE"
+                target: "COMPLETED"
               },
             },
           },
           ONGOING2: {
             on: {
               END_FAST: {
-                target: "DONE"
+                target: "COMPLETED"
               },
               END_SLEEP: {
                 target: "ONGOING3"
               },
             },
           },
-          DONE: {},
+          COMPLETED: {},
           ONGOING3: {
             on: {
               END_FAST: {
-                target: "DONE"
+                target: "COMPLETED"
               },
             },
           },
@@ -105,11 +105,11 @@ export const machine = createMachine(
           ONGOING: {
             on: {
               END_FAST: {
-                target: "DONE"
+                target: "COMPLETED"
               },
             },
           },
-          DONE: {},
+          COMPLETED: {},
         },
       },
     },

+ 67 - 48
src/utils/time_format.ts

@@ -1,52 +1,71 @@
 export class TimeFormatter {
-    static formatTimestamp(timestamp: number): string {
-      const currentDate = new Date();
-      const inputDate = new Date(timestamp);
-  
-      // 判断是否是今天
-      if (
-        inputDate.getDate() === currentDate.getDate() &&
-        inputDate.getMonth() === currentDate.getMonth() &&
-        inputDate.getFullYear() === currentDate.getFullYear()
-      ) {
-        return `今天 ${TimeFormatter.formatTime(inputDate)}`;
-      }
-  
-      // 判断是否是昨天
-      const yesterday = new Date();
-      yesterday.setDate(currentDate.getDate() - 1);
-  
-      if (
-        inputDate.getDate() === yesterday.getDate() &&
-        inputDate.getMonth() === yesterday.getMonth() &&
-        inputDate.getFullYear() === yesterday.getFullYear()
-      ) {
-        return `昨天 ${TimeFormatter.formatTime(inputDate)}`;
-      }
-  
-      // 判断是否是明天
-      const tomorrow = new Date();
-      tomorrow.setDate(currentDate.getDate() + 1);
-  
-      if (
-        inputDate.getDate() === tomorrow.getDate() &&
-        inputDate.getMonth() === tomorrow.getMonth() &&
-        inputDate.getFullYear() === tomorrow.getFullYear()
-      ) {
-        return `明天 ${TimeFormatter.formatTime(inputDate)}`;
-      }
-  
-      // 返回 YYYY-MM-DD HH:mm
-      return `${inputDate.getFullYear()}-${TimeFormatter.formatNumber(inputDate.getMonth() + 1)}-${TimeFormatter.formatNumber(
-        inputDate.getDate()
-      )} ${TimeFormatter.formatTime(inputDate)}`;
+  //格式化时间
+  static formatTimestamp(timestamp: number): string {
+    const currentDate = new Date();
+    const inputDate = new Date(timestamp);
+
+    // 判断是否是今天
+    if (
+      inputDate.getDate() === currentDate.getDate() &&
+      inputDate.getMonth() === currentDate.getMonth() &&
+      inputDate.getFullYear() === currentDate.getFullYear()
+    ) {
+      return `今天 ${TimeFormatter.formatTime(inputDate)}`;
     }
-  
-    static formatTime(date: Date): string {
-      return `${TimeFormatter.formatNumber(date.getHours())}:${TimeFormatter.formatNumber(date.getMinutes())}`;
+
+    // 判断是否是昨天
+    const yesterday = new Date();
+    yesterday.setDate(currentDate.getDate() - 1);
+
+    if (
+      inputDate.getDate() === yesterday.getDate() &&
+      inputDate.getMonth() === yesterday.getMonth() &&
+      inputDate.getFullYear() === yesterday.getFullYear()
+    ) {
+      return `昨天 ${TimeFormatter.formatTime(inputDate)}`;
     }
-  
-    static formatNumber(num: number): string {
-      return num.toString().padStart(2, '0');
+
+    // 判断是否是明天
+    const tomorrow = new Date();
+    tomorrow.setDate(currentDate.getDate() + 1);
+
+    if (
+      inputDate.getDate() === tomorrow.getDate() &&
+      inputDate.getMonth() === tomorrow.getMonth() &&
+      inputDate.getFullYear() === tomorrow.getFullYear()
+    ) {
+      return `明天 ${TimeFormatter.formatTime(inputDate)}`;
     }
-  }
+
+    // 返回 YYYY-MM-DD HH:mm
+    return `${inputDate.getFullYear()}-${TimeFormatter.formatNumber(inputDate.getMonth() + 1)}-${TimeFormatter.formatNumber(
+      inputDate.getDate()
+    )} ${TimeFormatter.formatTime(inputDate)}`;
+  }
+
+  static formatTime(date: Date): string {
+    return `${TimeFormatter.formatNumber(date.getHours())}:${TimeFormatter.formatNumber(date.getMinutes())}`;
+  }
+
+  static formatNumber(num: number): string {
+    return num.toString().padStart(2, '0');
+  }
+
+  //计算时间间隔
+  static calculateTimeDifference(startTimestamp: number, endTimestamp: number): string {
+    const diff = Math.abs(endTimestamp - startTimestamp);
+    // 计算小时、分钟和秒数
+    const hours = Math.floor(diff / (1000 * 60 * 60));
+    const minutes = Math.floor((diff % (1000 * 60 * 60)) / (1000 * 60));
+    const seconds = Math.floor((diff % (1000 * 60)) / 1000);
+
+    // 根据间隔的大小返回不同的格式
+    if (diff < 60000) {
+      return `${seconds}秒`;
+    } else if (diff < 3600000) {
+      return `${minutes}分${seconds}秒`;
+    } else {
+      return `${hours}小时${minutes}分${seconds}秒`;
+    }
+  }
+}

Some files were not shown because too many files changed in this diff