leon 1 year ago
parent
commit
fb6ffda94f
2 changed files with 8 additions and 8 deletions
  1. 6 6
      src/pages/clock/Clock.tsx
  2. 2 2
      src/utils/tools.ts

+ 6 - 6
src/pages/clock/Clock.tsx

@@ -124,12 +124,12 @@ export default function Page() {
     }
 
     useEffect(() => {
-        if (process.env.TARO_ENV=='weapp'){
-            showAlert({
-                title:'date',
-                content:new Date().toString()
-            })
-        }
+        // if (process.env.TARO_ENV=='weapp'){
+        //     showAlert({
+        //         title:'date',
+        //         content:new Date().toString()
+        //     })
+        // }
         dispatch(staticResources() as any);
         timer = setInterval(() => {
             var now = new Date()

+ 2 - 2
src/utils/tools.ts

@@ -111,7 +111,7 @@ export function getTimezoneName(){
     return split[1].split(')')[0];
 }
 
-export async function getTimezoneId(){
+export  function getTimezoneId(){
     if (process.env.TARO_ENV == 'weapp') {
         if (Taro.getSystemInfoSync().platform == 'ios') {
             return dayjs.tz.guess()
@@ -120,6 +120,6 @@ export async function getTimezoneId(){
     }
     else {
         var getTimeZone = require('react-native-localize').getTimeZone
-        return await getTimeZone()
+        return getTimeZone()
     }
 }