|
@@ -53,7 +53,8 @@ import {
|
|
|
sortMusical,
|
|
|
getInstrumentName,
|
|
|
vaildMusicScoreUrl,
|
|
|
- trackToCode
|
|
|
+ trackToCode,
|
|
|
+ getHttpOrigin
|
|
|
} from '@/helpers/utils';
|
|
|
import { audioPlayType } from '@/helpers/constant';
|
|
|
|
|
@@ -348,11 +349,11 @@ export default defineComponent({
|
|
|
: data.showMusicImg === 'staff'
|
|
|
? 'staff'
|
|
|
: 'staff';
|
|
|
-
|
|
|
+
|
|
|
// pdf
|
|
|
const musicSheetType = details?.musicSheetType;
|
|
|
let musicPdfUrl = ''
|
|
|
-
|
|
|
+
|
|
|
if(musicSheetType === "SINGLE" || data.selectMusicInstrumentIndex === 999) {
|
|
|
if( data.showMusicImg === "first") {
|
|
|
musicPdfUrl = details.firstPdfUrl
|
|
@@ -379,20 +380,17 @@ export default defineComponent({
|
|
|
data.musicPdfUrl = musicPdfUrl
|
|
|
if(musicPdfUrl) {
|
|
|
// data.iframeSrc = `/pdf/web/viewer.html?file=${encodeURIComponent(data.musicPdfUrl)}&t=${Date.now()}`;
|
|
|
- data.iframeSrc = `${location.origin}${location.pathname}pdf/web/viewer.html?file=${encodeURIComponent(data.musicPdfUrl)}&t=${Date.now()}`;
|
|
|
+ data.iframeSrc = `${getHttpOrigin()}${location.pathname}pdf/web/viewer.html?file=${encodeURIComponent(data.musicPdfUrl)}&t=${Date.now()}`;
|
|
|
} else {
|
|
|
|
|
|
- // 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=${
|
|
|
data.selectMusicInstrumentIndex
|
|
|
}&musicRenderType=${musicRenderType}&zoom=0.6`;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
|
|
|
console.log('地址', data.iframeSrc);
|
|
|
};
|
|
@@ -638,7 +636,7 @@ export default defineComponent({
|
|
|
.filter((item: any) => item.canselect);
|
|
|
//.sort((a: any, b: any) => a.sortId - b.sortId);
|
|
|
data.trackList = arr;
|
|
|
-
|
|
|
+
|
|
|
// 是否显示总谱
|
|
|
const selectMusic = data.musics[data.musicIndex];
|
|
|
if (selectMusic) {
|
|
@@ -1012,7 +1010,7 @@ export default defineComponent({
|
|
|
src={data.iframeSrc}
|
|
|
></iframe>
|
|
|
) : ''}
|
|
|
-
|
|
|
+
|
|
|
</>
|
|
|
</div>
|
|
|
) : (
|
|
@@ -1186,7 +1184,7 @@ export default defineComponent({
|
|
|
postMessage({
|
|
|
api: 'openWebView',
|
|
|
content: {
|
|
|
- url: `${location.origin}${location.pathname}#/member-center`,
|
|
|
+ url: `${getHttpOrigin()}${location.pathname}#/member-center`,
|
|
|
orientation: 1
|
|
|
}
|
|
|
});
|
|
@@ -1207,7 +1205,7 @@ export default defineComponent({
|
|
|
postMessage({
|
|
|
api: 'openWebView',
|
|
|
content: {
|
|
|
- url: `${location.origin}${location.pathname}#/member-center`,
|
|
|
+ url: `${getHttpOrigin()}${location.pathname}#/member-center`,
|
|
|
orientation: 1
|
|
|
}
|
|
|
});
|