张延森 3 gadus atpakaļ
vecāks
revīzija
cd5dc75f8b
2 mainītis faili ar 7 papildinājumiem un 2 dzēšanām
  1. 6
    1
      src/components/BgMusic.vue
  2. 1
    1
      src/pages/Honghe.vue

+ 6
- 1
src/components/BgMusic.vue Parādīt failu

1
 <template>
1
 <template>
2
   <div class="bg-music" :class="{ ['icon-playing']: playing }" @click="handleClick" v-show="show">
2
   <div class="bg-music" :class="{ ['icon-playing']: playing }" @click="handleClick" v-show="show">
3
-    <audio :src="url" ref="audioRef" loop @canplay="show = true" @play="handlePlay"></audio>
3
+    <audio :src="url" ref="audioRef" loop @loadedmetadata="show = true" @play="handlePlay"></audio>
4
   </div>
4
   </div>
5
 </template>
5
 </template>
6
 
6
 
18
   },
18
   },
19
   mounted() {
19
   mounted() {
20
     document.body.addEventListener("click", this.handleClick);
20
     document.body.addEventListener("click", this.handleClick);
21
+
22
+    this.$nextTick(() => {
23
+      this.$refs.audioRef.load()
24
+    })
25
+
21
   },
26
   },
22
   methods: {
27
   methods: {
23
     handleClick() {
28
     handleClick() {

+ 1
- 1
src/pages/Honghe.vue Parādīt failu

253
       this.binggo = false
253
       this.binggo = false
254
     },
254
     },
255
     handleMonthClick(month) {
255
     handleMonthClick(month) {
256
-      if (!this.person || !this.personId) {
256
+      if (!this.person || !this.person.personId) {
257
         alert('为了您能够正常参与抽奖,请刷新页面并同意授权微信昵称!')
257
         alert('为了您能够正常参与抽奖,请刷新页面并同意授权微信昵称!')
258
         return
258
         return
259
       }
259
       }