|
@@ -79,7 +79,7 @@ export default defineComponent({
|
|
|
/** 音乐Index */
|
|
|
musicIndex: 0,
|
|
|
/** 显示哪种曲谱 */
|
|
|
- showMusicImg: 'first' as 'staff' | 'first' | 'fixed',
|
|
|
+ showMusicImg: 'staff' as 'staff' | 'first' | 'fixed',
|
|
|
popoverShow: false,
|
|
|
popoverMusicShow: false,
|
|
|
/** 教材列表 */
|
|
@@ -282,6 +282,7 @@ export default defineComponent({
|
|
|
const musicIframeLoad = () => {
|
|
|
const token = storage.get(ACCESS_TOKEN);
|
|
|
const details = data.musics[data.musicIndex];
|
|
|
+ // 如果在配置里面匹配不到,则默认显示五线谱
|
|
|
const musicRenderType =
|
|
|
data.showMusicImg === 'first'
|
|
|
? 'firstTone'
|
|
@@ -289,7 +290,11 @@ export default defineComponent({
|
|
|
? 'fixedTone'
|
|
|
: data.showMusicImg === 'staff'
|
|
|
? 'staff'
|
|
|
- : 'firstTone';
|
|
|
+ : 'staff';
|
|
|
+ const origin = /(localhost|192)/.test(location.host)
|
|
|
+ ? 'https://test.lexiaoya.cn'
|
|
|
+ : location.origin;
|
|
|
+ // data.iframeSrc = `${origin}/instrument/?id=${details.id}&modelType=practise&modeType=json&Authorization=${token}&isPreView=true&part-index=${data.selectMusicInstrumentIndex}&musicRenderType=${musicRenderType}`;
|
|
|
data.iframeSrc = `${vaildMusicScoreUrl()}/instrument/?id=${
|
|
|
details.id
|
|
|
}&modelType=practise&modeType=json&Authorization=${token}&isPreView=true&part-index=${
|
|
@@ -415,6 +420,7 @@ export default defineComponent({
|
|
|
const canSelectTracks = multiTracksSelection
|
|
|
? multiTracksSelection?.split(',')
|
|
|
: [];
|
|
|
+ console.log(canSelectTracks, partListNames);
|
|
|
const arr = partListNames
|
|
|
.map((item: any, index: number) => {
|
|
|
// 该声轨能否被选
|
|
@@ -443,7 +449,8 @@ export default defineComponent({
|
|
|
.replace(/[0-9]+/g, '')
|
|
|
.replace(/\s/g, '')
|
|
|
.toLocaleLowerCase();
|
|
|
- let musicRenderType: 'staff' | 'first' | 'fixed' = 'first';
|
|
|
+ // 如果在配置里面匹配不到,则默认显示五线谱
|
|
|
+ let musicRenderType: 'staff' | 'first' | 'fixed' = 'staff';
|
|
|
let canTrans = true;
|
|
|
data.musics[data.musicIndex]?.musicalInstruments.forEach((item: any) => {
|
|
|
if (item.code.toLocaleLowerCase() === track) {
|
|
@@ -501,7 +508,7 @@ export default defineComponent({
|
|
|
};
|
|
|
// await analyzeXml();
|
|
|
listenerMessage('webViewOnResume', () => {
|
|
|
- console.log('页面显示',data.iframeSrc);
|
|
|
+ console.log('页面显示', data.iframeSrc);
|
|
|
getUserInfo();
|
|
|
data.typeIndex = 0;
|
|
|
data.musicIndex = 0;
|