commit | author | age
|
019990
|
1 |
<template> |
f9c38e
|
2 |
<div class="fade"> |
146176
|
3 |
<a-col v-bind="colMain"> |
6461f5
|
4 |
<aplayer ref="myAplayer" :audio="audio" :autoplay="autoplay" fixed style="z-index: 10;" :volume="0.1" |
I |
5 |
:preload="preload" /> |
146176
|
6 |
</a-col> |
7b98c8
|
7 |
|
I |
8 |
<!-- <a-modal ref="musicModal" title="" :dialog-style="{ top: '10px' }" :mask="false" |
|
9 |
:maskClosable="false" :visible="modal1Visible" @ok="() => setModal1Visible(false)" @cancel="() => setModal1Visible(false)"> |
|
10 |
<p>{{secondsToGo}}秒后关闭</p> |
|
11 |
</a-modal> --> |
019990
|
12 |
</div> |
I |
13 |
</template> |
|
14 |
|
|
15 |
<script> |
|
16 |
import APlayer from '@moefe/vue-aplayer'; |
7b98c8
|
17 |
|
019990
|
18 |
export default { |
6461f5
|
19 |
created() { |
I |
20 |
this.$nextTick(function() { |
|
21 |
this.$message.info("stop..") |
|
22 |
this.$refs.myAplayer.pause(); |
|
23 |
}) |
|
24 |
}, |
019990
|
25 |
data() { |
I |
26 |
return { |
ec97e0
|
27 |
colMain: { |
I |
28 |
xs: 0, |
|
29 |
sm: 0, |
|
30 |
md: 1, |
|
31 |
lg: 1, |
|
32 |
xl: 1, |
|
33 |
xxl: 1 |
|
34 |
}, |
146176
|
35 |
autoplay: false, |
7b98c8
|
36 |
modal1Visible: true, |
I |
37 |
secondsToGo: 5, |
|
38 |
preload: "none", |
019990
|
39 |
audio: { |
I |
40 |
name: 'Moonwisher', |
|
41 |
artist: 'Kan R. Gao', |
7b98c8
|
42 |
url: 'http://music.163.com/song/media/outer/url?id=1645104.mp3', |
I |
43 |
// url: '/moon.mp3', |
019990
|
44 |
cover: 'http://p2.music.126.net/0AYWra9rCzgeprGp6OUyUw==/868614185993997.jpg?param=130y130', |
I |
45 |
}, |
|
46 |
}; |
7b98c8
|
47 |
|
I |
48 |
}, |
|
49 |
created() { |
|
50 |
// const interval = setInterval(() => { |
|
51 |
// this.secondsToGo -= 1; |
|
52 |
// }, 1000); |
|
53 |
|
|
54 |
// setTimeout(() => { |
|
55 |
// clearInterval(interval); |
|
56 |
// this.modal1Visible = false |
|
57 |
// }, 5000); |
|
58 |
}, |
|
59 |
methods: { |
|
60 |
setModal1Visible(modal1Visible) { |
|
61 |
|
|
62 |
this.modal1Visible = modal1Visible; |
|
63 |
}, |
019990
|
64 |
}, |
I |
65 |
}; |
|
66 |
// var ap = new APlayer({ |
|
67 |
// element: document.getElementById('player1'), |
|
68 |
// narrow: false, |
|
69 |
// autoplay: false, |
|
70 |
// listFolded:true, |
|
71 |
// audio:[ |
|
72 |
|
|
73 |
// { |
|
74 |
// title: 'Wish My Life Away', |
|
75 |
// author: 'Kan R. Gao / Laura Shigihara', |
|
76 |
// url: 'http://music.163.com/song/media/outer/url?id=529668945.mp3', |
|
77 |
// pic: 'http://p1.music.126.net/2VSSz_JLHtggZqmquFO_tw==/109951163106305809.jpg?param=130y130' |
|
78 |
// }, |
|
79 |
// { |
|
80 |
// title: 'Moonwisher', |
|
81 |
// author: 'Kan R. Gao', |
|
82 |
// url: 'http://music.163.com/song/media/outer/url?id=1645104.mp3', |
|
83 |
// pic: 'http://p2.music.126.net/0AYWra9rCzgeprGp6OUyUw==/868614185993997.jpg?param=130y130' |
|
84 |
// }, |
|
85 |
// { |
|
86 |
// title: 'For River - Piano (Johnny\'s Version)', |
|
87 |
// author: 'Kan R. Gao', |
|
88 |
// url: 'http://music.163.com/song/media/outer/url?id=1645112.mp3', |
|
89 |
// pic: 'http://p2.music.126.net/0AYWra9rCzgeprGp6OUyUw==/868614185993997.jpg?param=130y130' |
|
90 |
// }, |
|
91 |
// { |
|
92 |
// title: '花火が瞬く夜に', |
|
93 |
// author: '羽肿', |
|
94 |
// url: 'http://music.163.com/song/media/outer/url?id=434902428.mp3', |
|
95 |
// pic: 'http://p1.music.126.net/f7Nd9FSzVZMkTPWDW_rnOg==/736672800839982.jpg?param=130y130' |
|
96 |
// } |
|
97 |
// ] |
|
98 |
// }); |
|
99 |
</script> |
|
100 |
|
|
101 |
<style> |
|
102 |
</style> |