瀏覽代碼

Merge branch 'hqyDevNewVersion' into feature-wxl-newVersion

lex 11 月之前
父節點
當前提交
13138f5f93
共有 28 個文件被更改,包括 276 次插入69 次删除
  1. 1 1
      src/helpers/customMusicScore.ts
  2. 二進制
      src/page-instrument/component/the-music-list/imgs/searImg.png
  3. 89 4
      src/page-instrument/component/the-music-list/index.module.less
  4. 19 1
      src/page-instrument/component/the-music-list/list.tsx
  5. 3 3
      src/page-instrument/evaluat-model/earphone/index.module.less
  6. 二進制
      src/page-instrument/evaluat-model/icons/lanya_erji.png
  7. 二進制
      src/page-instrument/evaluat-model/icons/no_erji.png
  8. 二進制
      src/page-instrument/evaluat-model/icons/tip_btn.png
  9. 二進制
      src/page-instrument/evaluat-model/icons/tip_erji.png
  10. 二進制
      src/page-instrument/evaluat-model/icons/youxian_erji.png
  11. 21 0
      src/page-instrument/evaluat-model/index.module.less
  12. 35 14
      src/page-instrument/evaluat-model/index.tsx
  13. 12 18
      src/page-instrument/header-top/index.module.less
  14. 6 2
      src/page-instrument/header-top/index.tsx
  15. 6 0
      src/page-instrument/header-top/modeView.tsx
  16. 6 1
      src/page-instrument/header-top/settting/index.tsx
  17. 21 6
      src/page-instrument/header-top/speed/index.tsx
  18. 4 0
      src/page-instrument/simple-detail/index.module.less
  19. 11 2
      src/page-instrument/simple-detail/index.tsx
  20. 2 1
      src/page-instrument/view-detail/index.tsx
  21. 5 3
      src/page-instrument/view-evaluat-report/component/share-top/index.tsx
  22. 3 2
      src/page-instrument/view-evaluat-report/index.tsx
  23. 6 2
      src/state.ts
  24. 8 4
      src/view/audio-list/index.tsx
  25. 10 2
      src/view/evaluating/index.tsx
  26. 3 0
      src/view/music-score/index.module.less
  27. 3 2
      src/view/music-score/index.tsx
  28. 2 1
      src/view/transfer-to-img/index.tsx

+ 1 - 1
src/helpers/customMusicScore.ts

