Add Analytics

Fix an error statement
This commit is contained in:
MengYX
2019-09-14 20:43:57 +08:00
parent 91f91ce0c9
commit 3e3a98142b
4 changed files with 22 additions and 9 deletions

View File

@@ -140,11 +140,21 @@
title: '解锁成功',
message: '成功解锁 ' + data.title
});
let _rp_data = {
original: data.original,
title: data.title,
album: data.album,
artist: data.artist,
mime: data.mime
};
console.log(data);
_paq.push(["trackEvent", "Unlock", "Success", JSON.stringify(_rp_data)]);
} else {
this.$notify.error({
title: '错误',
message: '不支持此文件类型'
message: '解析此文件时出现问题'
});
_paq.push(["trackEvent", "Unlock", "Error", file.name]);
}
@@ -190,7 +200,6 @@
}
}
</script>
<style>

View File

@@ -172,13 +172,12 @@ async function Decrypt(file) {
const musicUrl = URL.createObjectURL(musicData);
const filename = artists.join(" & ") + " - " + musicMeta.musicName + "." + musicMeta.format;
return {
meta: musicMeta,
file: musicUrl,
picture: musicMeta.albumPic,
title: musicMeta.musicName,
album: musicMeta.album,
artist: artists.join(" & "),
filename: filename,
title: musicMeta.musicName,
artist: artists.join(" & "),
album: musicMeta.album,
picture: musicMeta.albumPic,
file: musicUrl,
mime: mime
};
}

View File

@@ -78,8 +78,8 @@ async function Decrypt(file) {
title: title,
artist: artist,
album: tag.common.album,
file: musicUrl,
picture: pic_url,
file: musicUrl,
mime: mime
}
}