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