ソースを参照

feat: bug修复

TIANYONG 1 年間 前
コミット
1a2c51e435

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

@@ -507,7 +507,7 @@ const handleAccompanyError = (res?: IPostMessage) => {
 				if (evaluatingData.soundEffectMode) {
 					evaluatingData.socketErrorStatus = 0
 					evaluatingData.delayCheckSocketError = true
-					evaluatingData.socketErrorPop = type !== "enterBackground" ? true : false
+					evaluatingData.socketErrorPop = type === "socketError" ? true : false
 					// api_checkSocketStatus()
 					return
 				}
@@ -516,7 +516,7 @@ const handleAccompanyError = (res?: IPostMessage) => {
 					handleCancelEvaluat();
 				}
 				evaluatingData.socketErrorStatus = 0
-				evaluatingData.socketErrorPop = type !== "enterBackground" ? true : false
+				evaluatingData.socketErrorPop = type === "socketError" ? true : false
 				break;	
 			case "recordError":
 				// 录音异常

+ 4 - 4
src/view/selection/index.module.less

@@ -137,19 +137,19 @@
 
 :global {
     .scoreItemLeve0 {
-        background-color: rgba(255, 142, 142, 0.32);
+        background-color: rgba(255, 142, 142, 0.32) !important;
     }
 
     .scoreItemLeve1 {
-        background-color: rgba(1, 193, 181, 0.2);
+        background-color: rgba(1, 193, 181, 0.2) !important;
     }
 
     .scoreItemLeve2 {
-        background-color: rgba(255, 178, 82, 0.37);
+        background-color: rgba(255, 178, 82, 0.37) !important;
     }
 
     .scoreItemLeve3 {
-        background-color: rgba(255, 220, 64, 0.4);
+        background-color: rgba(255, 220, 64, 0.4) !important;
     }
 
     .centerTop-enter-active {

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

@@ -12,6 +12,7 @@ import { getQuery } from "/src/utils/queryString";
 const selectData = reactive({
 	notes: [] as any[],
 	staves: [] as any[],
+	measureHeight: 0 as number, // 小节高度
 });
 
 /** 计算点击层数据 */
@@ -108,6 +109,7 @@ const calcNoteData = () => {
 					} catch (error) {}
 
 					// console.log("🚀 ~ staveEle:", staveBbox)
+					selectData.measureHeight = staveBbox.height
 					noteItem.staveBox = {
 						left: staveBbox.x - parentLeft + "px",
 						// top: ((item.stave.y || 0) - 5) * state.zoom + "px",
@@ -129,7 +131,7 @@ const calcNoteData = () => {
 							left: preItem.staveBox.left,
 							top: preItem.staveBox.top,
 							width: preItem.staveBox.width,
-							height: preItem.staveBox.height,
+							// height: preItem.staveBox.height,
 						};
 						selectData.staves.push(noteItem);
 						MeasureNumberXMLList.push(item.MeasureNumberXML);
@@ -189,6 +191,9 @@ export default defineComponent({
 								return styles.leftStaveBox;
 							}
 							if (item.MeasureNumberXML == actualEndIndex) {
+								if (!item.staveBox?.height) {
+									item.staveBox.height = selectData.measureHeight + 'px'
+								}
 								return styles.rightStaveBox;
 							}
 							return styles.staveBox;

+ 2 - 2
vite.config.ts

@@ -68,8 +68,8 @@ export default defineConfig({
 				// target: "https://test.lexiaoya.cn",
 				// target: "https://dev.kt.colexiu.com",
 				// target: "https://dev.resource.colexiu.com", // 内容平台开发环境
-				target: "https://test.resource.colexiu.com",
-				// target: "https://test.kt.colexiu.com",
+				// target: "https://test.resource.colexiu.com",
+				target: "https://test.kt.colexiu.com",
 				changeOrigin: true,
 				rewrite: (path) => path.replace(/^\/instrument/, ""),
 			},