Browse Source

fix: 管理端不支持评测问题修复

TIANYONG 8 months ago
parent
commit
a11514c05b
1 changed files with 4 additions and 1 deletions
  1. 4 1
      src/state.ts

+ 4 - 1
src/state.ts

@@ -1828,7 +1828,6 @@ const setState = (data: any, index: number) => {
     } else {
     } else {
       state.zoom = localStorage.getItem('scoreZoom') ? Number(localStorage.getItem('scoreZoom')) : state.zoom
       state.zoom = localStorage.getItem('scoreZoom') ? Number(localStorage.getItem('scoreZoom')) : state.zoom
     }
     }
-    state.enableEvaluation = false;
   }
   }
   if (storeData.isApp && !state.isPreView) {
   if (storeData.isApp && !state.isPreView) {
     state.zoom = localStorage.getItem('scoreZoom') ? Number(localStorage.getItem('scoreZoom')) : state.zoom
     state.zoom = localStorage.getItem('scoreZoom') ? Number(localStorage.getItem('scoreZoom')) : state.zoom
@@ -1841,6 +1840,10 @@ const setState = (data: any, index: number) => {
   if (state.isEvaluatReport) {
   if (state.isEvaluatReport) {
     state.zoom = 0.8
     state.zoom = 0.8
   }
   }
+  // TODO: 后台预览不支持评测,没有专门的参数,先用isHideMusicList,目前只有后台预览传了isHideMusicList=1
+  if (query.isHideMusicList == 1) {
+    state.enableEvaluation = false;
+  }
   /**
   /**
    * 默认渲染什么谱面类型 & 能否转谱逻辑
    * 默认渲染什么谱面类型 & 能否转谱逻辑
    * 渲染类型:首先取url参数musicRenderType,没有该参数则取musicalInstruments字段匹配的当前分轨的defaultScore,没有匹配到则取默认值('firstTone')
    * 渲染类型:首先取url参数musicRenderType,没有该参数则取musicalInstruments字段匹配的当前分轨的defaultScore,没有匹配到则取默认值('firstTone')