Bläddra i källkod

feat: 渲染默认谱面逻辑修改

TIANYONG 1 år sedan
förälder
incheckning
7d9afe648a
2 ändrade filer med 6 tillägg och 3 borttagningar
  1. 4 1
      src/view/fingering/fingering-config.ts
  2. 2 2
      vite.config.ts

+ 4 - 1
src/view/fingering/fingering-config.ts

@@ -318,8 +318,11 @@ export const matchVoicePart = (id: number | string, type: "SINGLE" | "CONCERT"):
     };
     let _track;
     if (typeof code === "string") {
+      code = code.toLocaleLowerCase().replace(/ /g, "");
       for (let sKey in subject) {
-        if (sKey === code) {
+        let pitchKey = sKey
+        if (typeof sKey === "string") pitchKey = pitchKey.toLocaleLowerCase().replace(/ /g, "");
+        if (pitchKey === code) {
           _track = subject[sKey];
           break;
         }

+ 2 - 2
vite.config.ts

@@ -67,9 +67,9 @@ export default defineConfig({
 				// target: "https://kt.colexiu.com",
 				// target: "https://test.lexiaoya.cn",
 				// target: "https://dev.kt.colexiu.com",
-				// target: "https://test.resource.colexiu.com", // 内容平台开发环境,内容平台开发,需在url链接上加上isCbs=true
+				target: "https://test.resource.colexiu.com", // 内容平台开发环境,内容平台开发,需在url链接上加上isCbs=true
 				// target: "https://test.resource.colexiu.com",
-				target: "https://test.kt.colexiu.com",
+				// target: "https://test.kt.colexiu.com",
 				changeOrigin: true,
 				rewrite: (path) => path.replace(/^\/instrument/, ""),
 			},