skyblued 2 years ago
parent
commit
992b47d839

+ 7 - 0
colexiu-report.html

@@ -53,6 +53,13 @@
       }
       window.addEventListener('message', setToken)
       instance.postMessage(JSON.stringify(sendData))
+      // 安卓的状态栏
+      instance.postMessage({
+        api: 'setStatusBarVisibility',
+        content: {
+          isVisibility: 0
+        }
+      })
     }
   </script>
   <style>

+ 7 - 4
src/helpers/native-message.ts

@@ -69,9 +69,12 @@ if (browserInfo.isApp) {
     try {
       const data = evt.data ? (typeof evt.data === 'object' ? evt.data : JSON.parse(evt.data)) : {}
       const uuid = data.content?.uuid || data.uuid
-      if (data.content) {
-        data.content = JSON.parse(data.content)
-      }
+      try {
+        if (data.content) {
+          data.content = typeof data.content === 'object' ? data.content : JSON.parse(data.content)
+        }
+      } catch (error) {}
+
       if (!uuid) {
         const keys = Object.keys(calls).filter((key) => key.indexOf(data.api) === 0)
         for (const key of keys) {
@@ -89,7 +92,7 @@ if (browserInfo.isApp) {
       const callback = calls[callid] || loop
       typeof callback === 'function' && callback(data)
     } catch (error) {
-      // console.error('通信消息解析错误', error)
+      console.error('通信消息解析错误', error)
     }
   })
 }

+ 1 - 3
src/subpages/colexiu/buttons/evaluating.tsx

@@ -68,7 +68,7 @@ const formatTimes = () => {
     times = detailState.times.filter((n: any, index: number) => {
       return index >= startIndex && index <= endIndex
     })
-    console.log("🚀 ~ times", times)
+    // console.log("🚀 ~ times", times)
   }
   // let measureIndex = -1
   for (let index = 0; index < times.length; index++) {
@@ -160,7 +160,6 @@ const connect = async () => {
   if (browserInfo.ios) {
     content.platform = 'IOS'
   }
-  // console.log("评测数据", content)
   const evt = await promisefiyPostMessage({
     api: 'startEvaluating',
     content: content,
@@ -172,7 +171,6 @@ const connect = async () => {
     connentLoading.value = false
     throw evt
   }
-
   connentLoading.value = false
 }
 

+ 1 - 0
src/subpages/colexiu/buttons/index.module.less

@@ -247,6 +247,7 @@
   background-color: transparent;
   background-size: 100%;
   background-position: center;
+  background-repeat: no-repeat;
   width: 67px;
   height: 23px;
   border-radius: 12px;

+ 2 - 1
src/subpages/colexiu/popups/setting/index.module.less

@@ -63,11 +63,12 @@
     }
     .van-slider {
       flex: 1;
+      margin-right: 10px;
     }
   }
 }
 .slider {
-  width: 28px;
+  width: 24px;
   color: #fff;
   font-size: 6px;
   line-height: 12px;

+ 1 - 1
src/subpages/colexiu/uses/use-evaluat.ts

@@ -21,7 +21,7 @@ const soundNeedShow = () => {
         time = Math.abs(date.diff(dayjs(new Date().valueOf()), 'day'))
       }
     } catch (e) {}
-    // console.log(time, timeString)
+    console.log(SettingState.sett.tuning, time, timeString)
     if (SettingState.sett.tuning || time > 0 || !timeString) {
       soundEffectShow.value = true
     }