Explorar el Código

feat: 老师端云教练bug修复

TIANYONG hace 1 año
padre
commit
5a7f85354e

+ 3 - 0
src/helpers/formateMusic.ts

@@ -677,6 +677,9 @@ export const formatXML = (xml: string, xmlUrl?: string): string => {
 		}
 	}
 	// 如果曲谱详情接口没有返回速度,则取xml第一小节的速度,如果取不到,则取默认速度:100
+	if (!speed || speed == -1) {
+		speed = 100
+	}
 	if (!state.originSpeed) {
 		state.originSpeed = state.speed = speed || 100
 	}

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

@@ -291,7 +291,7 @@ export default defineComponent({
     const changePlay = (res: any) => {
       // console.log('监听上课页面message',res)
       if (res?.data?.api === "setPlayState") {
-        togglePlay("paused");
+        togglePlay("paused","courseware");
       }
 
       // 菜单状态

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

@@ -375,9 +375,10 @@ export default defineComponent({
       detailData.fingerPreView = false;
       detailData.fingerPreViewGuide = false;
     };
+    console.log(1111222,state.zoom)
     return () => (
       <div
-        class={[styles.detail, state.setting.eyeProtection && "eyeProtection", (state.platform === IPlatform.PC && state.zoom === 1.5) && styles.PC, state.isPreView && styles.preViewDetail, state.isSingleLine && styles.singleLineDetail]}
+        class={[styles.detail, state.setting.eyeProtection && "eyeProtection", (state.platform === IPlatform.PC && state.zoom > 0.8) && styles.PC, state.isPreView && styles.preViewDetail, state.isSingleLine && styles.singleLineDetail]}
         style={{
           paddingLeft: detailData.paddingLeft,
           background: state.setting.camera ? `rgba(${state.setting.eyeProtection ? "253,244,229" : "255,255,255"} ,${state.setting.cameraOpacity / 100}) !important` : "",

+ 2 - 2
src/state.ts

@@ -652,10 +652,10 @@ export const skipNotePlay = async (itemIndex: number, isStart = false) => {
  * 切换曲谱播放状态
  * @param playState 可选: 默认 undefined, 需要切换的状态 play:播放, paused: 暂停
  */
-export const togglePlay = async (playState?: "play" | "paused") => {
+export const togglePlay = async (playState?: "play" | "paused", sourceType?: string) => {
   // 如果mp3资源还在加载中,给出提示
   if (!state.isAppPlay && !state.audioDone) {
-    showToast('音频资源加载中,请稍后')
+    if (sourceType !== 'courseware') showToast('音频资源加载中,请稍后')
     return
   }
   // midi播放

+ 3 - 3
src/view/plugins/useDrag/index.module.less

@@ -66,8 +66,8 @@
   }
   &.guideLeft {
     top: initial;
-    left: -60%;
-    bottom: -10px;
+    left: -180px;
+    bottom: -5px;
     .guideBg {
       background: url('./img/modalDragBgLeft.png') no-repeat;
       background-size: 100% 100%;
@@ -76,7 +76,7 @@
   &.guideRight {
     top: initial;
     left: calc(100% - 12px);
-    bottom: -10px;
+    bottom: -5px;
     .guideBg {
       background: url('./img/modalDragBgRight.png') no-repeat;
       background-size: 100% 100%;

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

@@ -263,7 +263,7 @@ export default defineComponent({
 										styles.position,
 										showClass.value(item),
 										scoreItem ? `scoreItemLeve${scoreItem.leve}` : "",
-										(state.platform === IPlatform.PC && state.zoom === 1.5) ? styles.linePC : '',
+										(state.platform === IPlatform.PC && state.zoom > 0.8) ? styles.linePC : '',
 									]}
 									style={item.staveBox}
 									onClick={() => handleSelection(item)}