Bladeren bron

fix: bug修复

TIANYONG 3 maanden geleden
bovenliggende
commit
b207edf598

+ 2 - 2
src/helpers/metronome.ts

@@ -36,7 +36,7 @@ export const metronomeData = reactive({
 	metroList: [] as number[],
 	activeList: [] as number[],
 	metroMeasure: [] as any[],
-	activeIndex: null as unknown as number,
+	activeIndex: null as any,
 	activeMetro: {} as any,
 	cursorMode: 2 as number, // 光标模式:1:音符指针;2:节拍指针;3:关闭指针
 	cursorTips: '' as string, // 光标模式提示文字
@@ -180,7 +180,7 @@ class Metronome {
 	
 	// 暂停的时候,点击音符,需要找到对应的节拍器的位置
 	findMetronomePosition = (currentTime: number) => {
-		// console.log('取消选段',currentTime)
+		console.log('取消选段1111',currentTime)
 		const originTime = currentTime;
 		// if (!state.sectionStatus){
 		// 	currentTime = setCurrentTime(currentTime);

+ 1 - 1
src/page-instrument/evaluat-model/evaluat-result/index.tsx

@@ -166,7 +166,7 @@ export default defineComponent({
                   </div>
                 </div>
               )}
-              <div class={styles.tips}>{evaluatingData.resultData.clxtip}</div>
+              <div class={styles.tips}>{state.isPercussion ? evaluatingData.resultData.djytip : evaluatingData.resultData.clxtip}</div>
               <div class={styles.ctrls}>
                 <img src={zlycImg} class={[styles.ctrlsBtn, "evaluting-result-2"]} onClick={() => emit("close", "tryagain")} />
                 {evaluatingData.resultData.recordId ? (

+ 25 - 20
src/page-instrument/header-top/index.tsx

@@ -41,26 +41,31 @@ const ModeView = defineAsyncComponent(() =>
 /** 校验是否能切换模式,会员的曲子,酷乐秀跟练模式、评测模式需要svip */
 export const checkMusicBuy = (item: any, type?: string) => {
   let checked = true;
-  // 学生端或者老师端需要校验点播和会员曲目;通过专辑进入的,不需要校验点播和会员曲目,默认都可以使用
-  if ((state.systemType === "student" || state.systemType === "teacher") && !state.tenantAlbumId) {
-    // 如果是点播的曲子,并且还没有购买,需要弹窗提醒
-    if (item.paymentType === "CHARGE" && !item.buyed) {
-      permissionPopup.active = "demand"
-      permissionPopup.musicId = item.id
-      permissionPopup.musicPrice = item.musicPrice
-      permissionPopup.show = true
-      checked = false
-    }
-    /**
-     * 如果是vip的曲子,当前用户不是会员时,需要弹窗提醒
-     * 如果是vip的曲子,当前用户不是svip会员,点击跟练或评测时,需要弹窗提醒(会员曲子,跟练和评测需要开通svip会员才能使用)
-     */
-    if ( (state.vipType === "NOT_VIP" && item.paymentType !== "FREE") || (item.paymentType !== "FREE" && !state.vipType.includes("SVIP") && (type === "follow" || type === "evaluating")) ) {
-      permissionPopup.active = item.paymentType.includes('CHARGE') ? "memberAndDemand" : "member"
-      permissionPopup.musicId = item.id
-      permissionPopup.musicPrice = item.musicPrice
-      permissionPopup.show = true
-      checked = false
+  // 购买过,不需要校验
+  if (item.buyed) {
+    checked = true
+  } else {
+    // 学生端或者老师端需要校验点播和会员曲目;通过专辑进入的,不需要校验点播和会员曲目,默认都可以使用
+    if ((state.systemType === "student" || state.systemType === "teacher") && !state.tenantAlbumId) {
+      // 如果是点播的曲子,并且还没有购买,需要弹窗提醒
+      if (item.paymentType === "CHARGE" && !item.buyed) {
+        permissionPopup.active = "demand"
+        permissionPopup.musicId = item.id
+        permissionPopup.musicPrice = item.musicPrice
+        permissionPopup.show = true
+        checked = false
+      }
+      /**
+       * 如果是vip的曲子,当前用户不是会员时,需要弹窗提醒
+       * 如果是vip的曲子,当前用户不是svip会员,点击跟练或评测时,需要弹窗提醒(会员曲子,跟练和评测需要开通svip会员才能使用)
+       */
+      if ( (state.vipType === "NOT_VIP" && item.paymentType !== "FREE") || (item.paymentType !== "FREE" && !state.vipType.includes("SVIP") && (type === "follow" || type === "evaluating")) ) {
+        permissionPopup.active = item.paymentType.includes('CHARGE') ? "memberAndDemand" : "member"
+        permissionPopup.musicId = item.id
+        permissionPopup.musicPrice = item.musicPrice
+        permissionPopup.show = true
+        checked = false
+      }
     }
   }
   return checked;

+ 1 - 1
src/page-instrument/header-top/speed/index.module.less

@@ -1,7 +1,7 @@
 .speedContainer{
     width: 334px;
     &.isHideBeat .content{
-        height: 206px;
+        max-height: 206px;
         .speedSel{
             padding-bottom: 0px !important;
         }

+ 4 - 0
src/state.ts

@@ -1248,9 +1248,11 @@ export const resetSettings = () => {
   // 切换模式,清除选段
   metronomeData.cursorMode = state.modeType === 'follow' ? 1 : 2;
   state.noSavePopShow = true;
+  metronomeData.activeIndex = null;
   clearSelection();
   skipNotePlay(0, true);
   resetBaseRate();
+  resetCursorPosition();
   // midi 重置播放进度
   if (state.isAppPlay) {
     audioData.progress = 0;
@@ -2358,6 +2360,7 @@ export const refreshMusicSvg = () => {
   clearSelection();
   resetBaseRate();
   state.activeMeasureIndex = -1;
+  metronomeData.activeIndex = null;
   if (query.workRecord || query.evaluatingRecord) {
     state.workSectionNeedReset = true;
   }
@@ -2415,6 +2418,7 @@ export const resetCursorPosition = () => {
         currentActive?.classList.remove("dotActive");
       })
     }
+    // metronomeData?.metro?.findMetronomePosition(0);
   })
 }
 

+ 2 - 2
src/view/audio-list/index.tsx

@@ -574,14 +574,14 @@ export default defineComponent({
 		return () => (
 			<>
 				<div class={styles.audioList}>
-					{state.playMode === "MIDI" && state.speed != 0 && (
+					{/* {state.playMode === "MIDI" && state.speed != 0 && (
 						<iframe
 							style={{ display: "none" }}
 							ref={midiRef}
 							src={`/midi/index.html`}
 							onLoad={handleLoad}
 						/>
-					)}
+					)} */}
 				</div>
 			</>
 		);

+ 5 - 0
src/view/evaluating/evaluatResult.ts

@@ -54,6 +54,7 @@ const icons = [
 		mome: "敢于尝试",
 		clxImg: clx1,
 		clxtip: "你的演奏不太好,音准和完整性还需加强,再练一练吧~",
+		djytip: "你的演奏不太好,节奏还需加强,再练一练吧~",
 		clxmome: "敢于尝试"
 	},
 	{
@@ -62,6 +63,7 @@ const icons = [
 		mome: "还要加油哦~",
 		clxImg: clx2,
 		clxtip: "你的演奏还不熟练,音准和完整性还需加强,加紧训练才能有好成绩哦~",
+		djytip: "你的演奏还不熟练,节奏把握不太理想,加紧训练才能有好成绩哦~",
 		clxmome: "还要加油哦~"
 	},
 	{
@@ -70,6 +72,7 @@ const icons = [
 		mome: "突破自我",
 		clxImg: clx3,
 		clxtip: "你的演奏还不流畅,音准和节奏还需加强,科学的练习才能更完美哦~",
+		djytip: "你的演奏还不流畅,部分节奏需要勤加练习,科学的练习才能更完美哦~",
 		clxmome: "突破自我"
 	},
 	{
@@ -78,6 +81,7 @@ const icons = [
 		mome: "崭露头角",
 		clxImg: clx4,
 		clxtip: "你的演奏还不错,继续加油吧,加强音准,离完美就差一步啦~",
+		djytip: "你的演奏还不错,节奏还有些小瑕疵,离完美就差一步啦~",
 		clxmome: "崭露头角"
 	},
 	{
@@ -86,6 +90,7 @@ const icons = [
 		mome: "你很棒",
 		clxImg: clx5,
 		clxtip: "你的演奏非常不错,音准的把握和节奏稍有瑕疵,完整性把握的很好~",
+		djytip: "你的演奏非常不错,距离完成仅有一步之遥~",
 		clxmome: "你很棒"
 	},
 ];

+ 7 - 0
src/view/follow-practice/index.tsx

@@ -155,6 +155,13 @@ export const handleFollowEnd = () => {
 	openToggleRecord(false);
 	followData.index = 0;
 	console.log("结束");
+	// 如果开启了循环播放,需要再次跟练
+	if (state.setting.repeatAutoPlay) {
+		setTimeout(() => {
+			followData.practiceStart = true;
+			handleFollowStart();
+		}, 0);
+	}
 };
 
 // 清除当前音符右侧的音符的颜色状态

+ 1 - 1
src/view/plugins/toggleMusicSheet/choosePartName/index.tsx

@@ -76,7 +76,7 @@ export default defineComponent({
         <div class={styles.pickerCon}>
           <div class={styles.pickerBox}>
             {
-              state.isScoreRender &&
+              state.isScoreRender && state.modeType === "practise" && 
                 <>
                   {/* <div class={styles.titCon}>
                     <div class={styles.tit}>选择总谱</div>

+ 1 - 1
src/view/selection/index.tsx

@@ -301,7 +301,7 @@ export default defineComponent({
 							metronomeData.cursorMode === 2 &&
 							item.MeasureNumberXML === metronomeData.activeMetro?.measureNumberXML &&
 							state.times[state.activeNoteIndex].MeasureNumberXML === item.MeasureNumberXML;
-							//console.log('显示节拍指针',lineShow,state.times[state.activeNoteIndex].MeasureNumberXML,item.MeasureNumberXML,metronomeData.activeMetro?.measureNumberXML)
+							// console.log('显示节拍指针',lineShow,state.times[state.activeNoteIndex].MeasureNumberXML,item.MeasureNumberXML,metronomeData.activeMetro?.measureNumberXML)
 						return (
 							<>
 								{item.staveBox && (