@@ -587,7 +587,7 @@ export const resetFormate = () => {
 
 // 一行谱时,五线谱/简谱的谱面staffLine,居中显示
 const transSinglePage = () => {
-	if (state.isSingleLine) {
+	if (state.isSingleLine && !state.isSimplePage) {
 		const svgPage = document?.getElementById('osmdSvgPage1')?.getBoundingClientRect();
 		const staffLine = document?.querySelector('.staffline')?.getBoundingClientRect();
 		if (svgPage && staffLine && svgPage.height > 130) {

二進制
src/page-instrument/component/the-music-list/imgs/searImg.png


+ 89 - 4
src/page-instrument/component/the-music-list/index.module.less

@@ -10,7 +10,7 @@
             height: 100%;
             .van-tabs__wrap{
                 display: flex;
-                justify-content: right;
+                justify-content: flex-end;
                 height: 30px;
                 .van-tabs__nav--line{
                     padding-bottom: 0;
@@ -89,15 +89,15 @@
         height: 34px;
         background: #F8F9FC;
         border-radius: 18px;
-        padding: 0 4px 0 12px;
+        padding: 0 4px 0 10px;
         border: 1px solid transparent;
         &.isFocus{
             border-color: #1CACF1;
         }
         >img{
             flex-shrink: 0;
-            width: 14px;
-            height: 14px;
+            width: 16px;
+            height: 16px;
         }
         :global{
             .van-field{
@@ -135,6 +135,74 @@
                 opacity: 0.8;
             }
         }
+        .dropdownMenu{
+            border-right: 1px solid #DADCE5;
+            margin-right: 8px;
+            :global{
+                .van-dropdown-menu__bar{
+                    height: 20px;
+                    background: transparent;
+                    box-shadow: initial;
+                    .van-dropdown-menu__item{
+                        padding: 0 8px 0 0;
+                    }
+                    .van-dropdown-menu__title{
+                        --van-gray-4: #0CA2EA;
+                        font-weight: 400;
+                        font-size: 14px;
+                        color: #0CA2EA;
+                        padding: 0 12px 0 0;
+                        &::after{
+                            right: 0;
+                            opacity: initial;
+                        }
+                    }
+                }
+                .van-dropdown-item.van-dropdown-item--down{
+                    left: 36px;
+                    width: 148px;
+                    margin-top: 7px;
+                    .van-dropdown-item__content{
+                        margin-left: 10px;
+                        padding: 0 10px;
+                        width: 128px;
+                        box-shadow: 0px 2px 14px 0px rgba(0,0,0,0.12);
+                        border-radius: 8px;
+                        .van-cell{
+                            margin-top: 6px;
+                            padding: 0;
+                            font-weight: 500;
+                            font-size: 14px;
+                            color: #323233;
+                            line-height: 32px;
+                            text-align: center;
+                            &::after{
+                                border: none;
+                            }
+                            &:last-child{
+                                margin-bottom: 6px;
+                            }
+                            &.van-dropdown-item__option--active{
+                                background: #EEF8FF;
+                                border-radius: 4px;
+                                color: #1CACF1;
+                            }
+                            .van-cell__value{
+                                display: none;
+                            }
+                        }
+                    }
+                }
+            }
+            &.currItem{
+                :global{
+                    .van-dropdown-menu__bar  .van-dropdown-menu__title{
+                        color: #1CACF1;
+                        --van-gray-4:#1CACF1;
+                    }
+                }
+            }
+        }
     }
     :global{
         .van-list{
@@ -223,6 +291,23 @@
                 font-size: 13px;
                 color: rgba(0,0,0,0.5);
             }
+            .playType,.singType{
+                margin-left: 5px;
+                width: 26px;
+                height: 17px;
+                background: #FFFFFF;
+                border-radius: 3px;
+                text-align: center;
+                line-height: 17px;
+                border: 1px solid #15B2FD;
+                font-weight: 400;
+                font-size: 10px;
+                color: #15B2FD;
+                &.singType{
+                    color: #CD8613;
+                    border-color: #CD8613;
+                }
+            }
         }
     }
 }

+ 19 - 1
src/page-instrument/component/the-music-list/list.tsx

@@ -2,7 +2,7 @@ import { defineComponent, onMounted, reactive, watch } from "vue";
 import styles from "./index.module.less";
 import { api_musicSheetPage } from "../../api";
 import state, { togglePlay } from "/src/state";
-import { List, Image, Field } from "vant";
+import { List, Image, Field, DropdownMenu, DropdownItem } from "vant";
 import { postMessage } from "/src/utils/native-message";
 import qs from "query-string";
 import searImg from "./imgs/searImg.png"
@@ -25,6 +25,7 @@ export default defineComponent({
       musicSheetCategoriesId: state.bizMusicCategoryId,
       recentFlag: props.recentFlag ? true : null,
       excludeMusicId: props.recentFlag ? null : state.examSongId,
+      audioPlayTypes:""
     });
     const data = reactive({
       isFocus: false,
@@ -33,12 +34,21 @@ export default defineComponent({
       loading: false,
       hasNext: true,
     });
+    const audioPlayTypesOption = [
+      { text: '全部场景', value: "" },
+      { text: '演奏', value: "PLAY" },
+      { text: '演唱', value: "SING" },
+      { text: '演奏+演唱', value: "PLAY,SING" },
+    ]
     const getList = async () => {
       if (!data.hasNext) return;
       data.loading = true;
       try {
         const res = await api_musicSheetPage({
           ...forms,
+          ...{
+            audioPlayTypes: forms.audioPlayTypes ? forms.audioPlayTypes.split(",") : []
+          }
         });
         if (res?.code === 200 && Array.isArray(res.data?.rows)) {
           data.list = [...data.list, ...res.data.rows];
@@ -93,6 +103,9 @@ export default defineComponent({
     return () => (
       <div class={styles.wrap}>
         <div class={[styles.searchBox,data.isFocus && styles.isFocus]}>
+          <DropdownMenu class={[styles.dropdownMenu]} overlay={false}>
+							<DropdownItem onChange={handleQuery} v-model={forms.audioPlayTypes} options={audioPlayTypesOption}/>
+					</DropdownMenu>
           <img src={searImg} />
           <Field placeholder="请输入曲目名称" v-model={forms.name} autocomplete="off" onFocus={()=>{ data.isFocus = true }} onBlur={()=>{ data.isFocus = false }} />
           <div class={styles.searchBtn} onClick={handleQuery}>搜索</div>
@@ -117,6 +130,11 @@ export default defineComponent({
                   <p class={styles.name}>{item.musicSheetName}</p>
                   <div class={styles.detail}>
                     {item.usedNum && <div class={styles.usedNum}><img src={huoimg}/><div>{item.usedNum}</div></div>}
+                    {
+                      item.audioPlayTypes && item.audioPlayTypes.split(",").sort().map((type:"PLAY"|"SING")=>{
+                        return <div class={type==="PLAY"?styles.playType:styles.singType}>{type==="PLAY"?"演奏":"演唱"}</div>
+                      })
+                    }
                     {item.composer && <p class={styles.author}>{item.composer}</p>}
                   </div>
                 </div>

+ 3 - 3
src/page-instrument/evaluat-model/earphone/index.module.less

@@ -1,7 +1,7 @@
 .earphoneBox {
     position: relative;
-    width: 100vw;
-    height: 100vh;
+    width: 600px;
+    height: 229px;
     .earphoneBg {
         position: absolute;
         left: 50%;
@@ -12,7 +12,7 @@
     .earphoneBtn {
         position: absolute;
         left: 50%;
-        bottom: 75px;
+        bottom: 13px;
         width: 133px;
         height: 39px;
         transform: translateX(-43%);

二進制
src/page-instrument/evaluat-model/icons/lanya_erji.png


二進制
src/page-instrument/evaluat-model/icons/no_erji.png


二進制
src/page-instrument/evaluat-model/icons/tip_btn.png


二進制
src/page-instrument/evaluat-model/icons/tip_erji.png


二進制
src/page-instrument/evaluat-model/icons/youxian_erji.png


+ 21 - 0
src/page-instrument/evaluat-model/index.module.less

@@ -127,4 +127,25 @@
     width: 100vw;
     height: 100vh;
     z-index: 10000;
+}
+
+.earphoneBox {
+    position: relative;
+    width: 600px;
+    height: 229px;
+    .earphoneBg {
+        position: absolute;
+        left: 50%;
+        top: 0;
+        height: 100%;
+        transform: translateX(-50%);
+    }
+    .earphoneBtn {
+        position: absolute;
+        left: 50%;
+        bottom: 13px;
+        width: 133px;
+        height: 39px;
+        transform: translateX(-43%);
+    }
 }

+ 35 - 14
src/page-instrument/evaluat-model/index.tsx

@@ -3,7 +3,7 @@ import { connectWebsocket, evaluatingData, handleEndBegin, handleStartBegin, han
 import Earphone from "./earphone";
 import styles from "./index.module.less";
 import SoundEffect from "./sound-effect";
-import state, { handleRessetState, resetPlaybackToStart, musicalInstrumentCodeInfo, clearSelection, initSetPlayRate } from "/src/state";
+import state, { handleRessetState, resetPlaybackToStart, musicalInstrumentCodeInfo, clearSelection, initSetPlayRate, resetBaseRate } from "/src/state";
 import { storeData } from "/src/store";
 import { browser } from "/src/utils";
 import { getNoteByMeasuresSlursStart } from "/src/helpers/formateMusic";
@@ -23,6 +23,8 @@ import { headTopData } from "../header-top/index";
 import { getQuery } from "/src/utils/queryString";
 import Countdown from "./countdown";
 import { IPostMessage } from "/src/utils/native-message";
+import tipErjiBg from "./icons/tip_erji.png"
+import tipErjiBtn from "./icons/tip_btn.png"
 
 // const DelayCheck = defineAsyncComponent(() =>
 //   import('./delay-check')
@@ -346,7 +348,8 @@ export default defineComponent({
         evaluatingData.oneselfCancleEvaluating = true;
         // handleCancelEvaluat();
         handleEndEvaluat(true, 'selfCancel');
-        evaluatingData.isBeginMask = true;
+        // evaluatingData.isBeginMask = true;
+        evaluatingData.evaluatings = {};
         state.playState = "paused";
       }
       resetPlaybackToStart();
@@ -417,6 +420,11 @@ export default defineComponent({
         });
       }
       // console.log('异常流程3')
+      // 非选段状态,从头开始评测,重置速度
+      if (!state.sectionStatus && state.section.length === 0) {
+        state.activeNoteIndex = 0;
+        state.speed = state.times[0].measureSpeed * state.basePlayRate
+      }
       initSetPlayRate();
       // 检测APP端socket状态
       const res: any = await startCheckDelay();
@@ -447,7 +455,7 @@ export default defineComponent({
       if (res?.content) {
         evaluatingData.checkEnd = true;
         state.setting.soundEffect = false;
-        checkEarphoneStatus();
+        evaluatingData.tipErjiShow = true;
       }
     };
 
@@ -460,6 +468,10 @@ export default defineComponent({
 			return evaluatingData.earphoneMode && !state.isLoading && !state.hasDriverPop;
 		});
 
+    const tipErjiPopShow = computed(() => {
+			return evaluatingData.tipErjiShow && !state.isLoading && !state.hasDriverPop;
+		});
+
     // watch(
     //   () => state.setting.soundEffect,
     //   (val) => {
@@ -472,16 +484,16 @@ export default defineComponent({
     // );
 
     // 手动取消评测,需要自动再次评测
-    watch(
-      () => evaluatingData.needReplayEvaluat,
-      (val) => {
-        if (val && evaluatingData.oneselfCancleEvaluating) {
-          setTimeout(() => {
-            startBtnHandle();
-          }, 500);
-        }
-      }
-    );
+    // watch(
+    //   () => evaluatingData.needReplayEvaluat,
+    //   (val) => {
+    //     if (val && evaluatingData.oneselfCancleEvaluating) {
+    //       setTimeout(() => {
+    //         startBtnHandle();
+    //       }, 500);
+    //     }
+    //   }
+    // );
 
     onMounted(async () => {
       // 如果打开了延迟检测开关,需要先发送开始检测的消息
@@ -559,6 +571,15 @@ export default defineComponent({
         {
           evaluatingData.isBeginMask && <div class={styles.beginMask}></div>
         }
+        <Popup teleport="body" closeOnClickOverlay={false} class={["popup-custom", "van-scale"]} transition="van-scale" v-model:show={tipErjiPopShow.value}>
+          <div class={styles.earphoneBox}>
+            <img class={styles.earphoneBg} src={tipErjiBg} />
+            <img class={styles.earphoneBtn} src={tipErjiBtn} onClick={() => {
+              evaluatingData.tipErjiShow = false;
+              checkEarphoneStatus();
+            }} />
+          </div>
+        </Popup>        
         <Popup teleport="body" closeOnClickOverlay={false} class={["popup-custom", "van-scale"]} transition="van-scale" v-model:show={earPhonePopShow.value}>
           <Earphone
             earphoneType={evaluatingData.earPhoneType}
@@ -568,7 +589,7 @@ export default defineComponent({
               // #11035,可能刚好关闭耳机弹窗的时候,第二次又出现了弹窗
               setTimeout(() => {
                 evaluatingData.earphoneMode = false;
-              }, 0);
+              }, 300);
               // handlePerformDetection();
               checkEarphoneStatus("start");
             }}

+ 12 - 18
src/page-instrument/header-top/index.module.less

@@ -63,25 +63,19 @@
     .title {
         width: 210px;
         margin-left: 10px;
+        position: relative;
 
-        &.isMusicList {
-            :global {
-                .van-notice-bar {
-                    &::after {
-                        max-width: calc(216px + 16px);
-                        position: absolute;
-                        top: 0;
-                        left: 0;
-                        content: "";
-                        width: calc(var(--noticeBarWidth, 100%) + 16px);
-                        height: 100%;
-                        background: url("./image/sj.png") no-repeat;
-                        background-size: 9px 6px;
-                        background-position: center right;
-                    }
-
-                }
-            }
+        .symbolNote {
+            max-width: calc(216px + 16px);
+            position: absolute;
+            top: 0;
+            left: 0;
+            content: "";
+            width: calc(var(--noticeBarWidth, 100%) + 16px);
+            height: 100%;
+            background: url("./image/sj.png") no-repeat;
+            background-size: 9px 6px;
+            background-position: center right;
         }
 
         :global {

+ 6 - 2
src/page-instrument/header-top/index.tsx

@@ -53,6 +53,7 @@ export const headTopData = reactive({
     }
     if (value === "practise") {
       // state.playIngSpeed = state.speed
+      smoothAnimationState.isShow.value = state.setting.melodyLine;
     }
     if (value === "evaluating") {
       // 如果延迟检测资源还在加载中,给出提示
@@ -96,6 +97,8 @@ export const headTopData = reactive({
   },
   // 改变模式之前的状态
   oldPlayType: "play",
+  // 记录切换模式前的状态
+  oldModeType: "practise" as "practise" | "follow" | "evaluating",
 });
 
 export const headData = reactive({
@@ -346,7 +349,7 @@ export default defineComponent({
       // 选择模式 不显示
       if (headTopData.modeType !== "show" || ["follow"].includes(state.modeType)) return { display: false, disabled: true };
       // 音频播放中 禁用
-      if (state.playState === "play") return { display: true, disabled: true };
+      if (state.playState === "play" || query.workRecord) return { display: true, disabled: true };
 
       return {
         disabled: false,
@@ -652,11 +655,12 @@ export default defineComponent({
                         }
                       : {}
                   }
-                  class={[styles.title, isMusicList.value && styles.isMusicList, "driver-8"]}
+                  class={[styles.title, "headeTopTitleBtn"]}
                   onClick={() => {
                     isMusicList.value && (musicListShow.value = true);
                   }}
                 >
+                  {isMusicList.value && <div class={[styles.symbolNote, "driver-8"]}></div>}
                   <NoticeBar text={state.examSongName} background="none" />
                 </div>
               ) : (

+ 6 - 0
src/page-instrument/header-top/modeView.tsx

@@ -16,6 +16,7 @@ import { Vue3Lottie } from "vue3-lottie";
 import { popImgs, hanldeConfirmPop, hanldeClosePop, evaluatingData } from "/src/view/evaluating"
 import { Popup } from "vant";
 import AbnormalPop from "/src/view/abnormal-pop";
+import { smoothAnimationState } from "../view-detail/smoothAnimation";
 
 export default defineComponent({
   name: "modeView",
@@ -106,6 +107,11 @@ export default defineComponent({
           src={backImg}
           class={styles.back}
           onClick={() => {
+            smoothAnimationState.isShow.value = state.setting.melodyLine;
+            // 返回的时候 跳转到之前记录的模式
+            if(headTopData.oldModeType !== "practise"){
+              headTopData.handleChangeModeType(headTopData.oldModeType)
+            }
             headTopData.modeType = "show";
           }}
         />

+ 6 - 1
src/page-instrument/header-top/settting/index.tsx

@@ -66,7 +66,12 @@ export default defineComponent({
                             state.isSingleLine && state.modeType === "practise" && !state.isCombineRender && !state.isPercussion && 
                                 <div class={styles.cellBox}>
                                 <div class={styles.tit}>旋律线</div>
-                                    <Switch v-model={smoothAnimationState.isShow.value}></Switch>
+                                    <Switch 
+                                        v-model={smoothAnimationState.isShow.value}
+                                        onChange={(value) => {
+                                            state.setting.melodyLine = value
+                                        }}                                        
+                                    ></Switch>
                                 </div>   
                         }                           
                         {

+ 21 - 6
src/page-instrument/header-top/speed/index.tsx

@@ -8,6 +8,7 @@ import { metronomeData } from "../../../helpers/metronome";
 import { getQuery } from "/src/utils/queryString";
 import { api_createMusicPlayer, api_updateMusicPlayer, api_checkSocketStatus } from "/src/helpers/communication";
 import { storeData } from "/src/store";
+import { data as workData } from "/src/page-instrument/custom-plugins/work-index";
 
 export default defineComponent({
 	name: "speed",
@@ -62,7 +63,9 @@ export default defineComponent({
 		const toggleSwitch = async (res: any) => {
 			switchLoading.value = true;
 			try {
-			  if (storeData.isApp) {
+			  if (storeData.isApp && state.enableEvaluation) {
+				// 加载弹窗的开始时间
+				let startTime = +new Date();
 				state.loadingText = '节拍器准备中,请稍等…'
 				state.isLoading = true;
 				const targetSrc = res ? state.beatSong.accompany || state.beatSong.music : state.accompany || state.music;
@@ -73,9 +76,21 @@ export default defineComponent({
 				})
 				// console.log('切换节拍器音频',resData)
 				if (resData?.content) {
-					state.isLoading = false;
-					metronomeDisable.value = res;
-					switchLoading.value = false;
+					// 返回结果的时间
+					let intervalTime = +new Date() - startTime;
+					// 超过1秒直接关闭加载弹窗,小于1秒则最短显示1秒加载弹窗
+					if (intervalTime >= 1000) {
+						state.isLoading = false;
+						metronomeDisable.value = res;
+						switchLoading.value = false;
+					} else {
+						const continueTime = 1000 - intervalTime;
+						setTimeout(() => {
+							state.isLoading = false;
+							metronomeDisable.value = res;
+							switchLoading.value = false;
+						}, continueTime);
+					}
 				}
 				// api_checkSocketStatus();
 			  } else {
@@ -98,7 +113,7 @@ export default defineComponent({
 				<div class={styles.content}>
 					<div class={styles.conBox}>
 						<div class={styles.tit}>速度</div>
-						<div class={[styles.spendCon, query.workRecord && styles.disableSpend]}>
+						<div class={[styles.spendCon, workData.trainingType === "PRACTICE" && styles.disableSpend]}>
 							<img src={headImg("cutImg.png")} class={[styles.btn]} onClick={minusSpeed} />
 							<div class={styles.sliderCon}>
 								<Slider class={styles.slider} max={270} min={speed.value < 45 ? speed.value : 45} v-model={speed.value}>
@@ -113,7 +128,7 @@ export default defineComponent({
 							</div>
 							<img src={headImg("addImg.png")} class={[styles.btn]} onClick={plusSpeed} />	
 						</div>
-						<div class={[styles.speedSel, query.workRecord && styles.disableSpend]}>
+						<div class={[styles.speedSel, workData.trainingType === "PRACTICE" && styles.disableSpend]}>
 							<div onClick={resetCurrentSpeed}>原速</div>
 							<div onClick={()=>{ speed.value = 70 }}>70</div>
 							<div onClick={()=>{ speed.value = 80 }}>80</div>

+ 4 - 0
src/page-instrument/simple-detail/index.module.less

@@ -1,3 +1,7 @@
+body {
+    overflow: hidden;
+}
+
 .skeleton {
     position: fixed;
     left: 0;

+ 11 - 2
src/page-instrument/simple-detail/index.tsx

@@ -37,12 +37,21 @@ export default defineComponent({
 			}
 			// 暂停播放
 			if (resInfo?.api === "api_paused") {
-				console.log('暂停播放')
+				const currentTime = resInfo?.content?.currentTime
+				console.log('暂停播放',currentTime)
 				state.playState = 'paused';
+				if (currentTime === 0) {
+					// 坐标和小节都改为初始值
+					setTimeout(() => {
+						state.activeNoteIndex = 0
+						state.activeMeasureIndex = state.times[0].MeasureNumberXML;
+						handlePlaying(true);
+					}, 0);
+				}
 			}
 			// 暂停状态下,拖动进度
 			if (resInfo?.api === "api_updateProgress") {
-				console.log('拖动的进度')
+				console.log('拖动的进度',state.playState)
 				if (state.playState === 'paused') {
 					detailData.currentTime = resInfo?.content?.currentTime ?? detailData.currentTime;
 					// 坐标和小节都改为初始值

+ 2 - 1
src/page-instrument/view-detail/index.tsx

@@ -118,7 +118,8 @@ export default defineComponent({
       api_setStatusBarVisibility();
       const settting = store.get("musicscoresetting");
       if (settting) {
-        state.setting = settting;
+        //state.setting = settting;
+        Object.assign(state.setting, settting)
         //state.setting.beatVolume = state.setting.beatVolume || 50
         state.setting.beatVolume = 50;
         if (state.setting.camera) {

+ 5 - 3
src/page-instrument/view-evaluat-report/component/share-top/index.tsx

@@ -1,4 +1,4 @@
-import { computed, defineComponent, nextTick, reactive, ref, toRefs } from "vue";
+import { computed, defineComponent, nextTick, reactive, ref, toRefs, onUnmounted } from "vue";
 import styles from "./index.module.less";
 
 import { api_back } from "/src/helpers/communication";
@@ -67,7 +67,9 @@ export default defineComponent({
     const handleBack = () => {
       api_back();
     };
-
+    onUnmounted(()=>{
+      shareData._plrl?.destroy()
+    })
     const handleChange = (type: IItemType) => {
       itemType.value = type;
       scoreData.value.itemType = type;
@@ -408,7 +410,7 @@ export default defineComponent({
                       </div>
                     </>
                   )}
-                  {(itemType.value === "intonation" || itemType.value === "integrity") && (
+                  {itemType.value === "integrity" && (
                     <div>
                       <i style={{ background: bgColors.lack }}></i>
                       <span>时值不足</span>

+ 3 - 2
src/page-instrument/view-evaluat-report/index.tsx

@@ -251,7 +251,7 @@ export default defineComponent({
       if (scoreData.itemType === "cadence") {
         return detailData.musicalNotesPlayStats.filter((item: any) => include.includes(item.rhythmicAssessment.result));
       } else if (scoreData.itemType === "integrity") {
-        return detailData.musicalNotesPlayStats.filter((item: any) => include.includes(item.integrityAssessment.result));
+        return detailData.musicalNotesPlayStats.filter((item: any) => include.includes(item.integrityAssessment?.result));
       } else  {
         return detailData.musicalNotesPlayStats.filter((item: any) => {
           let result = item.pitchAssessment.result;
@@ -268,7 +268,8 @@ export default defineComponent({
       const notes = filterNotes();
       // console.log(1111,notes)
       for (const note of notes) {
-        const active = allNote.value[note.musicalNotesIndex];
+        const idx = note.musicalNotesIndex !== undefined ? note.musicalNotesIndex : note.index;
+        const active = allNote.value[idx];
         setTimeout(() => {
           if (useedid.value.includes(active.id)) {
             return;

+ 6 - 2
src/state.ts

@@ -424,7 +424,9 @@ const state = reactive({
     /** 反应时间 */
     reactionTimeMs: 0,
     /** 节拍器音量 */
-    beatVolume: 50
+    beatVolume: 50,
+    /** 旋律线开关 */
+    melodyLine: true,
   },
   /** 后台设置的基准评测频率 */
   baseFrequency: 440,
@@ -649,7 +651,7 @@ export const resetBaseRate = (idx?: number) => {
   const index = idx ? idx : 0;
   const currentItem: any = state.times[index];
   const currentSpeed = currentItem?.measureSpeed ? currentItem.measureSpeed : state.originSpeed;
-  // console.log('速度2',currentSpeed)
+  console.log('速度2',currentSpeed)
   state.speed = currentSpeed
   //state.activeNoteIndex = 0
   state.basePlayRate = 1;
@@ -1105,6 +1107,8 @@ export const handleChangeSection = () => {
   if (state.sectionStatus) {
     togglePlay("paused");
     clearSelection();
+    // 重置速度和播放倍率
+    resetBaseRate(state.activeNoteIndex);
     //skipNotePlay(0, true);  取消选段的时候 不跳回开头
     state.sectionFirst = null;
     return;

+ 8 - 4
src/view/audio-list/index.tsx

@@ -52,9 +52,12 @@ export const audioListStart = (type: "play" | "paused") => {
 		return;
 	}
 	if (type === "play") {
-		audioData.songEle?.play();
-		audioData.backgroundEle?.play();
-		audioData.mingSongEle?.play();
+		if(state.playSource === "mingSong"){
+			audioData.mingSongEle?.play();
+		}else{
+			audioData.songEle?.play();
+			audioData.backgroundEle?.play();
+		}
 	} else if (type === "paused") {
 		audioData.songEle?.pause();
 		audioData.backgroundEle?.pause();
@@ -338,7 +341,8 @@ export default defineComponent({
 					banSong.addEventListener("play", onPlay);
 					banSong.addEventListener("ended", onEnded);
 					mingSong && (mingSong.muted = true);
-				} else if(mingSong){
+				}
+				if(mingSong){
 					mingSong.addEventListener("play", onPlay);
 					mingSong.addEventListener("ended", onEnded);
 				}

+ 10 - 2
src/view/evaluating/index.tsx

@@ -35,7 +35,7 @@ import {
   api_startDelayCheck,
   api_closeDelayCheck,
 } from "/src/helpers/communication";
-import state, { IPlayState, clearSelection, handleStopPlay, onPlay, resetPlaybackToStart, togglePlay, initSetPlayRate } from "/src/state";
+import state, { IPlayState, clearSelection, handleStopPlay, onPlay, resetPlaybackToStart, togglePlay, initSetPlayRate, resetBaseRate } from "/src/state";
 import { IPostMessage } from "/src/utils/native-message";
 import { usePageVisibility } from "@vant/use";
 import { browser } from "/src/utils";
@@ -113,6 +113,7 @@ export const evaluatingData = reactive({
   evaluatSpeed: 0, // 评测记录的速度
   needReplayEvaluat: false, // 手动取消评测,需要自动开始评测
   needPlayTick: false, // 评测时,mp3节拍器需要等待音频开始播放后再执行播放节拍器的圆点动画
+  tipErjiShow: false, // 评测提示弹窗
 });
 
 const sendOffsetTime = async (offsetTime: number) => {
@@ -320,7 +321,7 @@ const handleScoreResult = (res?: IPostMessage) => {
       evaluatingData.soundEffectFrequency = body.frequency;
     }
     // 小节评分返回
-    if (header?.commond === "measureScore") {
+    if (header?.commond === "measureScore" && !evaluatingData.oneselfCancleEvaluating) {
       console.log("🚀 ~ 评测返回:", res);
       addMeasureScore(body);
     }
@@ -526,6 +527,13 @@ export const handleEndEvaluat = (isComplete = false, endType?: string) => {
   }
   setTimeout(() => {
     evaluatingData.startBegin = false;
+    if (endType === 'selfCancel') {
+      // 重置播放倍率
+      const item: any = (state.sectionStatus && state.section.length === 2) ? state.sectionFirst || state.section[0] : state.times[0];
+      state.activeNoteIndex = item.i;
+      state.activeMeasureIndex = item.MeasureNumberXML;
+      resetBaseRate(item.i);
+    }
   }, 500);
   evaluatingData.isComplete = isComplete;
   // 如果开启了摄像头, 结束录制视频

+ 3 - 0
src/view/music-score/index.module.less

@@ -77,6 +77,9 @@
         z-index: 999;
     }
 }
+.notTouch{
+    touch-action: none;
+}
 .inGradualRange{
    :global{
         #cursorImg-0{

+ 3 - 2
src/view/music-score/index.tsx

@@ -148,7 +148,7 @@ export default defineComponent({
 			await osmd.load(musicData.score);
 			// 对外暴露 一行谱时候 缩小谱面
 			if(state.isSimplePage){
-				state.zoom = 0.6
+				state.zoom = 0.5
 			}
 			osmd.zoom = state.zoom;
 			osmd.render();
@@ -225,7 +225,8 @@ export default defineComponent({
 					isInTheGradualRange.value && styles.inGradualRange,
 					state.musicRenderType == EnumMusicRenderType.staff ? "staff" : "jianpuTone",
 					state.isSingleLine && "singleLineMusicBox",
-					(!state.isCreateImg && !state.isPreView && state.musicRenderType === EnumMusicRenderType.staff) ? "blueMusicXml" : ""
+					(!state.isCreateImg && !state.isPreView && state.musicRenderType === EnumMusicRenderType.staff) ? "blueMusicXml" : "",
+					state.isSingleLine && state.playState ==="play" && styles.notTouch
 				]}
 			>
 				{slots.default?.()}

+ 2 - 1
src/view/transfer-to-img/index.tsx

@@ -51,7 +51,7 @@ export default defineComponent({
 			}
 			//课堂乐器,默认简谱
 			sessionStorage.setItem(productRenderType, detailData.product[detailData.step].type);
-
+			state.musicRenderType = detailData.product[detailData.step].type
 			showLoadingToast({ message: "生成中", duration: 0 });
 			setTimeout(() => {
 				detailData.isLoading = false;
@@ -75,6 +75,7 @@ export default defineComponent({
 			if (detailData.step !== detailData.product.length) {
 				//课堂乐器,默认简谱
 				sessionStorage.setItem(productRenderType, detailData.product[detailData.step].type);
+				state.musicRenderType = detailData.product[detailData.step].type
 				nextTick(() => {
 					detailData.isLoading = true;
 					setTimeout(() => {