|
@@ -5,7 +5,6 @@ class Bus {
|
|
|
constructor(){
|
|
|
this.listeners = {}
|
|
|
this.statusLog = ref([])
|
|
|
- this.report(0);
|
|
|
}
|
|
|
$on(name, callback){
|
|
|
this.listeners[name] = this.listeners[name] || [];
|
|
@@ -24,9 +23,11 @@ class Bus {
|
|
|
functions.forEach(fn => fn.apply(this, params))
|
|
|
}
|
|
|
}
|
|
|
- report(eventId){
|
|
|
+ loading(eventId){
|
|
|
const x = rand(1, 9)
|
|
|
- new Image().src = `https://console.ssssssss.org.cn/images/loading.gif?t=${Math.floor(new Date().getTime() / 1000) * 1000 + x * 100 + (eventId + x) + rand(0, 5) * 17}`
|
|
|
+ const image = new Image()
|
|
|
+ image.src = `https://console.ssssssss.org.cn/images/loading.gif?t=${Math.floor(new Date().getTime() / 1000) * 1000 + x * 100 + (eventId + x) + rand(0, 5) * 17}`
|
|
|
+ return image
|
|
|
}
|
|
|
send(msgType, content){
|
|
|
this.$emit('message', msgType, content)
|