Переглянути джерело

Merge branch 'feature-tianyong' into klx-test

TIANYONG 5 місяців тому
батько
коміт
485907e284

+ 2 - 1
src/helpers/calcSpeed.ts

@@ -41,6 +41,7 @@ export const speedInfo: { [key in string]: number } = {
 	slow: 1.333333333,
 	slowly: 1.333333333,
 	faster: 1.333333333,
+	"molto allargando": 1.333333333,
 };
 
 /**
@@ -184,7 +185,7 @@ export const getGradualLengthByXml = (xml: string) => {
 		}
 		const isKeyWork = keys.find((k) => {
 			const ks = k.split(" ");
-			return textContent && ks.includes(textContent);
+			return textContent && ks.includes(textContent) || k === textContent;
 		});
 		if (ele.type === "metronome" || (ele.type === "words" && (textContent.startsWith("a tempo") || isKeyWork)) || isLastNoteAndNotClosed) {
 			const indexOf = gradualNotes.findIndex((item) => item.length === 1);

+ 0 - 3
src/helpers/metronome.ts

@@ -151,9 +151,6 @@ class Metronome {
 
 	// 播放
 	sound = (currentTime: number) => {
-		if (!state.sectionStatus){
-			currentTime = setCurrentTime(currentTime);
-		}
 		let index = -1;
 		let activeMetro = -1;
 		for (let i = 0; i < metronomeData.metroList.length; i++) {

+ 1 - 0
src/page-instrument/component/the-music-list/list.tsx

@@ -42,6 +42,7 @@ export default defineComponent({
       favoriteFlag: props.favoriteFlag ? true : null, // 我的收藏
       excludeMusicId: props.recentFlag || props.favoriteFlag ? null : state.examSongId,
       albumId: query.albumId ? query.albumId : null,
+      providerType: state.tenantAlbumId ? "TENANT" : "PLATFORM"
     });
     const data = reactive({
       isFocus: false,

+ 1 - 1
src/page-instrument/custom-plugins/helper-model/recommendation/index.tsx

@@ -53,7 +53,7 @@ export default defineComponent({
 					type: 'SMART_PRACTICE',
 					suggestionTypeId: recommenData.suggestId,
 					mobileNo: storeData.user?.phone,
-					url: attachmentUrlsArr.join(",")
+					attachmentUrls: attachmentUrlsArr.join(",")
 				});
 				showToast({
 					message: "意见反馈已提交",

+ 1 - 0
src/page-instrument/custom-plugins/recording-time/index.tsx

@@ -26,6 +26,7 @@ const handleRecord = () => {
 		playTime: totalTime,
 		deviceType: browser().android ? "ANDROID" : "IOS",
 		behaviorId: getBehaviorId(),
+		providerType: state.tenantAlbumId ? "TENANT" : "PLATFORM"
 	};
 	// 如果是作业模式,需要添加作业id
 	if (query.workRecord || query.evaluatingRecord) {

+ 1 - 1
src/page-instrument/header-top/settting/index.module.less

@@ -155,7 +155,7 @@
                     justify-content:flex-end;
                     flex-wrap: wrap;
                     > div{
-                        width: 60px;
+                        width: 48px;
                         height: 25px;
                         font-weight: 600;
                         font-size: 14px;

+ 1 - 0
src/page-instrument/view-detail/index.tsx

@@ -161,6 +161,7 @@ export default defineComponent({
       // 如果是纯预览模式,0.65倍缩放谱面
       state.isPreView = query.isPreView;
       state.isWeb = query.systemType === 'web';
+      state.tenantAlbumId = query.albumId;
       if (state.isPreView) {
         state.zoom = query.zoom  || 0.65
       }

+ 2 - 0
src/state.ts

@@ -610,6 +610,8 @@ const state = reactive({
   speedIcon: 'speed3', // 默认取1/4拍的图片
   /** 曲目点播价格 */
   musicPrice: 0,
+  /** 专辑id */
+  tenantAlbumId: '',
 });
 const browserInfo = browser();
 let offset_duration = 0;

+ 2 - 1
src/utils/baseApi.ts

@@ -1,4 +1,5 @@
 import request from "./request";
+import state from "/src/state";
 
 /** 获取内容平台的曲谱详情 */
 // export const getMusicSheetDetail = (sysMusicScoreId: string) => {
@@ -9,7 +10,7 @@ import request from "./request";
 
 /** 获取内容平台的曲谱详情 */
 export const getMusicSheetDetail = (sysMusicScoreId: string, type?: string, musicId?: string) => {
-  const url = type === 'open' ? `/open/musicSheet/cbsDetail/${sysMusicScoreId}?userMusicId=${musicId}` : `/musicSheet/cbsDetail/${sysMusicScoreId}`;
+  const url = type === 'open' ? `/open/musicSheet/cbsDetail/${sysMusicScoreId}?userMusicId=${musicId}` : `/musicSheet/cbsDetail/${sysMusicScoreId}?tenantAlbumId=${state.tenantAlbumId}`;
   return request.get(url, { noToken: type === 'open' ? true : false });
 };
 

+ 1 - 1
vite.config.ts

@@ -52,7 +52,7 @@ export default defineConfig({
     // https: true,
     proxy: {
       "^/instrument/.*": {
-        target: "https://test.colexiu.com",
+        target: "https://dev.colexiu.com",
         changeOrigin: true,
         rewrite: (path) => path.replace(/^\/instrument/, ""),
       },