TIANYONG 1 рік тому
батько
коміт
c7377f557d

Різницю між файлами не показано, бо вона завелика
+ 0 - 0
src/page-instrument/component/mode-type-mode/icon/index.json


+ 4 - 2
src/page-instrument/component/mode-type-mode/index.tsx

@@ -10,10 +10,12 @@ import { storeData } from "/src/store";
 import { studentQueryUserInfo } from "../../api";
 import { usePageVisibility } from "@vant/use";
 import GuideIndex from "../../view-figner/guide/guide-index";
+import { getQuery } from "/src/utils/queryString";
 export default defineComponent({
 	name: "modelWraper",
 
 	setup() {
+		const query = getQuery();
 		const data = reactive({
 			showPC: false,
 			showStudent: false,
@@ -96,8 +98,8 @@ export default defineComponent({
 							src={state.enableEvaluation ? icons.icon_3 : icons.icon_4}
 						/>
 					</div>
-					{data.showPC && data.showTip ? <TeacherBootom></TeacherBootom> : null}
-					{data.showStudent && data.showTip ? <StudentBottom></StudentBottom> : null}
+					{data.showPC && data.showTip && !query.isCbs ? <TeacherBootom></TeacherBootom> : null}
+					{data.showStudent && data.showTip && !query.isCbs ? <StudentBottom></StudentBottom> : null}
 					{data.showVip && <TheVip />}
 				</div>
 				{headTopData.modeType &&

+ 5 - 1
src/page-instrument/custom-plugins/guide-page/api.ts

@@ -1,8 +1,12 @@
 import request from "../../../utils/request";
 import { storeData } from "/src/store";
+import { getQuery } from "/src/utils/queryString";
+
+const query: any = getQuery();
 
 export const setGuidance = (params: any) => {
-    return request.post('/functionGuidance/save', {
+    // 内容平台无需调用该接口
+    return query.isCbs ? {} : request.post('/functionGuidance/save', {
       data: params,
       requestType: "json",
     });

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

@@ -494,8 +494,8 @@ export default defineComponent({
         {/* 模式切换 */}
         <ModeTypeMode />
         {/* isAllBtns */}
-        {isAllBtns.value && <TeacherTop></TeacherTop>}
-        {isAllBtnsStudent.value && <StudentTop></StudentTop>}
+        {isAllBtns.value && !query.isCbs && <TeacherTop></TeacherTop>}
+        {isAllBtnsStudent.value && !query.isCbs && <StudentTop></StudentTop>}
       </>
     );
   },

+ 7 - 3
src/state.ts

@@ -231,7 +231,7 @@ const state = reactive({
     /** 显示光标 */
     displayCursor: true,
     /** 频率 */
-    frequency: 440,
+    frequency: 0,
     /** 评测难度 */
     evaluationDifficulty: "ADVANCED" as IDifficulty,
     /** 保存到相册 */
@@ -790,7 +790,7 @@ const setState = (data: any, index: number) => {
   state.subjectCodeId = pitchSubject ? pitchSubject.id : 0
   state.categoriesId = data.musicCategoryId;
   state.categoriesName = data.musicTagNames;
-  state.enableEvaluation = data.isEvaluated ? true : false;
+  // state.enableEvaluation = data.isEvaluated ? true : false;
   state.examSongId = data.bizId + "";
   state.examSongName = data.name;
   state.coverImg = data.musicCover ?? "";
@@ -817,6 +817,8 @@ const setState = (data: any, index: number) => {
   state.originSpeed = state.speed = data.playSpeed || 100;
   const track = data.code || data.track;
   state.track = track ? track.replace(/ /g, "").toLocaleLowerCase() : "";
+  // 能否评测,根据当前声轨有无伴奏判断
+  state.enableEvaluation = state.accompany ? true : false
   state.enableNotation = data.isConvertibleScore === null ? true : data.isConvertibleScore;
   state.isConcert = data.musicSheetType === "CONCERT" ? true : false;
   // multiTracksSelection 返回为空,默认代表全部分轨
@@ -870,7 +872,9 @@ const setState = (data: any, index: number) => {
   state.baseFrequency = Number(state.baseFrequency)
   // 用户上次的频率和基准频率误差超过10,则重置
   if (Math.abs(state.setting.frequency - state.baseFrequency) > 10) {
-    state.setting.frequency = state.baseFrequency >= 0 ? state.baseFrequency : state.setting.frequency
+    state.setting.frequency = state.baseFrequency >= 0 ? state.baseFrequency : 440
+  } else {
+    state.setting.frequency = state.setting.frequency || state.baseFrequency
   }
 };
 

+ 2 - 1
vite.config.ts

@@ -68,7 +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.kt.colexiu.com",
+				target: "https://test.resource.colexiu.com",
+				// target: "https://test.kt.colexiu.com",
 				changeOrigin: true,
 				rewrite: (path) => path.replace(/^\/instrument/, ""),
 			},

Деякі файли не було показано, через те що забагато файлів було змінено