|
@@ -37,7 +37,7 @@ import { getRandomKey, musicBuy } from '../music'
|
|
|
import { getOssUploadUrl, state } from '@/state'
|
|
|
import { useEventTracking } from '@/helpers/hooks'
|
|
|
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 iconShare from '@/views/music/album/icon_share.svg'
|
|
|
import iconAlbum from '@/views/music/component/images/icon_album.png'
|
|
@@ -250,24 +250,24 @@ export default defineComponent({
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- const setAccompanyUrl = () => {
|
|
|
- let url = location.origin
|
|
|
- if (
|
|
|
- location.host.includes('dev.colexiu') ||
|
|
|
- location.host.includes('192.168') ||
|
|
|
- location.host.includes('localhost')
|
|
|
- ) {
|
|
|
- url = 'https://dev.colexiu.com'
|
|
|
- }
|
|
|
- const music = musicDetail.value
|
|
|
- let subjectId = ''
|
|
|
- if (music.background && music.background.length > 0) {
|
|
|
- subjectId = music.background[0].id
|
|
|
- }
|
|
|
- accompanyUrl.value =
|
|
|
- url +
|
|
|
- `/accompany/colxiu-website.html?id=${music.id}&part-index=${subjectId}`
|
|
|
- }
|
|
|
+ // const setAccompanyUrl = () => {
|
|
|
+ // let url = location.origin
|
|
|
+ // if (
|
|
|
+ // location.host.includes('dev.colexiu') ||
|
|
|
+ // location.host.includes('192.168') ||
|
|
|
+ // location.host.includes('localhost')
|
|
|
+ // ) {
|
|
|
+ // url = 'https://dev.colexiu.com'
|
|
|
+ // }
|
|
|
+ // const music = musicDetail.value
|
|
|
+ // let subjectId = ''
|
|
|
+ // if (music.background && music.background.length > 0) {
|
|
|
+ // subjectId = music.background[0].id
|
|
|
+ // }
|
|
|
+ // accompanyUrl.value =
|
|
|
+ // url +
|
|
|
+ // `/accompany/colxiu-website.html?id=${music.id}&part-index=${subjectId}`
|
|
|
+ // }
|
|
|
const player = ref<any>(null)
|
|
|
const audio = ref<any>(null)
|
|
|
const freeRate = ref<any>(0)
|
|
@@ -496,7 +496,7 @@ export default defineComponent({
|
|
|
}
|
|
|
})
|
|
|
let url =
|
|
|
- location.origin +
|
|
|
+ getHttpOrigin() +
|
|
|
`/teacher/#/shareMusic?id=${musicDetail.value?.id}&recomUserId=${state.user.data?.userId}&userType=${state.platformType}&p=tenant`
|
|
|
// 判断是否有活动
|
|
|
if (res.data.discount === 1) {
|
|
@@ -521,7 +521,7 @@ export default defineComponent({
|
|
|
})
|
|
|
/** 渲染五线谱 */
|
|
|
const renderStaff = () => {
|
|
|
- staffData.iframeSrc = `${location.origin}${location.pathname}osmd/index.html`
|
|
|
+ staffData.iframeSrc = `${getHttpOrigin()}${location.pathname}osmd/index.html`
|
|
|
staffData.musicXml = musicDetail.value?.xmlFileUrl || ''
|
|
|
staffData.partList = musicDetail.value?.background || []
|
|
|
staffData.instrumentName = getInstrumentName(
|