|
@@ -16,13 +16,14 @@
|
16
|
16
|
<span>{{user.words}}</span>
|
17
|
17
|
</li>
|
18
|
18
|
</ul> -->
|
19
|
|
- <div v-if="audios" :hidden="true">
|
|
19
|
+ <!-- 不需要语言了 -->
|
|
20
|
+ <!-- <div v-if="audios" :hidden="true">
|
20
|
21
|
<div v-for="(audio, k) in audios" :key="k+'audio'">
|
21
|
22
|
<audio v-if="audio.isShow" @ended="audioEnd(k)" autoplay>
|
22
|
23
|
<source :src="audio.url">
|
23
|
24
|
</audio>
|
24
|
25
|
</div>
|
25
|
|
- </div>
|
|
26
|
+ </div> -->
|
26
|
27
|
</div>
|
27
|
28
|
</div>
|
28
|
29
|
</div>
|
|
@@ -116,11 +117,12 @@ export default {
|
116
|
117
|
const inx = this.users.findIndex(i => i.createdata === x.createdata)
|
117
|
118
|
this.users.splice(inx, 1)
|
118
|
119
|
})
|
119
|
|
- let delaudios = this.audios.filter(x => Date.parse(new Date()) - x.createdata > this.diffM)
|
120
|
|
- delaudios.forEach(x => {
|
121
|
|
- const inx = this.audios.findIndex(i => i.createdata === x.createdata)
|
122
|
|
- this.audios.splice(inx, 1)
|
123
|
|
- })
|
|
120
|
+ // 语音不需要了
|
|
121
|
+ // let delaudios = this.audios.filter(x => Date.parse(new Date()) - x.createdata > this.diffM)
|
|
122
|
+ // delaudios.forEach(x => {
|
|
123
|
+ // const inx = this.audios.findIndex(i => i.createdata === x.createdata)
|
|
124
|
+ // this.audios.splice(inx, 1)
|
|
125
|
+ // })
|
124
|
126
|
}, 100)
|
125
|
127
|
this.ws = new XWebSocket({
|
126
|
128
|
message: this.receviedMsg.bind(this),
|
|
@@ -164,7 +166,7 @@ export default {
|
164
|
166
|
this.users.splice(0, 1)
|
165
|
167
|
}
|
166
|
168
|
this.users = [...this.users, { ...info, createdata: Date.parse(new Date()) }]
|
167
|
|
- this.audios = [...this.audios, { ...info, isShow: true, createdata: Date.parse(new Date()) }]
|
|
169
|
+ // this.audios = [...this.audios, { ...info, isShow: true, createdata: Date.parse(new Date()) }]
|
168
|
170
|
}
|
169
|
171
|
},
|
170
|
172
|
audioEnd (index) {
|
|
@@ -204,7 +206,7 @@ export default {
|
204
|
206
|
init () { // 初始化
|
205
|
207
|
this.emptyWeatherInfo()
|
206
|
208
|
this.getDate()
|
207
|
|
- this.getWeather({ city: this.city })
|
|
209
|
+ // this.getWeather({ city: this.city })
|
208
|
210
|
},
|
209
|
211
|
getDate () { // 获取当前时间
|
210
|
212
|
let currentTime = Date.now()
|