浏览代码

feat: 老师端云教练修改

TIANYONG 1 年之前
父节点
当前提交
cbd2585fd2

+ 6 - 6
src/page-instrument/custom-plugins/guide-page/teacher-top.tsx

@@ -29,7 +29,7 @@ export default defineComponent({
             left:'-0.45rem'
           },
           btnsStyle: {
-            bottom: "2.8rem",
+            bottom: "2.72rem",
             left:'1.1rem',
             transform: "scale(.83)",
 
@@ -50,7 +50,7 @@ export default defineComponent({
             left:'-0.45rem'
           },
           btnsStyle: {
-            bottom: "2.8rem",
+            bottom: "2.72rem",
             left:'1.1rem',
             transform: "scale(.83)",
           },
@@ -70,7 +70,7 @@ export default defineComponent({
             left:'-0.45rem'
           },
           btnsStyle: {
-            bottom: "2.8rem",
+            bottom: "2.72rem",
             left:'1.1rem',
             transform: "scale(.83)",
           },
@@ -90,7 +90,7 @@ export default defineComponent({
             left:'-0.45rem'
           },
           btnsStyle: {
-            bottom: "2.8rem",
+            bottom: "2.72rem",
             left:'1.1rem',
             transform: "scale(.83)",
           },
@@ -110,7 +110,7 @@ export default defineComponent({
             left:'-0.45rem'
           },
           btnsStyle: {
-            bottom: "2.8rem",
+            bottom: "2.72rem",
             left:'1.1rem',
             transform: "scale(.83)",
           },
@@ -130,7 +130,7 @@ export default defineComponent({
             left:'-3.4rem'
           },
           btnsStyle: {
-            bottom: "2.8rem",
+            bottom: "2.72rem",
             left:'-2.1rem',
             transform: "scale(.83)",
           },

+ 6 - 3
src/page-instrument/custom-plugins/helper-model/recommendation/index.module.less

@@ -55,8 +55,11 @@
     &.pcContent {
         :global {
             .van-field{
-                font-size: 14Px;
-                line-height: 18Px;
+                font-size: 16Px;
+                line-height: 20Px;
+            }
+            .van-cell__title {
+                font-size: 18Px;
             }
         }
     }
@@ -103,7 +106,7 @@
 .pcContent {
     .tags {
         >span {
-            font-size: 14PX;
+            font-size: 16PX;
         }
     }
 }

+ 1 - 0
src/page-instrument/custom-plugins/helper-model/recommendation/index.tsx

@@ -62,6 +62,7 @@ export default defineComponent({
 		});
 		return () => (
 			<div class={[styles.content, state.platform === IPlatform.PC && styles.pcContent]}>
+				{ state.platform === IPlatform.PC && <div class={'top_drag'}></div> }
 				<Tabs lineHeight={0} color="#1A1A1A">
 					<Tab title="意见反馈">
 						<Cell border={false} title="请选择问题类型" />

+ 4 - 3
src/page-instrument/follow-model/index.module.less

@@ -39,10 +39,11 @@
 }
 
 .pcEndBtn {
-  width: 40px;
-  height: 40px;
-  left: 30%;
+  width: 36px;
+  height: 36px;
+  left: 32px;
   bottom: 12px;
+  margin-left: initial;
 }
 
 .noteState {

+ 13 - 3
src/page-instrument/header-top/index.tsx

@@ -296,7 +296,17 @@ export default defineComponent({
 
       // 菜单状态
       if ((state.platform === IPlatform.PC && res?.data?.api) === "attendClassBarStatus") {
-        state.attendHideMenu = res?.data?.hideMenu;
+        // state.attendHideMenu = res?.data?.hideMenu;
+      }
+
+      // 上课页面,按钮方向
+      if (res?.data?.api === "setPlayState") {
+        if (res?.data.data) {
+          state.playBtnDirection = res.data.data === 'right' ? 'right' : 'left';
+          if (state.fingeringInfo.direction === "vertical" && state.setting.displayFingering) {
+            state.playBtnDirection = 'left';
+          }
+        }
       }
     };
 
@@ -306,7 +316,7 @@ export default defineComponent({
       styleDrag: { value: null }
     } : useDrag(
       [
-        `${parentClassName} .van-tabs__wrap`,
+        `${parentClassName} .top_drag`,
         `${parentClassName} .bom_drag`
       ],
       parentClassName,
@@ -488,7 +498,7 @@ export default defineComponent({
               <span>指法</span>
             </div>
 
-            <Popover trigger="manual" v-model:show={headData.speedShow} placement={state.platform === IPlatform.PC ? "top" : "bottom"} overlay={false} offset={state.platform === IPlatform.PC ? [0,40] : [0,8]}>
+            <Popover trigger="manual" v-model:show={headData.speedShow} placement={state.platform === IPlatform.PC ? "top" : "bottom"} overlay={false} offset={state.platform === IPlatform.PC ? [8,40] : [0,8]}>
               {{
                 reference: () => (
                   <div

+ 22 - 2
src/page-instrument/header-top/music-type/index.tsx

@@ -1,12 +1,16 @@
-import { defineComponent, reactive, ref, watch } from "vue";
+import { defineComponent, reactive, ref, watch, toRef } from "vue";
 import { headImg } from "../image";
 import { useClickAway } from "@vant/use";
 import { headData } from "..";
 import styles from "./index.module.less";
-import state from "/src/state";
+import state, { IPlatform } from "/src/state";
 import { Popup } from "@varlet/ui";
 import TheComfirm from "../../component/the-comfirm";
 import { musicRenderTypeKey, resetRenderMusicScore } from "/src/view/music-score";
+import useDrag from "/src/view/plugins/useDrag/index";
+import Dragbom from "/src/view/plugins/useDrag/dragbom";
+import { storeData } from "/src/store";
+
 export default defineComponent({
 	name: "musicType",
 	setup(props) {
@@ -37,6 +41,21 @@ export default defineComponent({
 			}
 			musicTypeData.show = false
 		}
+
+		const parentClassName = "settingBoxClass_drag";
+		const userId = storeData.user?.id ? String(storeData.user?.id) : '';
+		const positionInfo = state.platform !== IPlatform.PC ? {
+		  styleDrag: { value: null }
+		} : useDrag(
+		  [
+			`${parentClassName} .top_drag`,
+			`${parentClassName} .bom_drag`
+		  ],
+		  parentClassName,
+		  toRef(musicTypeData, 'show'),
+		  userId
+		)
+
 		return () => (
 			<>
 				<div ref={musicTypeRef}>
@@ -55,6 +74,7 @@ export default defineComponent({
 				</div>
 				<Popup teleport="body" closeOnClickOverlay={false} defaultStyle={false} v-model:show={musicTypeData.show}>
 					<TheComfirm tip="设置成功,是否立即重新加载?" onClose={handleResult} />
+					{ state.platform === IPlatform.PC && <Dragbom showGuide={headData.showGragGuide} onGuideDone={handleGuide}  /> }
 				</Popup>
 			</>
 		);

+ 9 - 0
src/page-instrument/header-top/settting/index.module.less

@@ -77,6 +77,15 @@
 
     &.pcContent {
         height: 230px;
+        .pcDragTop {
+            position: absolute;
+            left: 0;
+            top: 0;
+            width: 100%;
+            height: 20px;
+            z-index: 1;
+            cursor: move;
+        }
         :global {
             .van-tab__panel {
                 height: 180px;

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

@@ -108,7 +108,7 @@ export default defineComponent({
 			styleDrag: { value: null }
 		  } : useDrag(
 		  [
-			`${parentClassName} .van-tabs__wrap`,
+			`${parentClassName} .top_drag`,
 			`${parentClassName} .bom_drag`
 		  ],
 		  parentClassName,
@@ -119,6 +119,7 @@ export default defineComponent({
 		return () => (
 			<div class={styles["header-settting"]}>
 				<div class={[styles.content, state.platform === IPlatform.PC && styles.pcContent]}>
+				{ state.platform === IPlatform.PC && <div class={'top_drag'}></div> }
 					<Tabs border animated swipeable>
 						<Tab title="全局设置">
 							<NoticeBar

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

@@ -11,7 +11,7 @@ import { sysMusicScoreAccompanimentQueryPage } from "../api";
 import EvaluatModel from "../evaluat-model";
 import HeaderTop from "../header-top";
 import styles from "./index.module.less";
-import { api_cloudAccompanyMessage, api_cloudLoading, api_keepScreenLongLight, api_openCamera, api_openWebView, api_setEventTracking, api_setRequestedOrientation, api_setStatusBarVisibility, isSpecialShapedScreen, addImagePos } from "/src/helpers/communication";
+import { api_cloudAccompanyMessage, api_cloudLoading, api_keepScreenLongLight, api_openCamera, api_openWebView, api_setEventTracking, api_setRequestedOrientation, api_setStatusBarVisibility, isSpecialShapedScreen } from "/src/helpers/communication";
 import { getQuery } from "/src/utils/queryString";
 import Evaluating, { evaluatingData } from "/src/view/evaluating";
 import MeasureSpeed from "/src/view/plugins/measure-speed";
@@ -128,16 +128,6 @@ export default defineComponent({
     };
     // console.log(route.params, query)
 
-    // 处理老师端上课页面,按钮方向
-    const handleImagePos = (res: any) => {
-      if (res?.data) {
-        state.playBtnDirection = res.data.data === 'right' ? 'right' : 'left';
-        if (state.fingeringInfo.direction === "vertical" && state.setting.displayFingering) {
-          state.playBtnDirection = 'left';
-        }
-      }
-    };
-
     onMounted(async () => {
       (window as any).appName = "colexiu";
       const id = query.id || "43554";
@@ -158,7 +148,6 @@ export default defineComponent({
         state.setting.displayFingering = false
       }      
       // api_setEventTracking();
-      addImagePos(handleImagePos);
     });
 
     /** 渲染完成 */

+ 10 - 0
src/style.css

@@ -81,6 +81,16 @@ body{
   color           : var(--van-primary-color);
 }
 
+.top_drag {
+  position: absolute;
+  left: 0;
+  top: 0;
+  width: 100%;
+  height: 20px;
+  z-index: 1;
+  cursor: move;
+}
+
 /* 动画右滑进入 */
 .v-slide-right-enter-from,
 .v-slide-right-leave-to {

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

@@ -12,11 +12,11 @@
     height: 100%;
     background: url('./img/left.png') no-repeat;
     background-size: 100% 100%;
-    border-bottom-left-radius: 18px;
-    border-bottom-right-radius: 18px;
+    border-bottom-left-radius: 16Px;
     &.right {
       background: url('./img/right.png') no-repeat;
       background-size: 100% 100%;
+      border-bottom-right-radius: 16Px;
     }
   }
 }