skyblued 2 년 전
부모
커밋
d6abb8851c

+ 7 - 5
src/subpages/colexiu/buttons/evaluating.tsx

@@ -71,6 +71,7 @@ const formatTimes = () => {
     // console.log("🚀 ~ times", times)
   }
   let measureIndex = -1
+  let recordMeasure = -1
   for (let index = 0; index < times.length; index++) {
     const item = times[index]
     const note = getNoteByMeasuresSlursStart(item)
@@ -99,9 +100,11 @@ const formatTimes = () => {
     if (note.noteElement.isRestFlag && !!note.stave && !!nextNote && nextNote.noteElement.isRestFlag) {
       skip = true
     }
-    if (note.measureOpenIndex != measureIndex){
+    if (note.measureOpenIndex != recordMeasure){
       measureIndex++
+      recordMeasure = note.measureOpenIndex
     }
+    // console.log(note.measureOpenIndex , measureIndex, note.noteElement.sourceMeasure.measureListIndex)
     const data = {
       timeStamp: (start * 1000) / rate,
       duration: ((end * 1000) / rate - (start * 1000) / rate) * noteRate,
@@ -109,16 +112,15 @@ const formatTimes = () => {
       nextFrequency: formatPitch(item.noteElement?.pitch?.nextFrequency),
       prevFrequency: formatPitch(item.noteElement?.pitch?.prevFrequency),
       // 重复的情况index会自然累加,render的index是谱面渲染的index
-      measureIndex: measureIndex,//note.measureOpenIndex, //note.measureOpenIndex,
+      measureIndex: measureIndex,//note.measureOpenIndex, 
       measureRenderIndex: note.noteElement.sourceMeasure.measureListIndex,
       dontEvaluating: ListenMode || dontEvaluatingMode || item.skipMode,
-      musicalNotesIndex: index,//item.i,
+      musicalNotesIndex: index, //item.i,
       denominator: note.noteElement?.Length.denominator,
       isOrnament: !!note?.voiceEntry?.ornamentContainer,
     }
     datas.push(data)
   }
-  console.log("🚀 ~ datas", datas)
   return datas
 }
 const connect = async () => {
@@ -411,7 +413,7 @@ const canSubmit = ref(false)
 /**接受websocket返回的信息 */
 const sendResult = (evt?: IPostMessage) => {
   const { body, header } = evt?.content || {}
-  console.log('评测返回', { body, header })
+  console.log('评测返回', body)
   if (body && header) {
     const data = evt?.content?.body
     if (evt?.content.header.commond === 'overall') {

BIN
src/subpages/colexiu/buttons/icons/task-bg.png


+ 2 - 2
src/subpages/colexiu/buttons/index.module.less

@@ -316,8 +316,8 @@
   .dialogue > div {
     width: 96px;
     height: 32px;
-    background: url('./icons/task-bg.svg') no-repeat center;
-    background-size: cover;
+    background: url('./icons/task-bg.png') no-repeat center;
+    background-size: 100% 100%;
     margin-right: 10px;
     color: #fff;
     font-size: 6px;

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

@@ -116,7 +116,7 @@
   width: 100%;
   justify-content: center;
   .btn {
-    width: 32%;
+    width: 40%;
     height: 16px;
     background: #fff6e8;
     border-radius: 4px;
@@ -138,7 +138,7 @@
   display: flex;
   justify-content: space-evenly;
   align-items: center;
-  padding: 2px;
+  padding: 2px 5px;
   border-radius: 2px;
   background: var(--primary-color);
   margin-left: auto;
@@ -152,7 +152,7 @@
       color: #fff;
       line-height: normal;
       white-space: nowrap;
-      padding: 0 2px;
+      padding: 2px 2px;
     }
     .van-radio {
       flex: 1;

+ 1 - 0
vite.config.js

@@ -6,6 +6,7 @@ const vueJsx = require('@vitejs/plugin-vue-jsx')
 const legacy = require('@vitejs/plugin-legacy')
 
 const proxyUrl = 'http://47.98.131.38:8989/' // test 环境
+// const proxyUrl = 'http://192.168.3.70:8989/' // test 环境
 // const proxyUrl = 'https://online.colexiu.com/' // online 环境
 
 export default defineConfig({