Leon hace 1 año
padre
commit
24ac318c1e

+ 2 - 2
ios/hola.xcodeproj/project.pbxproj

@@ -572,7 +572,7 @@
 				CODE_SIGN_ENTITLEMENTS = hola/hola.entitlements;
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 22;
+				CURRENT_PROJECT_VERSION = 24;
 				DEVELOPMENT_TEAM = GPMXAZ9G5N;
 				ENABLE_BITCODE = NO;
 				INFOPLIST_FILE = hola/Info.plist;
@@ -605,7 +605,7 @@
 				CODE_SIGN_ENTITLEMENTS = hola/hola.entitlements;
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 22;
+				CURRENT_PROJECT_VERSION = 24;
 				DEVELOPMENT_TEAM = GPMXAZ9G5N;
 				INFOPLIST_FILE = hola/Info.plist;
 				LD_RUNPATH_SEARCH_PATHS = (

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
ios/main.jsbundle


+ 16 - 6
src/features/daynight/DayNightCard.tsx

@@ -409,10 +409,15 @@ export default function DayNightCard(props: { isNight: boolean, count: number, d
                             ToastAndroid.show(t('feature.day_night.location_updated'), ToastAndroid.LONG);
                         }
                         else {
-                            Taro.showToast({
-                                title: t('feature.day_night.location_updated'),
-                                icon: 'none'
+                            showAlert({
+                                title:'Success',
+                                content:t('feature.day_night.location_updated'),
+                                showCancel:false
                             })
+                            // Taro.showToast({
+                            //     title: t('feature.day_night.location_updated'),
+                            //     icon: 'none'
+                            // })
                         }
 
                     })
@@ -436,10 +441,15 @@ export default function DayNightCard(props: { isNight: boolean, count: number, d
                             ToastAndroid.show(t('feature.day_night.location_failed'), ToastAndroid.LONG);
                         }
                         else {
-                            Taro.showToast({
-                                title: t('feature.day_night.location_failed'),
-                                icon: 'none'
+                            showAlert({
+                                title:'Error',
+                                content:t('feature.day_night.location_failed'),
+                                showCancel:false
                             })
+                            // Taro.showToast({
+                            //     title: t('feature.day_night.location_failed'),
+                            //     icon: 'none'
+                            // })
                         }
                     }
                     console.log(res)

+ 16 - 6
src/features/daynight/DayNightSwiperPopup.tsx

@@ -206,10 +206,15 @@ export default function DayNightSwiperPopup(props: { authInfo: any }) {
                             ToastAndroid.show(t('feature.day_night.location_updated'), ToastAndroid.LONG);
                         }
                         else {
-                            Taro.showToast({
-                                title: t('feature.day_night.location_updated'),
-                                icon: 'none'
+                            showAlert({
+                                title:'Success',
+                                content:t('feature.day_night.location_updated'),
+                                showCancel:false
                             })
+                            // Taro.showToast({
+                            //     title: t('feature.day_night.location_updated'),
+                            //     icon: 'none'
+                            // })
                         }
 
                     })
@@ -233,10 +238,15 @@ export default function DayNightSwiperPopup(props: { authInfo: any }) {
                             ToastAndroid.show(t('feature.day_night.location_failed'), ToastAndroid.LONG);
                         }
                         else {
-                            Taro.showToast({
-                                title: t('feature.day_night.location_failed'),
-                                icon: 'none'
+                            showAlert({
+                                title:'Error',
+                                content:t('feature.day_night.location_updated'),
+                                showCancel:false
                             })
+                            // Taro.showToast({
+                            //     title: t('feature.day_night.location_failed'),
+                            //     icon: 'none'
+                            // })
                         }
                     }
                     console.log(res)

+ 1 - 1
src/features/trackTimeDuration/actions/TrackTimeActions.tsx

@@ -2,7 +2,7 @@ import { API_LOCAL_PUSHES } from "@/services/http/api";
 import { request } from "@/services/http/request";
 import { recordCheck } from "@/services/trackTimeDuration";
 import trackTimeService from "@/store/trackTimeMachine"
-import { isIOS } from "@/utils/tools";
+import { isIOS, kIsIOS } from "@/utils/tools";
 // import {PushNotification} from 'react-native-push-notification'
 import Taro from "@tarojs/taro";
 import dayjs from 'dayjs'

+ 29 - 15
src/utils/time_format.ts

@@ -248,22 +248,22 @@ export class TimeFormatter {
     // const oneDayMilliseconds = 24 * 60 * 60 * 1000; // 一天的毫秒数
     // var dayDifference = Math.floor((utcDate2 - utcDate1) / oneDayMilliseconds);
     // if (dayDifference < 0) {
-      var strMonth = TimeFormatter.getMonth(inputDate.getMonth() + 1)
-      var strDt = ''
-      var strYear = ''
-      if (currentDate.getFullYear() != inputDate.getFullYear()) {
-        strYear = inputDate.getFullYear() + ''
-        strDt = strYear + '年'
-      }
-      if (global.language == 'en') {
-        if (strYear.length > 0) {
-          return strMonth + ' ' + inputDate.getDate() + ',' + strYear
-        }
-        return strMonth + ' ' + inputDate.getDate()
+    var strMonth = TimeFormatter.getMonth(inputDate.getMonth() + 1)
+    var strDt = ''
+    var strYear = ''
+    if (currentDate.getFullYear() != inputDate.getFullYear()) {
+      strYear = inputDate.getFullYear() + ''
+      strDt = strYear + '年'
+    }
+    if (global.language == 'en') {
+      if (strYear.length > 0) {
+        return strMonth + ' ' + inputDate.getDate() + ',' + strYear
       }
-      strDt = strDt + strMonth
-      strDt = strDt + (inputDate.getDate()) + '日'
-      return strDt
+      return strMonth + ' ' + inputDate.getDate()
+    }
+    strDt = strDt + strMonth
+    strDt = strDt + (inputDate.getDate()) + '日'
+    return strDt
     // }
     // return global.language == 'en'?`${dayDifference} days from now`:`${dayDifference}天后`
 
@@ -745,6 +745,20 @@ export class TimeFormatter {
     }
   }
 
+  static tzNameToGMT = (timeZone: string) => {
+    var minutes = 0
+    if (!timeZone || timeZone.length==0){
+      minutes = dayjs().utcOffset()
+    }
+    if (process.env.TARO_ENV=='weapp' || kIsIOS){
+      minutes = dayjs().tz(timeZone).utcOffset()
+    }
+    else {
+      var moment = require('moment-timezone');
+      minutes = moment().tz(timeZone).utcOffset()
+    }
+  }
+
   static tzLocalTime = (timestamp: number, timeZone: string) => {
     if (!timeZone || timeZone.length == 0) {
       return dayjs(timestamp)

Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio