|
@@ -29,6 +29,7 @@ import {
|
|
Toast,
|
|
Toast,
|
|
Picker
|
|
Picker
|
|
} from 'vant'
|
|
} from 'vant'
|
|
|
|
+import qs from 'query-string'
|
|
import styles from './index.module.less'
|
|
import styles from './index.module.less'
|
|
// import Item from '../list/item'
|
|
// import Item from '../list/item'
|
|
import { useRect } from '@vant/use'
|
|
import { useRect } from '@vant/use'
|
|
@@ -37,7 +38,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'
|
|
@@ -52,23 +53,17 @@ import ColShare from '@/components/col-share'
|
|
import iconCollect from './images/icon_collect.png'
|
|
import iconCollect from './images/icon_collect.png'
|
|
import iconCollectActive from './images/icon_collect_active.png'
|
|
import iconCollectActive from './images/icon_collect_active.png'
|
|
import iconListen from './images/icon_listen.png'
|
|
import iconListen from './images/icon_listen.png'
|
|
-import iconTeacher from '@common/images/icon_teacher.png'
|
|
|
|
import emtpy from './images/emtpy.png'
|
|
import emtpy from './images/emtpy.png'
|
|
|
|
|
|
import activeButtonIcon from '@common/images/icon_checkbox.png'
|
|
import activeButtonIcon from '@common/images/icon_checkbox.png'
|
|
import inactiveButtonIcon from '@common/images/icon_checkbox_default.png'
|
|
import inactiveButtonIcon from '@common/images/icon_checkbox_default.png'
|
|
import staffDetafult from './images/staff-default.png'
|
|
import staffDetafult from './images/staff-default.png'
|
|
-// import staffActive from './images/staff-active.png'
|
|
|
|
import firstDefault from './images/first-default.png'
|
|
import firstDefault from './images/first-default.png'
|
|
-// import firstActive from './images/first-active.png'
|
|
|
|
import fixedDefault from './images/fixed-default.png'
|
|
import fixedDefault from './images/fixed-default.png'
|
|
-// import fixedActive from './images/fixed-active.png'
|
|
|
|
-
|
|
|
|
import Plyr from 'plyr'
|
|
import Plyr from 'plyr'
|
|
import 'plyr/dist/plyr.css'
|
|
import 'plyr/dist/plyr.css'
|
|
import Download from './download'
|
|
import Download from './download'
|
|
import { getInstrumentName } from '@/constant/instruments'
|
|
import { getInstrumentName } from '@/constant/instruments'
|
|
-import { getUploadSign, onOnlyFileUpload } from '@/helpers/oss-file-upload'
|
|
|
|
import { svgtopng } from '@/tenant/music/music-detail/formatSvgToImg'
|
|
import { svgtopng } from '@/tenant/music/music-detail/formatSvgToImg'
|
|
import { useThrottleFn } from '@vueuse/core'
|
|
import { useThrottleFn } from '@vueuse/core'
|
|
import {
|
|
import {
|
|
@@ -86,7 +81,8 @@ export const getAssetsHomeFile = (fileName: string) => {
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
name: 'MusicDetail',
|
|
name: 'MusicDetail',
|
|
setup() {
|
|
setup() {
|
|
- localStorage.setItem('behaviorId', getRandomKey())
|
|
|
|
|
|
+ const behaviorId = ref(getRandomKey())
|
|
|
|
+ localStorage.setItem('behaviorId', behaviorId.value)
|
|
const router = useRouter()
|
|
const router = useRouter()
|
|
const route = useRoute()
|
|
const route = useRoute()
|
|
const loading = ref(false)
|
|
const loading = ref(false)
|
|
@@ -104,12 +100,45 @@ export default defineComponent({
|
|
const staffList = ref<Array<any>>([])
|
|
const staffList = ref<Array<any>>([])
|
|
const musicPdfUrl = ref('')
|
|
const musicPdfUrl = ref('')
|
|
|
|
|
|
|
|
+ const staffData = reactive({
|
|
|
|
+ // open: false,
|
|
|
|
+ // iframeSrc: '',
|
|
|
|
+ // musicXml: '',
|
|
|
|
+ // instrumentName: '',
|
|
|
|
+ // iframeRef: null as any,
|
|
|
|
+ // partIndex: 0,
|
|
|
|
+ // partXmlIndex: 0,
|
|
|
|
+ // tempPartList: [] as any[],
|
|
|
|
+ // partList: [] as any[],
|
|
|
|
+ // xmlPartList: [] as any[]
|
|
|
|
+
|
|
|
|
+ musicId: route.query.id as any,
|
|
|
|
+ isConcert: false, // 是否合奏
|
|
|
|
+ details: {} as any,
|
|
|
|
+ list: [], // 列表数据
|
|
|
|
+ open: false,
|
|
|
|
+ closed: true,
|
|
|
|
+ audioReady: false,
|
|
|
|
+ iframeSrc: "",
|
|
|
|
+ musicXml: "",
|
|
|
|
+ instrumentName: "",
|
|
|
|
+ iframeRef: null as any,
|
|
|
|
+ imgs: [] as any,
|
|
|
|
+ musicPdfUrl: "", // 当前声轨PDF
|
|
|
|
+ partList: [] as any[],
|
|
|
|
+ partNames: [] as string[],
|
|
|
|
+ selectedPartName: "" as any,
|
|
|
|
+ selectedPartIndex: 0,
|
|
|
|
+ isComberRender: false, // 是否合并谱显示
|
|
|
|
+ metronomeUrl: "", // 合奏使用链接
|
|
|
|
+ metronomeMp3Url: "", // 独奏使用链接
|
|
|
|
+ })
|
|
|
|
+
|
|
const defaultImgs = ref({
|
|
const defaultImgs = ref({
|
|
first: false,
|
|
first: false,
|
|
fixed: false,
|
|
fixed: false,
|
|
staff: false
|
|
staff: false
|
|
})
|
|
})
|
|
- const accompanyUrl = ref<string>('')
|
|
|
|
const downloadStatus = ref<boolean>(false)
|
|
const downloadStatus = ref<boolean>(false)
|
|
const staff = reactive({
|
|
const staff = reactive({
|
|
status: false,
|
|
status: false,
|
|
@@ -187,62 +216,74 @@ export default defineComponent({
|
|
loading.value = true
|
|
loading.value = true
|
|
isError.value = false
|
|
isError.value = false
|
|
try {
|
|
try {
|
|
- const res = await request.get(`/music/sheet/detail/${route.query.id}`, {
|
|
|
|
- prefix:
|
|
|
|
- state.platformType === 'TEACHER' ? '/api-teacher' : '/api-student'
|
|
|
|
- })
|
|
|
|
- musicDetail.value = res.data
|
|
|
|
- // console.log(musicDetail.value.notation, 'musicDetail')
|
|
|
|
- // 取原音,如果有多个则默认第一个
|
|
|
|
- const background = res.data.background
|
|
|
|
- audioFileUrl.value =
|
|
|
|
- background && background.length > 0 ? background[0].audioFileUrl : ''
|
|
|
|
- // const arrImgs = res.data.musicImg ? res.data.musicImg.split(',') : []
|
|
|
|
- showImg.value = res.data.musicImg ? res.data.musicImg.split(',') : []
|
|
|
|
- firstList.value = res.data.firstTone
|
|
|
|
- ? res.data.firstTone.split(',')
|
|
|
|
- : []
|
|
|
|
- fixedList.value = res.data.fixedTone
|
|
|
|
- ? res.data.fixedTone.split(',')
|
|
|
|
- : []
|
|
|
|
- staffList.value = res.data.musicImg ? res.data.musicImg.split(',') : []
|
|
|
|
-
|
|
|
|
- // 初始化默认数据是否有值
|
|
|
|
- if (firstList.value.length > 0) {
|
|
|
|
- defaultImgs.value.first = true
|
|
|
|
- }
|
|
|
|
- if (fixedList.value.length > 0) {
|
|
|
|
- defaultImgs.value.fixed = true
|
|
|
|
- }
|
|
|
|
- if (staffList.value.length > 0) {
|
|
|
|
- defaultImgs.value.staff = true
|
|
|
|
- }
|
|
|
|
|
|
+ const { data } = await request.get(state.platformType === 'TEACHER' ? '/api-teacher' : '/api-student' + '/musicSheet/cbsDetail/' + route.query.id)
|
|
|
|
+ musicDetail.value = data
|
|
|
|
+ staffData.details = data
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ // const res = await request.get(`/music/sheet/detail/${route.query.id}`, {
|
|
|
|
+ // prefix:
|
|
|
|
+ // state.platformType === 'TEACHER' ? '/api-teacher' : '/api-student'
|
|
|
|
+ // })
|
|
|
|
+ // musicDetail.value = res.data
|
|
|
|
+ // const background = res.data.background
|
|
|
|
+ // audioFileUrl.value =
|
|
|
|
+ // background && background.length > 0 ? background[0].audioFileUrl : ''
|
|
|
|
+ // // const arrImgs = res.data.musicImg ? res.data.musicImg.split(',') : []
|
|
|
|
+ // showImg.value = res.data.musicImg ? res.data.musicImg.split(',') : []
|
|
|
|
+ // firstList.value = res.data.firstTone
|
|
|
|
+ // ? res.data.firstTone.split(',')
|
|
|
|
+ // : []
|
|
|
|
+ // fixedList.value = res.data.fixedTone
|
|
|
|
+ // ? res.data.fixedTone.split(',')
|
|
|
|
+ // : []
|
|
|
|
+ // staffList.value = res.data.musicImg ? res.data.musicImg.split(',') : []
|
|
|
|
+
|
|
|
|
+ // // 初始化默认数据是否有值
|
|
|
|
+ // if (firstList.value.length > 0) {
|
|
|
|
+ // defaultImgs.value.first = true
|
|
|
|
+ // }
|
|
|
|
+ // if (fixedList.value.length > 0) {
|
|
|
|
+ // defaultImgs.value.fixed = true
|
|
|
|
+ // }
|
|
|
|
+ // if (staffList.value.length > 0) {
|
|
|
|
+ // defaultImgs.value.staff = true
|
|
|
|
+ // }
|
|
|
|
+ await toDetail(data)
|
|
|
|
+
|
|
|
|
|
|
nextTick(async () => {
|
|
nextTick(async () => {
|
|
- await toDetail()
|
|
|
|
- renderStaff()
|
|
|
|
- })
|
|
|
|
|
|
+ if (
|
|
|
|
+ (staffData.isConcert && staffData.metronomeUrl) ||
|
|
|
|
+ (!staffData.isConcert && staffData.metronomeMp3Url)
|
|
|
|
+ ) {
|
|
|
|
+ initAudio();
|
|
|
|
+ } else {
|
|
|
|
+ renderStaff();
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
|
|
- if (res.data.auditStatus === 'DOING') {
|
|
|
|
- Dialog.confirm({
|
|
|
|
- message: '曲目审核中',
|
|
|
|
- showConfirmButton: true,
|
|
|
|
- showCancelButton: false,
|
|
|
|
- confirmButtonColor: 'var(--van-primary)'
|
|
|
|
- }).then(() => {
|
|
|
|
- if (browser().isApp) {
|
|
|
|
- postMessage({ api: 'goBack' })
|
|
|
|
- } else {
|
|
|
|
- router.back()
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ // if (res.data.auditStatus === 'DOING') {
|
|
|
|
+ // Dialog.confirm({
|
|
|
|
+ // message: '曲目审核中',
|
|
|
|
+ // showConfirmButton: true,
|
|
|
|
+ // showCancelButton: false,
|
|
|
|
+ // confirmButtonColor: 'var(--van-primary)'
|
|
|
|
+ // }).then(() => {
|
|
|
|
+ // if (browser().isApp) {
|
|
|
|
+ // postMessage({ api: 'goBack' })
|
|
|
|
+ // } else {
|
|
|
|
+ // router.back()
|
|
|
|
+ // }
|
|
|
|
+ // })
|
|
|
|
+ // }
|
|
} catch (error) {
|
|
} catch (error) {
|
|
isError.value = true
|
|
isError.value = true
|
|
}
|
|
}
|
|
- if (musicDetail.value?.musicSheetType !== 'CONCERT') {
|
|
|
|
- loading.value = false
|
|
|
|
- }
|
|
|
|
|
|
+ loading.value = false
|
|
}
|
|
}
|
|
const player = ref<any>(null)
|
|
const player = ref<any>(null)
|
|
const audio = ref<any>(null)
|
|
const audio = ref<any>(null)
|
|
@@ -309,10 +350,10 @@ export default defineComponent({
|
|
const footer = useRect(footers as any)
|
|
const footer = useRect(footers as any)
|
|
heightInfo.value = height + footer.height
|
|
heightInfo.value = height + footer.height
|
|
|
|
|
|
- // 初始化音频
|
|
|
|
- if (audioFileUrl.value) {
|
|
|
|
- initAudio()
|
|
|
|
- }
|
|
|
|
|
|
+ // // 初始化音频
|
|
|
|
+ // if (audioFileUrl.value) {
|
|
|
|
+ // initAudio()
|
|
|
|
+ // }
|
|
|
|
|
|
window.addEventListener('message', showLoading)
|
|
window.addEventListener('message', showLoading)
|
|
})
|
|
})
|
|
@@ -335,7 +376,7 @@ export default defineComponent({
|
|
if (browser().isTeacher) {
|
|
if (browser().isTeacher) {
|
|
providerType = state.projectType === 'tenant' ? 'TENANT' : 'PLATFORM'
|
|
providerType = state.projectType === 'tenant' ? 'TENANT' : 'PLATFORM'
|
|
}
|
|
}
|
|
- apiUrl = `/music/sheet/favorite/${musicDetail.value?.id}`
|
|
|
|
|
|
+ apiUrl = `/music/sheet/favorite/${musicDetail.value?.bizId}`
|
|
try {
|
|
try {
|
|
await request.post(apiUrl, {
|
|
await request.post(apiUrl, {
|
|
requestType: 'form',
|
|
requestType: 'form',
|
|
@@ -363,7 +404,7 @@ export default defineComponent({
|
|
try {
|
|
try {
|
|
const res = await request.post('/api-teacher/courseCourseware/submit', {
|
|
const res = await request.post('/api-teacher/courseCourseware/submit', {
|
|
data: {
|
|
data: {
|
|
- musicSheetId: musicDetail.value.id,
|
|
|
|
|
|
+ musicSheetId: musicDetail.value.bizId,
|
|
clientType: 'TEACHER',
|
|
clientType: 'TEACHER',
|
|
userId: state.user.data?.userId
|
|
userId: state.user.data?.userId
|
|
}
|
|
}
|
|
@@ -407,8 +448,8 @@ export default defineComponent({
|
|
const onBuy = async () => {
|
|
const onBuy = async () => {
|
|
const music = musicDetail.value
|
|
const music = musicDetail.value
|
|
orderStatus.orderObject.orderType = 'MUSIC'
|
|
orderStatus.orderObject.orderType = 'MUSIC'
|
|
- orderStatus.orderObject.orderName = music.musicSheetName
|
|
|
|
- orderStatus.orderObject.orderDesc = music.musicSheetName
|
|
|
|
|
|
+ orderStatus.orderObject.orderName = music.name
|
|
|
|
+ orderStatus.orderObject.orderDesc = music.name
|
|
orderStatus.orderObject.actualPrice = music.musicPrice
|
|
orderStatus.orderObject.actualPrice = music.musicPrice
|
|
orderStatus.orderObject.recomUserId = route.query.recomUserId || 0
|
|
orderStatus.orderObject.recomUserId = route.query.recomUserId || 0
|
|
orderStatus.orderObject.activityId = route.query.activityId || 0
|
|
orderStatus.orderObject.activityId = route.query.activityId || 0
|
|
@@ -416,7 +457,7 @@ export default defineComponent({
|
|
orderStatus.orderObject.orderList = [
|
|
orderStatus.orderObject.orderList = [
|
|
{
|
|
{
|
|
orderType: 'MUSIC',
|
|
orderType: 'MUSIC',
|
|
- goodsName: music.musicSheetName,
|
|
|
|
|
|
+ goodsName: music.name,
|
|
actualPrice: music.musicPrice,
|
|
actualPrice: music.musicPrice,
|
|
...music
|
|
...music
|
|
}
|
|
}
|
|
@@ -502,18 +543,20 @@ export default defineComponent({
|
|
const shareStatus = ref(false)
|
|
const shareStatus = ref(false)
|
|
const shareUrl = ref('')
|
|
const shareUrl = ref('')
|
|
const shareDiscount = ref(0)
|
|
const shareDiscount = ref(0)
|
|
|
|
+
|
|
|
|
+ const partColumns = ref<any>([]);
|
|
// console.log(data)
|
|
// console.log(data)
|
|
const onShare = async () => {
|
|
const onShare = async () => {
|
|
try {
|
|
try {
|
|
const res = await request.post('/api-teacher/open/musicShareProfit', {
|
|
const res = await request.post('/api-teacher/open/musicShareProfit', {
|
|
data: {
|
|
data: {
|
|
- bizId: musicDetail.value?.id,
|
|
|
|
|
|
+ bizId: musicDetail.value?.bizId,
|
|
userId: state.user.data?.userId
|
|
userId: state.user.data?.userId
|
|
}
|
|
}
|
|
})
|
|
})
|
|
let url =
|
|
let url =
|
|
location.origin +
|
|
location.origin +
|
|
- `/teacher/#/shareMusic?id=${musicDetail.value?.id}&recomUserId=${state.user.data?.userId}&userType=${state.platformType}`
|
|
|
|
|
|
+ `/teacher/#/shareMusic?id=${musicDetail.value?.bizId}&recomUserId=${state.user.data?.userId}&userType=${state.platformType}`
|
|
// 判断是否有活动
|
|
// 判断是否有活动
|
|
if (res.data.discount === 1) {
|
|
if (res.data.discount === 1) {
|
|
url += `&activityId=${res.data.activityId}`
|
|
url += `&activityId=${res.data.activityId}`
|
|
@@ -526,18 +569,7 @@ export default defineComponent({
|
|
} catch {}
|
|
} catch {}
|
|
}
|
|
}
|
|
|
|
|
|
- const staffData = reactive({
|
|
|
|
- open: false,
|
|
|
|
- iframeSrc: '',
|
|
|
|
- musicXml: '',
|
|
|
|
- instrumentName: '',
|
|
|
|
- iframeRef: null as any,
|
|
|
|
- partIndex: 0,
|
|
|
|
- partXmlIndex: 0,
|
|
|
|
- tempPartList: [] as any[],
|
|
|
|
- partList: [] as any[],
|
|
|
|
- xmlPartList: [] as any[]
|
|
|
|
- })
|
|
|
|
|
|
+
|
|
/** 渲染五线谱 */
|
|
/** 渲染五线谱 */
|
|
const sortList = {
|
|
const sortList = {
|
|
长笛: 1,
|
|
长笛: 1,
|
|
@@ -564,76 +596,202 @@ export default defineComponent({
|
|
return list
|
|
return list
|
|
}
|
|
}
|
|
|
|
|
|
- const toDetail = async () => {
|
|
|
|
|
|
+ const getPartNames = async (xmlUrl: string) => {
|
|
|
|
+ const partNames: string[] = [];
|
|
try {
|
|
try {
|
|
- if (musicDetail.value?.xmlFileUrl) {
|
|
|
|
- // 获取文件
|
|
|
|
- const res = await umiRequest.get(musicDetail.value?.xmlFileUrl, {
|
|
|
|
- mode: 'cors'
|
|
|
|
- })
|
|
|
|
- let partNames: string[] = []
|
|
|
|
- const xml: any = new DOMParser().parseFromString(res, 'text/xml')
|
|
|
|
- for (const item of xml.getElementsByTagName('part-name')) {
|
|
|
|
- if (item.textContent) {
|
|
|
|
- partNames.push(item.textContent?.trim())
|
|
|
|
- }
|
|
|
|
|
|
+ const res = await umiRequest.get(xmlUrl, { mode: "cors" });
|
|
|
|
+ const xml: any = new DOMParser().parseFromString(res, "text/xml");
|
|
|
|
+ for (const item of xml.getElementsByTagName("part-name")) {
|
|
|
|
+ if (item.textContent) {
|
|
|
|
+ partNames.push(item.textContent?.trim());
|
|
}
|
|
}
|
|
- partNames = partNames.filter(
|
|
|
|
- (item: any) => !item?.toLocaleUpperCase()?.includes('COMMON')
|
|
|
|
- )
|
|
|
|
- const partList: any = []
|
|
|
|
- for (let j = 0; j < partNames.length; j++) {
|
|
|
|
- partList.push({
|
|
|
|
- name: partNames[j],
|
|
|
|
- value: j
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- staffData.xmlPartList = partList
|
|
|
|
}
|
|
}
|
|
|
|
+ } catch (error) {}
|
|
|
|
+ return partNames;
|
|
|
|
+ };
|
|
|
|
|
|
- // staffData.iframeSrc = `${location.origin}/osmd/index.html`
|
|
|
|
- // staffData.iframeSrc = `${location.origin}${location.pathname}osmd/index.html`
|
|
|
|
- staffData.musicXml = musicDetail.value?.xmlFileUrl || ''
|
|
|
|
- const tempList = musicDetail.value?.background || []
|
|
|
|
- const tempPartList = [] as any
|
|
|
|
- staffData.xmlPartList.forEach((part: any) => {
|
|
|
|
- const item = tempList.find((item: any) => item.track === part.name)
|
|
|
|
- if (item) {
|
|
|
|
- tempPartList.push({
|
|
|
|
- ...item,
|
|
|
|
- index: part.value
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ // 根据当前选中的声部和曲目筛选出对应的声轨
|
|
|
|
+ function filterSoundCodes(musicalInstruments: any) {
|
|
|
|
+ // 老师端,加上乐器id
|
|
|
|
+ const instrumentIds = 1005 // appState.instrumentId || appState.user?.instrumentId || route.query.instrumentId
|
|
|
|
+ if (instrumentIds) {
|
|
|
|
+ const { code } = musicalInstruments.find((item: any) => {
|
|
|
|
+ return instrumentIds == item.id
|
|
|
|
+ }) || {}
|
|
|
|
+ return code
|
|
|
|
+ }
|
|
|
|
+ return null
|
|
|
|
+ }
|
|
|
|
|
|
- staffData.partList = tempPartList
|
|
|
|
- staffData.tempPartList = JSON.parse(JSON.stringify(staffData.partList))
|
|
|
|
- staffData.partList = instrumentSort(staffData.partList)
|
|
|
|
- staffData.partXmlIndex = staffData.partList[0]?.index || 0
|
|
|
|
|
|
+ // 根据当前选中的声部和曲目筛选出对应的声轨
|
|
|
|
+ function filterSoundInfo(musicalInstruments: any) {
|
|
|
|
+ if(musicalInstruments.length <= 0) return null
|
|
|
|
+ // 老师端,加上乐器id
|
|
|
|
+ const instrumentIds = 1005 //appState.instrumentId || appState.user?.instrumentId || route.query.instrumentId
|
|
|
|
+ if (instrumentIds) {
|
|
|
|
+ const item = musicalInstruments.find((item: any) => {
|
|
|
|
+ return instrumentIds == item.musicalInstrumentId && item.audioPlayType == 'PLAY'
|
|
|
|
+ }) || null
|
|
|
|
+ return item
|
|
|
|
+ }
|
|
|
|
+ return null
|
|
|
|
+ }
|
|
|
|
|
|
- staffData.instrumentName =
|
|
|
|
- musicDetail.value?.musicSheetType === 'CONCERT'
|
|
|
|
- ? getInstrumentName(staffData.partList[staffData.partIndex]?.track)
|
|
|
|
- : ''
|
|
|
|
|
|
+ const toDetail = async (row) => {
|
|
|
|
+ const partNames = await getPartNames(row.xmlFileUrl);
|
|
|
|
+ staffData.partNames = partNames;
|
|
|
|
+ let partList = staffData.list || [];
|
|
|
|
+ partList = partList.filter(
|
|
|
|
+ (item: any) => !item.track?.toLocaleUpperCase()?.includes("COMMON")
|
|
|
|
+ );
|
|
|
|
+ partColumns.value = partList.map((item: any, index: number) => {
|
|
|
|
+ const xmlIndex = staffData.partNames.filter((text: string) => text.toLocaleUpperCase() !== "COMMON").findIndex(
|
|
|
|
+ (name: any) => name.trim() === item.track
|
|
|
|
+ );
|
|
|
|
+ const defaultIndex = row.musicSheetType !== "SINGLE" && row.isScoreRender ? index + 1 : index
|
|
|
|
+ return {
|
|
|
|
+ text: getInstrumentName(item.track as string),
|
|
|
|
+ name: getInstrumentName(item.track as string), // true
|
|
|
|
+ track: item.track,
|
|
|
|
+ musicPdfUrl: item.soundMusicPdfUrl,
|
|
|
|
+ xmlIndex,
|
|
|
|
+ value: defaultIndex,
|
|
|
|
+ };
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ staffData.details = row || {};
|
|
|
|
+ staffData.musicXml = staffData.details?.xmlFileUrl;
|
|
|
|
+ staffData.isComberRender = staffData.details?.isScoreRender;
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ let defaultShowStaff
|
|
|
|
+ if(staffData.details?.musicalInstruments) {
|
|
|
|
+ const soundCodes = filterSoundCodes(staffData.details?.musicalInstruments)
|
|
|
|
+ if (soundCodes) {
|
|
|
|
+ const soundCodesArr = soundCodes.split(",").map((code: string) => {
|
|
|
|
+ return code
|
|
|
|
+ .toLowerCase()
|
|
|
|
+ .replace(/^\d+|\d+$/g, "")
|
|
|
|
+ .trim()
|
|
|
|
+ })
|
|
|
|
+ defaultShowStaff = partColumns.value.find((item: any) =>
|
|
|
|
+ soundCodesArr.includes(
|
|
|
|
+ item.track &&
|
|
|
|
+ item.track
|
|
|
|
+ .toLowerCase()
|
|
|
|
+ .replace(/^\d+|\d+$/g, "")
|
|
|
|
+ .trim()
|
|
|
|
+ )
|
|
|
|
+ )
|
|
|
|
+ if(defaultShowStaff) {
|
|
|
|
+ staffData.selectedPartIndex = defaultShowStaff.value
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
|
|
- if (musicDetail.value?.musicSheetType === 'SINGLE') {
|
|
|
|
- musicPdfUrl.value = musicDetail.value?.musicPdfUrl
|
|
|
|
|
|
+ if (row.musicSheetType === "SINGLE") {
|
|
|
|
+ staffData.musicPdfUrl = row.musicPdfUrl;
|
|
|
|
+ // 生成的图片
|
|
|
|
+ // staffData.imgs = row.musicImg ? row.musicImg.split(',') : [];
|
|
|
|
+ } else {
|
|
|
|
+ // 初始化数据
|
|
|
|
+ // 是否显示总谱
|
|
|
|
+ if (staffData.isComberRender) {
|
|
|
|
+ partColumns.value.unshift({
|
|
|
|
+ text: "总谱",
|
|
|
|
+ value: 0,
|
|
|
|
+ xmlIndex: 999,
|
|
|
|
+ track: "",
|
|
|
|
+ name: "总谱",
|
|
|
|
+ });
|
|
|
|
+ // 如果是总谱则默认选中,否则选择
|
|
|
|
+ console.log(defaultShowStaff, 'defaultShowStaff')
|
|
|
|
+ staffData.selectedPartIndex = row.defaultScoreRender? 0 : defaultShowStaff ? defaultShowStaff.value : 1
|
|
|
|
+ if(row.defaultScoreRender) {
|
|
|
|
+ staffData.musicPdfUrl = row.musicPdfUrl;
|
|
} else {
|
|
} else {
|
|
- musicPdfUrl.value = staffData.partList[0]?.musicPdfUrl
|
|
|
|
|
|
+ staffData.musicPdfUrl = defaultShowStaff.musicPdfUrl;
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ const item = partColumns.value.find((item: any) => item.value === staffData.selectedPartIndex)
|
|
|
|
+ console.log(item, partColumns.value, staffData.selectedPartIndex, 'selectedPartIndex')
|
|
|
|
+ if (item) {
|
|
|
|
+ staffData.musicPdfUrl = item.musicPdfUrl;
|
|
|
|
+ } else {
|
|
|
|
+ staffData.musicPdfUrl = "";
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // 通过isScoreRender判断是否合并渲染
|
|
|
|
+ // 多声轨, 不是单声部多声轨, 不是老师布置作业选择曲谱
|
|
|
|
+ if (row.musicSheetType === "SINGLE") {
|
|
|
|
+ staffData.isConcert = false;
|
|
|
|
+ const musicSheetSoundList = staffData.details?.musicSheetSoundList || []
|
|
|
|
+ const songs = filterSoundInfo(musicSheetSoundList)
|
|
|
|
+ if(songs) {
|
|
|
|
+ staffData.metronomeMp3Url = songs.audioFileUrl
|
|
|
|
+ } else {
|
|
|
|
+ // 为了处理节奏练习
|
|
|
|
+ if(musicSheetSoundList.length > 0) {
|
|
|
|
+ console.log(musicSheetSoundList, 'musicSheetSoundList')
|
|
|
|
+ staffData.metronomeMp3Url = musicSheetSoundList[0].audioFileUrl
|
|
}
|
|
}
|
|
- } catch (error) {
|
|
|
|
- //
|
|
|
|
- console.log(error, 'error')
|
|
|
|
}
|
|
}
|
|
|
|
+ } else {
|
|
|
|
+ staffData.isConcert = true;
|
|
|
|
+ const { audioFileUrl } = row.musicSheetAccompanimentList.find((item: any) => item.audioPlayType == 'PLAY')
|
|
|
|
+ staffData.metronomeUrl = audioFileUrl
|
|
}
|
|
}
|
|
|
|
+ }
|
|
|
|
|
|
|
|
+
|
|
|
|
+ const getPreViewCloud = (musicId: string, partIndex: number) => {
|
|
|
|
+ const Authorization = sessionStorage.getItem("Authorization") || "";
|
|
|
|
+ const musicScorePath = "/klx-music-score/";
|
|
|
|
+ const musicScoreUrl = getHttpOrigin() + musicScorePath;
|
|
|
|
+ // const musicScoreUrl = "https://test.gym.lexiaoya.cn" + musicScorePath;
|
|
|
|
+ // const musicScoreUrl = 'http://192.168.3.68:3000/instrument.html';
|
|
|
|
+ let href = `${musicScoreUrl}?t=${Date.now()}#/?id=${musicId}&Authorization=${Authorization}&part-index=${partIndex}&isPreView=true&zoom=0.5&downPng=A4`;
|
|
|
|
+ // // 老师端加上systemType=teacher
|
|
|
|
+ const browserInfo = browser()
|
|
|
|
+ href += ('&systemType=' +( browserInfo.isStudent ? `student` : 'teacher'));
|
|
|
|
+ // if (location.pathname.includes("accompany-teacher")) {
|
|
|
|
+ // href += `&systemType=teacher`;
|
|
|
|
+ // }
|
|
|
|
+ return href
|
|
|
|
+
|
|
|
|
+ };
|
|
const renderStaff = async () => {
|
|
const renderStaff = async () => {
|
|
|
|
+ // try {
|
|
|
|
+ // if (staffData.musicPdfUrl) {
|
|
|
|
+ // // staffData.iframeSrc =
|
|
|
|
+ // // "/pdf/web/viewer.html?file=" +
|
|
|
|
+ // // encodeURIComponent(staffData.musicPdfUrl);
|
|
|
|
+ // // https://cdn.oss.dayaedu.com/daya202409/UOFW4q5.pdf
|
|
|
|
+ // // https://cdn.oss.dayaedu.com/daya202409/UOFVK2A.pdf
|
|
|
|
+ // // https://cdn.oss.dayaedu.com/daya202409/UODQffO.pdf
|
|
|
|
+
|
|
|
|
+ // staffData.iframeSrc = `${getHttpOrigin()}${
|
|
|
|
+ // location.pathname
|
|
|
|
+ // }pdf/web/viewer.html?file=${encodeURIComponent(
|
|
|
|
+ // staffData.musicPdfUrl
|
|
|
|
+ // )}`;
|
|
|
|
+ // } else {
|
|
|
|
+ // staffData.iframeSrc = getPreViewCloud(
|
|
|
|
+ // staffData.musicId,
|
|
|
|
+ // currentColumn.value.xmlIndex
|
|
|
|
+ // );
|
|
|
|
+ // // staffData.iframeSrc = `/osmd/index.html`;
|
|
|
|
+ // // staffData.iframeSrc = `${getHttpOrigin()}${location.pathname}osmd/index.html`;
|
|
|
|
+ // }
|
|
|
|
+ // } catch (error) {
|
|
|
|
+ // //
|
|
|
|
+ // }
|
|
try {
|
|
try {
|
|
nextTick(() => {
|
|
nextTick(() => {
|
|
if (musicPdfUrl.value) {
|
|
if (musicPdfUrl.value) {
|
|
- // const url = `${location.origin}/pdf/web/viewer-pdf.html?file=${encodeURIComponent(
|
|
|
|
- // musicPdfUrl.value
|
|
|
|
- // )}&t=${Date.now()}`
|
|
|
|
const url = `${location.origin}${
|
|
const url = `${location.origin}${
|
|
location.pathname
|
|
location.pathname
|
|
}pdf/web/viewer-pdf.html?file=${encodeURIComponent(
|
|
}pdf/web/viewer-pdf.html?file=${encodeURIComponent(
|
|
@@ -644,16 +802,23 @@ 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}${
|
|
|
|
- location.pathname
|
|
|
|
- }osmd/index.html?t=${new Date().getTime()}`
|
|
|
|
- // const url = `${location.origin}/osmd/index.html`
|
|
|
|
|
|
+ // const url = `${location.origin}${
|
|
|
|
+ // location.pathname
|
|
|
|
+ // }osmd/index.html?t=${new Date().getTime()}`
|
|
|
|
+ // // const url = `${location.origin}/osmd/index.html`
|
|
|
|
|
|
- const iframeRef = document.querySelector('#staffIframeRef') as any
|
|
|
|
- iframeRef.contentWindow.location.replace(
|
|
|
|
- `${location.origin}${location.pathname}osmd/index.html`
|
|
|
|
- )
|
|
|
|
- staffData.iframeSrc = url
|
|
|
|
|
|
+ // const iframeRef = document.querySelector('#staffIframeRef') as any
|
|
|
|
+ // iframeRef.contentWindow.location.replace(
|
|
|
|
+ // `${location.origin}${location.pathname}osmd/index.html`
|
|
|
|
+ // )
|
|
|
|
+ // staffData.iframeSrc = url
|
|
|
|
+
|
|
|
|
+ staffData.iframeSrc = getPreViewCloud(
|
|
|
|
+ // staffData.musicId,
|
|
|
|
+ // currentColumn.value.xmlIndex
|
|
|
|
+ // );
|
|
|
|
+ // // staffData.iframeSrc = `/osmd/index.html`;
|
|
|
|
+ // // staffData.iframeSrc = `${getHttpOrigin()}${location.pathname}osmd/index.html`;
|
|
}
|
|
}
|
|
})
|
|
})
|
|
} catch (error) {
|
|
} catch (error) {
|
|
@@ -712,24 +877,24 @@ export default defineComponent({
|
|
iframeRef.contentWindow.resetRenderPage(type, currentXml)
|
|
iframeRef.contentWindow.resetRenderPage(type, currentXml)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- const partColumns = computed(() => {
|
|
|
|
- return staffData.partList.map((item: any, index: number) => {
|
|
|
|
- const instrumentName =
|
|
|
|
- musicDetail.value?.musicSheetType === 'CONCERT'
|
|
|
|
- ? getInstrumentName(item.track)
|
|
|
|
- : ''
|
|
|
|
- return {
|
|
|
|
- text: item.track + (instrumentName ? `(${instrumentName})` : ''),
|
|
|
|
- value: index,
|
|
|
|
- instrumentName,
|
|
|
|
- musicPdfUrl: item.musicPdfUrl,
|
|
|
|
- firstPdfUrl: item.firstPdfUrl,
|
|
|
|
- jianPdfUrl: item.jianPdfUrl,
|
|
|
|
- xmlValue: item.index,
|
|
|
|
- track: item.track
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- })
|
|
|
|
|
|
+ // const partColumns = computed(() => {
|
|
|
|
+ // return staffData.partList.map((item: any, index: number) => {
|
|
|
|
+ // const instrumentName =
|
|
|
|
+ // musicDetail.value?.musicSheetType === 'CONCERT'
|
|
|
|
+ // ? getInstrumentName(item.track)
|
|
|
|
+ // : ''
|
|
|
|
+ // return {
|
|
|
|
+ // text: item.track + (instrumentName ? `(${instrumentName})` : ''),
|
|
|
|
+ // value: index,
|
|
|
|
+ // instrumentName,
|
|
|
|
+ // musicPdfUrl: item.musicPdfUrl,
|
|
|
|
+ // firstPdfUrl: item.firstPdfUrl,
|
|
|
|
+ // jianPdfUrl: item.jianPdfUrl,
|
|
|
|
+ // xmlValue: item.index,
|
|
|
|
+ // track: item.track
|
|
|
|
+ // }
|
|
|
|
+ // })
|
|
|
|
+ // })
|
|
return () => {
|
|
return () => {
|
|
return (
|
|
return (
|
|
<div class={styles.detail}>
|
|
<div class={styles.detail}>
|
|
@@ -741,7 +906,7 @@ export default defineComponent({
|
|
border={false}
|
|
border={false}
|
|
isFixed={false}
|
|
isFixed={false}
|
|
color="#fff"
|
|
color="#fff"
|
|
- title={musicDetail.value?.musicSheetName}
|
|
|
|
|
|
+ title={musicDetail.value?.name}
|
|
backIconColor="white"
|
|
backIconColor="white"
|
|
v-slots={{
|
|
v-slots={{
|
|
right: () => (
|
|
right: () => (
|
|
@@ -761,7 +926,7 @@ export default defineComponent({
|
|
</div>
|
|
</div>
|
|
</ColSticky>
|
|
</ColSticky>
|
|
|
|
|
|
- <img class={styles.bgImg} src={musicDetail.value?.titleImg} />
|
|
|
|
|
|
+ <img class={styles.bgImg} src={musicDetail.value?.musicCover} />
|
|
<div class={styles.bgContent}></div>
|
|
<div class={styles.bgContent}></div>
|
|
<div
|
|
<div
|
|
class={styles.musicContainer}
|
|
class={styles.musicContainer}
|
|
@@ -779,7 +944,7 @@ export default defineComponent({
|
|
icon: () => (
|
|
icon: () => (
|
|
<Image
|
|
<Image
|
|
class={styles.pImg}
|
|
class={styles.pImg}
|
|
- src={musicDetail.value?.titleImg}
|
|
|
|
|
|
+ src={musicDetail.value?.musicCover}
|
|
/>
|
|
/>
|
|
),
|
|
),
|
|
title: () => (
|
|
title: () => (
|
|
@@ -788,7 +953,7 @@ export default defineComponent({
|
|
class="van-ellipsis"
|
|
class="van-ellipsis"
|
|
// onClick={() => handleGotoMusicScore(musicDetail.value)}
|
|
// onClick={() => handleGotoMusicScore(musicDetail.value)}
|
|
>
|
|
>
|
|
- {musicDetail.value?.musicSheetName}
|
|
|
|
|
|
+ {musicDetail.value?.name}
|
|
</h4>
|
|
</h4>
|
|
<p
|
|
<p
|
|
style={{
|
|
style={{
|
|
@@ -910,7 +1075,7 @@ export default defineComponent({
|
|
router.push({
|
|
router.push({
|
|
path: '/look-album-list',
|
|
path: '/look-album-list',
|
|
query: {
|
|
query: {
|
|
- id: musicDetail.value?.id,
|
|
|
|
|
|
+ id: musicDetail.value?.bizId,
|
|
musicSubject: musicDetail.value?.musicSubject
|
|
musicSubject: musicDetail.value?.musicSubject
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -976,7 +1141,7 @@ export default defineComponent({
|
|
onClick={() => {
|
|
onClick={() => {
|
|
if (musicPdfUrl.value) {
|
|
if (musicPdfUrl.value) {
|
|
const songName =
|
|
const songName =
|
|
- musicDetail.value?.musicSheetName +
|
|
|
|
|
|
+ musicDetail.value?.name +
|
|
(staffData.instrumentName
|
|
(staffData.instrumentName
|
|
? `(${staffData.instrumentName})`
|
|
? `(${staffData.instrumentName})`
|
|
: '')
|
|
: '')
|
|
@@ -1003,7 +1168,72 @@ export default defineComponent({
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class={styles.musicContent}>
|
|
<div class={styles.musicContent}>
|
|
- {musicDetail.value?.musicSheetType === 'CONCERT' ||
|
|
|
|
|
|
+ {staffData.details.id ? (
|
|
|
|
+ <>
|
|
|
|
+ {staffData.musicPdfUrl ? (
|
|
|
|
+ <>
|
|
|
|
+ {loading.value && (
|
|
|
|
+ <>
|
|
|
|
+ <Vue3Lottie
|
|
|
|
+ animationData={AstronautJSON}
|
|
|
|
+ class={styles.finch}
|
|
|
|
+ ></Vue3Lottie>
|
|
|
|
+ <p class={styles.finchLoad}>加载中...</p>
|
|
|
|
+ </>
|
|
|
|
+ )}
|
|
|
|
+ <iframe
|
|
|
|
+ style={{
|
|
|
|
+ opacity: loading.value ? 0 : 1,
|
|
|
|
+ }}
|
|
|
|
+ id="staffIframeRef"
|
|
|
|
+ src={staffData.iframeSrc}
|
|
|
|
+ onLoad={() => {
|
|
|
|
+ // 判断是用哪个渲染的
|
|
|
|
+ loading.value = false;
|
|
|
|
+ }}
|
|
|
|
+ ></iframe>
|
|
|
|
+ </>
|
|
|
|
+ ) : (
|
|
|
|
+ <>
|
|
|
|
+ <p class={styles.musicTitle}>
|
|
|
|
+ {staffData.details?.name && (
|
|
|
|
+ <>
|
|
|
|
+ {staffData.details?.name}
|
|
|
|
+ {/* {staffData.isConcert &&
|
|
|
|
+ currentColumn.value?.name
|
|
|
|
+ ? `(${
|
|
|
|
+ currentColumn.value
|
|
|
|
+ ?.name || ""
|
|
|
|
+ })`
|
|
|
|
+ : ""} */}
|
|
|
|
+ </>
|
|
|
|
+ )}
|
|
|
|
+ </p>
|
|
|
|
+ {loading.value && (
|
|
|
|
+ <>
|
|
|
|
+ <Vue3Lottie
|
|
|
|
+ animationData={AstronautJSON}
|
|
|
|
+ class={styles.finch}
|
|
|
|
+ ></Vue3Lottie>
|
|
|
|
+ <p class={styles.finchLoad}>加载中...</p>
|
|
|
|
+ </>
|
|
|
|
+ )}
|
|
|
|
+ <iframe
|
|
|
|
+ id="staffIframeRef"
|
|
|
|
+ style={{
|
|
|
|
+ opacity: loading.value ? 0 : 1,
|
|
|
|
+ }}
|
|
|
|
+ src={staffData.iframeSrc}
|
|
|
|
+ onLoad={() => {
|
|
|
|
+ loading.value = false;
|
|
|
|
+ // musicIframeLoad();
|
|
|
|
+ }}
|
|
|
|
+ ></iframe>
|
|
|
|
+ </>
|
|
|
|
+ )}
|
|
|
|
+ </>
|
|
|
|
+ ) : null}
|
|
|
|
+ {/* {musicDetail.value?.musicSheetType === 'CONCERT' ||
|
|
musicPdfUrl.value ||
|
|
musicPdfUrl.value ||
|
|
!defaultImgs.value[staff.radio] ? (
|
|
!defaultImgs.value[staff.radio] ? (
|
|
<>
|
|
<>
|
|
@@ -1022,8 +1252,8 @@ export default defineComponent({
|
|
) : (
|
|
) : (
|
|
<>
|
|
<>
|
|
<p class={styles.musicTitle}>
|
|
<p class={styles.musicTitle}>
|
|
- {(musicDetail.value?.musicSheetName
|
|
|
|
- ? musicDetail.value?.musicSheetName
|
|
|
|
|
|
+ {(musicDetail.value?.name
|
|
|
|
+ ? musicDetail.value?.name
|
|
: '') +
|
|
: '') +
|
|
(staffData.instrumentName
|
|
(staffData.instrumentName
|
|
? `(${staffData.instrumentName})`
|
|
? `(${staffData.instrumentName})`
|
|
@@ -1035,7 +1265,6 @@ export default defineComponent({
|
|
animationData={AstronautJSON}
|
|
animationData={AstronautJSON}
|
|
class={styles.finch}
|
|
class={styles.finch}
|
|
></Vue3Lottie>
|
|
></Vue3Lottie>
|
|
- {/* <p class={styles.finchLoad}>加载中...</p> */}
|
|
|
|
</div>
|
|
</div>
|
|
)}
|
|
)}
|
|
<iframe
|
|
<iframe
|
|
@@ -1052,35 +1281,10 @@ export default defineComponent({
|
|
)}
|
|
)}
|
|
</>
|
|
</>
|
|
) : (
|
|
) : (
|
|
- // <>
|
|
|
|
- // {loading.value && (
|
|
|
|
- // <>
|
|
|
|
- // <Vue3Lottie
|
|
|
|
- // animationData={AstronautJSON}
|
|
|
|
- // class={styles.finch}
|
|
|
|
- // ></Vue3Lottie>
|
|
|
|
- // <p class={styles.finchLoad}>加载中...</p>
|
|
|
|
- // </>
|
|
|
|
- // )}
|
|
|
|
- // <iframe
|
|
|
|
- // id="staffIframeRef"
|
|
|
|
- // style={{
|
|
|
|
- // opacity: loading.value ? 0 : 1
|
|
|
|
- // }}
|
|
|
|
- // src={staffData.iframeSrc}
|
|
|
|
- // onLoad={() => {
|
|
|
|
- // if (!defaultImgs.value[staff.radio]) {
|
|
|
|
- // onChangeStaff(staff.radio)
|
|
|
|
- // } else {
|
|
|
|
- // musicIframeLoad()
|
|
|
|
- // }
|
|
|
|
- // }}
|
|
|
|
- // ></iframe>
|
|
|
|
- // </>
|
|
|
|
<>
|
|
<>
|
|
<p class={styles.musicTitle}>
|
|
<p class={styles.musicTitle}>
|
|
- {(musicDetail.value?.musicSheetName
|
|
|
|
- ? musicDetail.value?.musicSheetName
|
|
|
|
|
|
+ {(musicDetail.value?.name
|
|
|
|
+ ? musicDetail.value?.name
|
|
: '') +
|
|
: '') +
|
|
(staffData.instrumentName
|
|
(staffData.instrumentName
|
|
? `(${staffData.instrumentName})`
|
|
? `(${staffData.instrumentName})`
|
|
@@ -1105,11 +1309,11 @@ export default defineComponent({
|
|
</div>
|
|
</div>
|
|
)}
|
|
)}
|
|
</>
|
|
</>
|
|
- )}
|
|
|
|
|
|
+ )} */}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- {musicDetail.value?.id && (
|
|
|
|
|
|
+ {musicDetail.value?.bizId && (
|
|
<ColSticky
|
|
<ColSticky
|
|
position="bottom"
|
|
position="bottom"
|
|
background="white"
|
|
background="white"
|
|
@@ -1151,9 +1355,6 @@ export default defineComponent({
|
|
const item: any = partColumns.value.find(
|
|
const item: any = partColumns.value.find(
|
|
(c: any) => c.value === staffData.partIndex
|
|
(c: any) => c.value === staffData.partIndex
|
|
)
|
|
)
|
|
- // const index = staffData.tempPartList.findIndex(
|
|
|
|
- // (i: any) => i.track === item?.track
|
|
|
|
- // )
|
|
|
|
// 新版云教练的谱面类型使用musicRenderType字段
|
|
// 新版云教练的谱面类型使用musicRenderType字段
|
|
const musicRenderType = staff.radio === 'staff' ? 'staff' : staff.radio === 'first' ? 'firstTone' : staff.radio === 'fixed' ? 'fixedTone' : '';
|
|
const musicRenderType = staff.radio === 'staff' ? 'staff' : staff.radio === 'first' ? 'firstTone' : staff.radio === 'fixed' ? 'fixedTone' : '';
|
|
let extraParam: any = {
|
|
let extraParam: any = {
|
|
@@ -1245,11 +1446,11 @@ export default defineComponent({
|
|
<img
|
|
<img
|
|
class={styles.icon}
|
|
class={styles.icon}
|
|
crossorigin="anonymous"
|
|
crossorigin="anonymous"
|
|
- src={musicDetail.value?.titleImg + `?t=${+new Date()}`}
|
|
|
|
|
|
+ src={musicDetail.value?.musicCover}
|
|
/>
|
|
/>
|
|
<div class={styles.info}>
|
|
<div class={styles.info}>
|
|
<h4 class="van-multi-ellipsis--l2">
|
|
<h4 class="van-multi-ellipsis--l2">
|
|
- {musicDetail.value?.musicSheetName}
|
|
|
|
|
|
+ {musicDetail.value?.name}
|
|
</h4>
|
|
</h4>
|
|
<p>作曲人:{musicDetail.value?.composer}</p>
|
|
<p>作曲人:{musicDetail.value?.composer}</p>
|
|
</div>
|
|
</div>
|
|
@@ -1261,8 +1462,8 @@ export default defineComponent({
|
|
{downloadStatus.value && (
|
|
{downloadStatus.value && (
|
|
<Download
|
|
<Download
|
|
imgList={JSON.parse(JSON.stringify(showImg.value))}
|
|
imgList={JSON.parse(JSON.stringify(showImg.value))}
|
|
- musicSheetName={
|
|
|
|
- musicDetail.value?.musicSheetName +
|
|
|
|
|
|
+ name={
|
|
|
|
+ musicDetail.value?.name +
|
|
(staffData.instrumentName
|
|
(staffData.instrumentName
|
|
? `(${staffData.instrumentName})`
|
|
? `(${staffData.instrumentName})`
|
|
: '')
|
|
: '')
|