Browse Source

feat: 转谱页面,xml路径转译

TIANYONG 1 year ago
parent
commit
c8b96510e3

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

@@ -44,7 +44,7 @@ export const headTopData = reactive({
       metronomeData.cursorMode = 1
     }
     if (value === 'practise') {
-      state.playIngSpeed = state.speed
+      // state.playIngSpeed = state.speed
     }
     if (value === "evaluating") {
       // 如果是pc端, 评测模式暂不可用

+ 6 - 1
src/utils/index.ts

@@ -127,14 +127,19 @@ export const matchProductApiUrl = () => {
 		'instrument': {
 			'dev': 'https://dev.kt.colexiu.com',
 			'test': 'https://test.kt.colexiu.com',
+			'test2': 'https://test.lexiaoya.cn',
 			'online': 'https://kt.colexiu.com'
 		}
 	}
-	const environment = location.origin.includes('//dev') ? 'dev' : location.origin.includes('//test') ? 'test' : location.origin.includes('//online') ? 'online' : 'dev'
+	let environment: 'dev' | 'test' | 'test2' | 'online' = location.origin.includes('//dev') ? 'dev' : location.origin.includes('//test') ? 'test' : location.origin.includes('//online') ? 'online' : 'dev'
 	if (query.isCbs) {
 		return apiUrls.cbs[environment] + '/cbs-app'
 	} else {
 		const pathName = location.pathname.includes('index') ? 'gym' : location.pathname.includes('colexiu') ? 'colexiu' : location.pathname.includes('orchestra') ? 'orchestra' : 'instrument'
+		// 兼容课堂乐器,测试环境两个域名
+		if (pathName === 'instrument' && environment === 'test') {
+			environment = location.origin.includes('//test.kt') ? 'test' : 'test2'
+		}
 		return apiUrls[pathName][environment] + '/edu-app'
 	}
 }

+ 1 - 1
src/view/transfer-to-img/index.tsx

@@ -39,7 +39,7 @@ export default defineComponent({
 
 		onMounted(() => {
 			(window as any).appName = "colexiu";
-			state.xmlUrl = query.xmlUrl;
+			state.xmlUrl = decodeURIComponent(query.xmlUrl);
 			//课堂乐器,默认简谱
 			sessionStorage.setItem(productRenderType, detailData.product[detailData.step].type);