Leon пре 1 година
родитељ
комит
9f8a246baf

+ 1 - 1
ios/NativeBridge.m

@@ -231,7 +231,7 @@ RCT_EXPORT_METHOD(addLocalPush:(id)array){
         // 计算当前时间与给定时间戳之间的时间差(秒)
         NSTimeInterval timeInterval = timestamp - [currentDate timeIntervalSince1970];
         
-        UNTimeIntervalNotificationTrigger * trigger = [UNTimeIntervalNotificationTrigger triggerWithTimeInterval:timeInterval repeats:NO];
+        UNTimeIntervalNotificationTrigger * trigger = [UNTimeIntervalNotificationTrigger triggerWithTimeInterval:10 repeats:NO];
         NSString * identifier = message_id;
         UNNotificationRequest * request = [UNNotificationRequest requestWithIdentifier:identifier content:content trigger:trigger];
         [[UNUserNotificationCenter currentNotificationCenter] addNotificationRequest:request withCompletionHandler:^(NSError * _Nullable error) {

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

@@ -34,7 +34,7 @@ export default function CheckAccess(props: { record: any, count: number }) {
     const [confirmText, setConfirmText] = useState('')
     const [subConfirmText, setSubConfirmText] = useState('')
     const user = useSelector((state: any) => state.user);
-    const [rnKeep,setRnKeep] = useState(false)
+    const [rnKeep,setRnKeep] = useState(true)
 
     const { t } = useTranslation()
 
@@ -128,7 +128,6 @@ export default function CheckAccess(props: { record: any, count: number }) {
         }
 
         global.chooseMixed = () => {
-            debugger
             setChooseMixedSuccess(true)
             setShowFastAlert(false)
             setKeepContent(false)
@@ -143,6 +142,7 @@ export default function CheckAccess(props: { record: any, count: number }) {
             confirmAction = null
 
             const { trigger_event } = access.current.qualification;
+            debugger
             //删除记录后仍有资格,不做特殊处理。只有删除时为NOT_SATISFIED_AFTER_DELETE时,弹失去资格弹窗
             if (trigger_event == 'SATISFIED_AFTER_DELETE') {
                 return;
@@ -465,7 +465,6 @@ export default function CheckAccess(props: { record: any, count: number }) {
             </View>
         </View>
     }
-
     return <View>
         {
             showFastAlert && process.env.TARO_ENV == 'weapp' && alertPop()

+ 2 - 2
src/features/trackTimeDuration/components/CircadianDetailPopup.tsx

@@ -553,13 +553,13 @@ export default function CircadianDetailPopup(props: { record: any, schedule?: an
                 </View>
                 <View style={{ marginTop: rpxToPx(20), display: 'flex', flexDirection: 'row', alignItems: 'center' }}>
                     <View className='countdown_time_bg'>
-                        <Text className='title'>{t('feature.track_time_duration.console.countup')}</Text>
+                        <Text className='title' style={{ color: '#fff', opacity: 0.4 }}>{t('feature.track_time_duration.console.countup')}</Text>
                         <Text className='value' style={{ color: ColorType.sleep }}>{TimeFormatter.formateTimeNow(props.record.sleep.real_start_time)}</Text>
                     </View>
                     <View className='countdown_time_bg'>
                         {
                             props.record.sleep.target_end_time < new Date().getTime() ? <Text className='title'>{t('feature.track_time_duration.console.timeout')}</Text> :
-                                <Text className='title'>{t('feature.track_time_duration.console.countdown_not_due')}</Text>
+                                <Text className='title' style={{ color: '#fff', opacity: 0.4 }}>{t('feature.track_time_duration.console.countdown_not_due')}</Text>
                         }
                         {
                             props.record.sleep.target_end_time < new Date().getTime() ?

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

@@ -81,7 +81,6 @@ const Component = forwardRef((props: {
             // const formattedDate = global.language == 'en' ? `${weekday} ${TimeFormatter.getMonth(month)} ${day}` : `${TimeFormatter.getMonth(month)}${day}日 ${weekday}`;
             const formattedDate = global.language == 'en' ? `${TimeFormatter.getMonth(month)} ${day}` : `${TimeFormatter.getMonth(month)}${day}日`;
             var today1 = new Date();
-            debugger
             var yesterday = new Date(today1.getTime() - 24 * 3600 * 1000)
             if (dt.getMonth() == currentDate.getMonth() && dt.getDate() == currentDate.getDate()) {
                 selIndex = i

+ 2 - 4
src/features/trackTimeDuration/components/IndexConsole.tsx

@@ -88,8 +88,6 @@ export default function IndexConsole(props: { record: any, count: number }) {
                     uploadLocalPushInfo({
                         messageId:id
                     })
-
-                    console.log(props.record)
                     switch (action_id) {
                         case 'START_TIMER_NOW':
                             {
@@ -491,7 +489,6 @@ export default function IndexConsole(props: { record: any, count: number }) {
     }
 
     function pickerConfirm(t1: number) {
-        debugger
         if (btnDisable) {
             return
         }
@@ -698,12 +695,13 @@ export default function IndexConsole(props: { record: any, count: number }) {
                     global.refreshStreaks()
                     refreshDayNight()
                     var obj = global.checkAccess
-                    if (obj) {
+                    if (global.checkAccess) {
                         console.log('applw')
                     }
                     else {
                         console.log('apple')
                     }
+                    debugger
                     global.checkAccess((res as any).access)
                     // checkAccessProvisional((res as any).access,showFastAlert)
                 }).catch((e) => {

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

@@ -89,7 +89,6 @@ export default function WeekCalendarItem(props: { data: any, isCurrentWeek: bool
                         })
                     }
                     else {
-                        debugger
                         sleeps.push({
                             begin, height
                         })

+ 0 - 3
src/pages/clock/ClockMain.tsx

@@ -203,9 +203,6 @@ export default function Page() {
                         global.notification = data;
                         uploadPermissions()
                     })
-                    // NativeAppEventEmitter.addListener('notificationReceive', (data) => {
-                    //     console.log('notification receive action 222', data)
-                    // })
                 }
 
                 // uploadPermissions()