fix: bugs

This commit is contained in:
qier222 2021-04-12 14:12:15 +08:00
parent 872fd73b05
commit 4f4f2b09e3
No known key found for this signature in database
GPG key ID: 9C85007ED905F14D
9 changed files with 85 additions and 29 deletions

View file

@ -13,6 +13,23 @@ import * as Sentry from "@sentry/browser";
import { Vue as VueIntegration } from "@sentry/integrations";
import { Integrations } from "@sentry/tracing";
window.resetApp = () => {
localStorage.clear();
indexedDB.deleteDatabase("yesplaymusic");
document.cookie.split(";").forEach(function (c) {
document.cookie = c
.replace(/^ +/, "")
.replace(/=.*/, "=;expires=" + new Date().toUTCString() + ";path=/");
});
return "已重置应用请刷新页面按Ctrl/Command + R";
};
console.log(
"如出现问题,可尝试在本页输入 %cresetApp()%c 然后按回车重置应用。",
"background: #eaeffd;color:#335eea;padding: 4px 6px;border-radius:3px;",
"background:unset;color:unset;"
);
Vue.use(VueAnalytics, {
id: "UA-180189423-1",
router,