Leon 2 år sedan
förälder
incheckning
e7b33bf17e

+ 13 - 7
src/components/layout/Box.tsx

@@ -3,6 +3,7 @@ import './Box.scss'
 import { BoxType } from "@/utils/types";
 import Taro from "@tarojs/taro";
 import { ColorType } from "@/context/themes/color";
+import { rpxToPx } from "@/utils/tools";
 
 export default function Component(props: {
     children: React.ReactNode,
@@ -11,7 +12,7 @@ export default function Component(props: {
     style?: any,
     type?: BoxType,
     onClick?: Function,
-    tranparentBg?:boolean
+    tranparentBg?: boolean
 }) {
 
     function onClick(e) {
@@ -37,10 +38,15 @@ export default function Component(props: {
             </View>
     }
 
-    return <View className="box-container" style={{ ...props.style,backgroundColor:props.tranparentBg?'transparent':ColorType.box }} onTap={onClick}>
-            {
-                props.title && <Text className="box-title">{props.title}</Text>
-            }
-            {props.children}
-        </View>
+    return <View className="box-container"
+        style={{
+            ...props.style,
+            backgroundColor: props.tranparentBg ? 'transparent' : ColorType.box,
+            // marginBottom: props.marginBottom ? props.marginBottom : rpxToPx(24)
+        }} onTap={onClick}>
+        {
+            props.title && <Text className="box-title">{props.title}</Text>
+        }
+        {props.children}
+    </View>
 }

+ 3 - 2
src/features/trackTimeDuration/components/Console.tsx

@@ -19,6 +19,7 @@ import { useTranslation } from "react-i18next";
 import { ColorType } from "@/context/themes/color";
 import { jumpPage } from "../hooks/Common";
 import { setFoodTabBadge } from "@/store/common";
+import { rpxToPx } from "@/utils/tools";
 
 let useNavigation;
 if (process.env.TARO_ENV == 'rn') {
@@ -561,8 +562,8 @@ export default function Component(props: { isNextStep?: boolean }) {
         return <View />
     }
     return (
-        <Box >
-            <View style={{ display: 'flex', flexDirection: 'column', alignItems: 'center', flexShrink: 0 }}>
+        <Box style={{marginBottom:0}}>
+            <View style={{ display: 'flex', flexDirection: 'column', alignItems: 'center', flexShrink: 0,}}>
                 {
                     isLoaded && ongoing()
                 }

+ 1 - 0
src/pages/clock/Clock.scss

@@ -42,6 +42,7 @@
 
 .swiper {
   height: 360px;
+  
 }
 
 .console_bg {

+ 0 - 1
src/pages/clock/Clock.weapp.tsx

@@ -417,7 +417,6 @@ export default function IndexPage() {
           autoplay={autoPlay}
           duration={300}
           interval={300}
-          // indicator-margin={30}
           indicator-offset={[0, -30]}
           indicator-height={30}
           indicatorDots={global.consoleType == 'idle'}