|
@@ -67,6 +67,8 @@ export default defineComponent({
|
|
|
showPlayer: false
|
|
|
});
|
|
|
const showGuide = ref(false);
|
|
|
+ const userStore = useUserStore();
|
|
|
+ let musicsrc = ''
|
|
|
const getSubjects = async () => {
|
|
|
const res = await api_subjectList();
|
|
|
if (Array.isArray(res?.data)) {
|
|
@@ -151,6 +153,18 @@ export default defineComponent({
|
|
|
};
|
|
|
/** 选中的item */
|
|
|
const activeItem = computed(() => {
|
|
|
+
|
|
|
+ if (data.list[data.listActive]) {
|
|
|
+ const origin = /(localhost|192)/.test(location.host)
|
|
|
+ ? 'https://dev.kt.colexiu.com'
|
|
|
+ : location.origin;
|
|
|
+ console.log(data.list[data.listActive].xmlFileUrl, 'data.list[data.listActive]')
|
|
|
+ musicsrc = `${origin}/instrument?modelType=practise&id=${data.list[data.listActive].xmlFileUrl}&Authorization=${userStore.getToken}/#/preview`;
|
|
|
+
|
|
|
+ } else {
|
|
|
+ musicsrc = ''
|
|
|
+ }
|
|
|
+
|
|
|
return data.list[data.listActive] || {};
|
|
|
});
|
|
|
|
|
@@ -287,7 +301,7 @@ export default defineComponent({
|
|
|
<PlayLoading
|
|
|
class={[
|
|
|
data.listActive === index &&
|
|
|
- data.playState === 'play'
|
|
|
+ data.playState === 'play'
|
|
|
? ''
|
|
|
: styles.showPlayLoading
|
|
|
]}
|
|
@@ -315,7 +329,7 @@ export default defineComponent({
|
|
|
<img
|
|
|
src={
|
|
|
data.listActive === index &&
|
|
|
- data.playState === 'play'
|
|
|
+ data.playState === 'play'
|
|
|
? icon_pause
|
|
|
: icon_play
|
|
|
}
|
|
@@ -336,7 +350,7 @@ export default defineComponent({
|
|
|
<img
|
|
|
src={
|
|
|
data.listActive === index &&
|
|
|
- data.playState === 'play'
|
|
|
+ data.playState === 'play'
|
|
|
? icon_pause
|
|
|
: icon_play
|
|
|
}
|
|
@@ -398,7 +412,7 @@ export default defineComponent({
|
|
|
<div class={styles.staffImgs}>
|
|
|
<TransitionGroup name="van-fade">
|
|
|
{activeItem.value?.musicSvg ||
|
|
|
- activeItem.value?.musicImg ? (
|
|
|
+ activeItem.value?.musicImg ? (
|
|
|
(activeItem.value?.musicSvg || activeItem.value?.musicImg)
|
|
|
?.split(',')
|
|
|
.map((item, index) => {
|