Leon 1 年之前
父节点
当前提交
95b81d650b

+ 8 - 5
src/features/trackSomething/components/DayNightCard.tsx

@@ -46,6 +46,9 @@ export default function DayNightCard(props: { isNight: boolean, switchChanged: F
 
     useEffect(() => {
         setInterval(() => {
+            if (!expand) {
+                return
+            }
             setCount((prevCounter) => prevCounter + 1)
         }, 1000)
     }, [])
@@ -99,7 +102,7 @@ export default function DayNightCard(props: { isNight: boolean, switchChanged: F
                     t('feature.track_time_duration.third_ring.enter_location_desc')
             }</Text>
             {
-                authInfo && <Text style={{ color: '#9E9E9E', fontSize: rpxToPx(20) }} onClick={(e)=>{
+                authInfo && <Text style={{ color: '#9E9E9E', fontSize: rpxToPx(20) }} onClick={(e) => {
                     e.stopPropagation()
                     auth()
                 }}>Edit Location</Text>
@@ -117,9 +120,9 @@ export default function DayNightCard(props: { isNight: boolean, switchChanged: F
         }
         var list = ['Current location Info',
             'Choose a new location']
-            if (user.test_user){
-                list.push('clear location data')
-            }
+        if (user.test_user) {
+            list.push('clear location data')
+        }
         Taro.showActionSheet({
             itemList: list
         }).then(res => {
@@ -264,7 +267,7 @@ export default function DayNightCard(props: { isNight: boolean, switchChanged: F
         var split = new Date().toString().split(' ');
         var timezone = split[split.length - 2];
         if (!authInfo) {
-            return <View style={{height:100,display:'flex',alignItems:'center',justifyContent:'center',width:rpxToPx(750)}}>
+            return <View style={{ height: 100, display: 'flex', alignItems: 'center', justifyContent: 'center', width: rpxToPx(750) }}>
                 <Text>暂时位置信息</Text>
             </View>
         }

+ 1 - 0
src/features/trackTimeDuration/components/WeekCalendarItem.scss

@@ -44,6 +44,7 @@
     background-color: #5A5A5A;
     -webkit-transform: scaleX(0.5);
     transform: scaleX(0.5);
+    transform-origin: left;
     width: 2px;
 }
 .horizontalLine{

+ 2 - 2
src/pages/clock/Index.tsx

@@ -423,8 +423,8 @@ export default function Page() {
                 }
 
                 {
-                    user.isLogin && <View>
-                        <Text className="discovery" style={{marginTop:rpxToPx(20)}}>周统计</Text>
+                    user.isLogin && <View style={{marginTop:rpxToPx(20)}}>
+                        <Text className="discovery" >周统计</Text>
                         <WeekCalendar />
                     </View>
                 }