Browse Source

fix: bug修复

TIANYONG 6 months ago
parent
commit
237aa3a147
3 changed files with 6 additions and 4 deletions
  1. 1 1
      src/page-instrument/view-detail/index.module.less
  2. 3 1
      src/state.ts
  3. 2 2
      vite.config.ts

+ 1 - 1
src/page-instrument/view-detail/index.module.less

@@ -185,7 +185,7 @@
         }
 
         .headTopBackBtn {
-            display: none;
+            // display: none;
         }
 
         .pcTitle {

+ 3 - 1
src/state.ts

@@ -675,7 +675,7 @@ const dynamicShowPlaySpeed = (index: number) => {
 export const initSetPlayRate = () => {
   const item: any = (state.sectionStatus && state.section.length === 2) ? state.sectionFirst || state.section[0] : state.times[state.activeNoteIndex];
   if (item && item.measureSpeed) {
-    const ratio = state.speed / item.measureSpeed
+    const ratio = state.speed / Math.floor(item.measureSpeed)
     // state.audiosInstance?.setSpeed(ratio)
     state.basePlayRate = ratio || 1;
     console.log('播放倍率',state.basePlayRate)
@@ -1723,6 +1723,8 @@ const setState = (data: any, index: number) => {
   // 如果是PC端,放大曲谱
   state.platform = query.platform?.toLocaleUpperCase() || "";
   if (state.platform === IPlatform.PC) {
+    // pc端,谱面默认初始大小设置为1.5
+    state.zoom = 1.5;
     if (query.zoom <= 1) {
       state.zoom = query.zoom || state.zoom;
     } else {

+ 2 - 2
vite.config.ts

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