Browse Source

效音开启条件

liushengqiang 2 years ago
parent
commit
11cf386e25
1 changed files with 12 additions and 9 deletions
  1. 12 9
      src/subpages/colexiu/uses/use-evaluat.ts

+ 12 - 9
src/subpages/colexiu/uses/use-evaluat.ts

@@ -13,17 +13,20 @@ import { Toast } from 'vant'
 /** 打开校音或者距离上一次校音超过一天 */
 const soundNeedShow = () => {
   if (runtime.evaluatingStatus) {
-    let time: number = -1
-    const timeString = localStorage.getItem(storeKeys.lastCheckTime)
-    try {
-      const date = dayjs(parseFloat(timeString || '0'))
-      if (date.isValid()) {
-        time = Math.abs(date.diff(dayjs(new Date().valueOf()), 'day'))
-      }
-    } catch (e) {}
-    if (SettingState.sett.tuning || time > 0 || !timeString) {
+    if (SettingState.sett.tuning) {
       soundEffectShow.value = true
     }
+    // let time: number = -1
+    // const timeString = localStorage.getItem(storeKeys.lastCheckTime)
+    // try {
+    //   const date = dayjs(parseFloat(timeString || '0'))
+    //   if (date.isValid()) {
+    //     time = Math.abs(date.diff(dayjs(new Date().valueOf()), 'day'))
+    //   }
+    // } catch (e) {}
+    // if (SettingState.sett.tuning || time > 0 || !timeString) {
+    //   soundEffectShow.value = true
+    // }
   }
 }