Explorar el Código

fix some bugs

leon hace 1 año
padre
commit
e2beefb248

+ 0 - 1
src/app.tsx

@@ -114,7 +114,6 @@ const App: React.FC<PropsWithChildren> = ({ children }) => {
     // //连接状态
     // JPush.addConnectEventListener(result => {
     //   console.log(result)
-    //   debugger
     // })
     // console.log('rn jpush init')
 

+ 0 - 3
src/components/input/SlidngScale.tsx

@@ -198,9 +198,6 @@ export default function Component(props: {
     // }
     // svg2 += `</svg>`
 
-    // console.log(svg2)
-    // debugger
-
     var svgLine = `<svg xmlns="http://www.w3.org/2000/svg" width="100" height="${rpxToPx(28)}">`;
     var svgNumber = `<svg xmlns="http://www.w3.org/2000/svg" width="${list.length * 10 - 8 + 60}" height="${rpxToPx(38)}">`;
     for (var i = 0; i < 10; i++) {

+ 0 - 1
src/components/layout/layout.tsx

@@ -98,7 +98,6 @@ export default function Layout(props: {
             const { contentSize, contentOffset, layoutMeasurement } = e.nativeEvent;
             const isAtTheBottom =
                 contentSize.height - contentOffset.y <= layoutMeasurement.height;
-            debugger
             if (isAtTheBottom && props.more){
                 props.more()
             }

+ 1 - 2
src/features/auth/components/login.tsx

@@ -49,7 +49,6 @@ export default function Login(props: { register: () => void }) {
                 Taro.navigateBack({
                     delta: 1
                 })
-                debugger
                 Taro.redirectTo({
                     url: '/pages/clock/ChooseScenario?trigger_event=SETUP_UPON_ACCOUNT_CREATION'
                 })
@@ -140,7 +139,7 @@ export default function Login(props: { register: () => void }) {
         const resource = common.resources.filter((item: any) => {
             return item.code == 'privacy'
         })
-        debugger
+        
         if (!resource || resource.length == 0) {
             Taro.showToast({
                 title: 'Not found.',

+ 0 - 4
src/features/daynight/DayNightRing.tsx

@@ -48,10 +48,6 @@ export default function DayNightRing(props: {
             var start = new Date('2024-01-01T' + time)
             realRingBig.startArc = (start.getHours() * 3600 + start.getMinutes() * 60) / (24 * 3600) * 2 * Math.PI - Math.PI / 2.0;
             realRingBig.durationArc = (duration) / (24 * 3600) * 2 * Math.PI;
-            // if (!realRingBig.startArc){
-            //     realRingBig = null
-            // }
-            debugger
             return <Rings common={common} bgRing={bgRing} targetRing={realRingBig} canvasId={props.canvasId} />
 
         }

+ 1 - 0
src/features/daynight/DayNightSwiper.tsx

@@ -32,6 +32,7 @@ export default function DayNightSwiper(props: { count: number, schedule: any, ho
         getLatestLocation()
     }, [user.isLogin])
     global.swiperDayNightRefresh = () => {
+        debugger
         getLatestLocation()
     }
 

+ 0 - 1
src/features/food/FoodConsole.tsx

@@ -202,7 +202,6 @@ export default function Component(props: { addItem: Function, firstItem: any })
         var time = date.getTime()
         var strDate = (date.getFullYear() + '') + (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : (date.getMonth() + 1)) + (date.getDate() < 10 ? '0' + date.getDate() : date.getDate());
         var event = await getFoodCache('create')
-        debugger
         createFoodJournal({
             media: [{
                 url,

+ 1 - 1
src/features/food/hooks/ExtraData.tsx

@@ -2,7 +2,7 @@ import Taro from "@tarojs/taro"
 import { async } from "q"
 
 export async function saveFoodCache(id: string, value: any) {
-    debugger
+    
     var date = new Date()
     value.timestamp = date.getTime()
     value.date = formatDate(date)

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

@@ -181,7 +181,7 @@ const CheckAccess = memo((props: { record: any, count: number, access: any }) =>
 
         }
         global.checkAccess = (acccessData: any) => {
-            debugger
+            
             if (!user.test_user) {
                 return
             }

+ 0 - 1
src/features/trackTimeDuration/components/Discovery.tsx

@@ -451,7 +451,6 @@ export default function Discovery() {
                         var endDate = new Date(startDate.getTime() + durationTemp * 1000)
                         end = startDate.getHours() * 3600 + startDate.getMinutes() * 60 + startDate.getSeconds()
                         start = endDate.getHours() * 3600 + endDate.getMinutes() * 60 + endDate.getSeconds()
-                        debugger
                         console.log('active', end, start, durationTemp)
                     }
                 }

+ 12 - 5
src/features/trackTimeDuration/components/IndexConsoleMuti.tsx

@@ -27,7 +27,7 @@ export default function IndexConsoleMuti(props: { status: string, event: string,
     const [sleepEnd, setSleepEnd] = useState<any>(null)
     const [showPicker, setShowPicker] = useState(false)
     const [operateType, setOperateType] = useState('startFast')
-    const [commitLoading,setCommitLoading] = useState(false)
+    const [commitLoading, setCommitLoading] = useState(false)
     const pickerRef = useRef(null)
 
 
@@ -36,7 +36,7 @@ export default function IndexConsoleMuti(props: { status: string, event: string,
     }
 
     function confirm() {
-        if (commitLoading){
+        if (commitLoading) {
             return;
         }
         var fast: any = {}
@@ -278,10 +278,17 @@ export default function IndexConsoleMuti(props: { status: string, event: string,
             setCommitLoading(false)
             getLocalPush()
             global.indexPageRefresh()
-            if ((res as any).current_record.status == "WAIT_FOR_START"){
+            if ((res as any).current_record.status == "WAIT_FOR_START") {
                 global.scrollToLatest()
+                global.swiperDayNightRefresh()
+                if (global.refreshNight) {
+                    global.refreshNight()
+                }
+                if (global.refreshDay) {
+                    global.refreshDay()
+                }
             }
-            
+
             global.refrehWeekly()
             global.refreshStreaks()
             if (props.event == 'end_fast')
@@ -518,7 +525,7 @@ export default function IndexConsoleMuti(props: { status: string, event: string,
             <View className='btn_space' />
             <View className='modal_btn' style={{ backgroundColor: color, flexDirection: 'row', alignItems: 'center', justifyContent: 'center', opacity: commitLoading ? 0.6 : 1 }} onClick={confirm}>
                 {
-                    commitLoading  && <View style={{ display: 'flex', overflow: 'hidden', height: 20, marginRight: 5 }}><AtActivityIndicator mode="center" color="#000" /></View>
+                    commitLoading && <View style={{ display: 'flex', overflow: 'hidden', height: 20, marginRight: 5 }}><AtActivityIndicator mode="center" color="#000" /></View>
                 }
 
                 <Text className='modal_confirm_text' style={{ color: '#000', fontWeight: 'bold' }}>{t('feature.common.picker_confirm_btn')}</Text>

+ 1 - 1
src/pages/notification/setting copy.tsx

@@ -503,7 +503,7 @@ export default function Page() {
                                 }
                             }
                         }).then(res => {
-                            debugger
+                            
                             setIsSolarNoon(value)
                             global.swiperDayNightRefresh()
                         })

+ 1 - 1
src/pages/notification/setting.tsx

@@ -889,7 +889,7 @@ export default function Page() {
                                     }
                                 }
                             }).then(res => {
-                                debugger
+                                
                                 setIsSolarNoon(value)
                                 global.swiperDayNightRefresh()
                             })

+ 1 - 1
src/services/thirdPartRequest.tsx

@@ -13,7 +13,7 @@ export const thirdPartRequest = (type: RequestType) => {
     
     return new Promise((resolve, reject) => {
         var timer = setTimeout(() => {
-            debugger
+            
             reject('timeout');
         }, kTimeOut);
         switch (type) {