|
@@ -1,5 +1,6 @@
|
|
|
import { defineComponent, ref, nextTick } from 'vue'
|
|
|
import styles from './musicScore.module.less'
|
|
|
+import qs from 'query-string'
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: 'musicScore',
|
|
@@ -7,27 +8,23 @@ export default defineComponent({
|
|
|
music: {
|
|
|
type: Object,
|
|
|
default: () => {}
|
|
|
- },
|
|
|
+ }
|
|
|
},
|
|
|
setup(props, {}) {
|
|
|
const Authorization = sessionStorage.getItem('Authorization') || ''
|
|
|
- const dev = /(localhost|192)/.test(location.host)
|
|
|
- console.log(dev, 'https://ponline.colexiu.com')
|
|
|
- let src = `${dev ? `http://192.168.3.114:3000` : location.origin}/orchestra-music-score/#/?id=${
|
|
|
- props.music.content
|
|
|
- }&Authorization=${Authorization}&modelType=practice`
|
|
|
+ const origin = /(localhost|192)/.test(location.host)
|
|
|
+ ? 'http://192.168.3.114:3000'
|
|
|
+ : location.origin
|
|
|
+ const query = qs.stringify({
|
|
|
+ id: props.music.content,
|
|
|
+ modelType: 'practice',
|
|
|
+ Authorization: Authorization
|
|
|
+ })
|
|
|
+ let src = `${origin}/orchestra-music-score/?` + query
|
|
|
console.log('src', src)
|
|
|
-
|
|
|
return () => (
|
|
|
- <div
|
|
|
- class={styles.musicScore}
|
|
|
- >
|
|
|
- <iframe
|
|
|
- class={[styles.container, 'musicIframe']}
|
|
|
- frameborder="0"
|
|
|
- src={src}
|
|
|
- ></iframe>
|
|
|
- {/* <div class={styles.musicModel}></div> */}
|
|
|
+ <div class={styles.musicScore}>
|
|
|
+ <iframe class={[styles.container, 'musicIframe']} frameborder="0" src={src}></iframe>
|
|
|
</div>
|
|
|
)
|
|
|
}
|