|
@@ -37,7 +37,7 @@ import { getRandomKey, musicBuy } from '../music'
|
|
import { getOssUploadUrl, state } from '@/state'
|
|
import { getOssUploadUrl, state } from '@/state'
|
|
// import { useEventTracking } from '@/helpers/hooks'
|
|
// import { useEventTracking } from '@/helpers/hooks'
|
|
import ColSticky from '@/components/col-sticky'
|
|
import ColSticky from '@/components/col-sticky'
|
|
-import { browser, moneyFormat } from '@/helpers/utils'
|
|
|
|
|
|
+import { browser, getHttpOrigin, moneyFormat } from '@/helpers/utils'
|
|
import { orderStatus } from '@/views/order-detail/orderStatus'
|
|
import { orderStatus } from '@/views/order-detail/orderStatus'
|
|
import iconShare from '@/views/music/album/icon_share.svg'
|
|
import iconShare from '@/views/music/album/icon_share.svg'
|
|
import iconAlbum from './images/icon_album.png'
|
|
import iconAlbum from './images/icon_album.png'
|
|
@@ -512,7 +512,7 @@ export default defineComponent({
|
|
}
|
|
}
|
|
})
|
|
})
|
|
let url =
|
|
let url =
|
|
- location.origin +
|
|
|
|
|
|
+ getHttpOrigin() +
|
|
`/teacher/#/shareMusic?id=${musicDetail.value?.id}&recomUserId=${state.user.data?.userId}&userType=${state.platformType}`
|
|
`/teacher/#/shareMusic?id=${musicDetail.value?.id}&recomUserId=${state.user.data?.userId}&userType=${state.platformType}`
|
|
// 判断是否有活动
|
|
// 判断是否有活动
|
|
if (res.data.discount === 1) {
|
|
if (res.data.discount === 1) {
|
|
@@ -591,8 +591,8 @@ export default defineComponent({
|
|
staffData.xmlPartList = partList
|
|
staffData.xmlPartList = partList
|
|
}
|
|
}
|
|
|
|
|
|
- // staffData.iframeSrc = `${location.origin}/osmd/index.html`
|
|
|
|
- // staffData.iframeSrc = `${location.origin}${location.pathname}osmd/index.html`
|
|
|
|
|
|
+ // staffData.iframeSrc = `${getHttpOrigin()}/osmd/index.html`
|
|
|
|
+ // staffData.iframeSrc = `${getHttpOrigin()}${location.pathname}osmd/index.html`
|
|
staffData.musicXml = musicDetail.value?.xmlFileUrl || ''
|
|
staffData.musicXml = musicDetail.value?.xmlFileUrl || ''
|
|
const tempList = musicDetail.value?.background || []
|
|
const tempList = musicDetail.value?.background || []
|
|
const tempPartList = [] as any
|
|
const tempPartList = [] as any
|
|
@@ -631,10 +631,10 @@ export default defineComponent({
|
|
try {
|
|
try {
|
|
nextTick(() => {
|
|
nextTick(() => {
|
|
if (musicPdfUrl.value) {
|
|
if (musicPdfUrl.value) {
|
|
- // const url = `${location.origin}/pdf/web/viewer-pdf.html?file=${encodeURIComponent(
|
|
|
|
|
|
+ // const url = `${getHttpOrigin()}/pdf/web/viewer-pdf.html?file=${encodeURIComponent(
|
|
// musicPdfUrl.value
|
|
// musicPdfUrl.value
|
|
// )}&t=${Date.now()}`
|
|
// )}&t=${Date.now()}`
|
|
- const url = `${location.origin}${
|
|
|
|
|
|
+ const url = `${getHttpOrigin()}${
|
|
location.pathname
|
|
location.pathname
|
|
}pdf/web/viewer-pdf.html?file=${encodeURIComponent(
|
|
}pdf/web/viewer-pdf.html?file=${encodeURIComponent(
|
|
musicPdfUrl.value
|
|
musicPdfUrl.value
|
|
@@ -644,14 +644,14 @@ export default defineComponent({
|
|
iframeRef.contentWindow.location.replace(url)
|
|
iframeRef.contentWindow.location.replace(url)
|
|
staffData.iframeSrc = url
|
|
staffData.iframeSrc = url
|
|
} else {
|
|
} else {
|
|
- const url = `${location.origin}${
|
|
|
|
|
|
+ const url = `${getHttpOrigin()}${
|
|
location.pathname
|
|
location.pathname
|
|
}osmd/index.html?t=${new Date().getTime()}`
|
|
}osmd/index.html?t=${new Date().getTime()}`
|
|
- // const url = `${location.origin}/osmd/index.html`
|
|
|
|
|
|
+ // const url = `${getHttpOrigin()}/osmd/index.html`
|
|
|
|
|
|
const iframeRef = document.querySelector('#staffIframeRef') as any
|
|
const iframeRef = document.querySelector('#staffIframeRef') as any
|
|
iframeRef.contentWindow.location.replace(
|
|
iframeRef.contentWindow.location.replace(
|
|
- `${location.origin}${location.pathname}osmd/index.html`
|
|
|
|
|
|
+ `${getHttpOrigin()}${location.pathname}osmd/index.html`
|
|
)
|
|
)
|
|
staffData.iframeSrc = url
|
|
staffData.iframeSrc = url
|
|
}
|
|
}
|