YesPlayMusic/src/main.js
2021-04-19 11:33:38 +08:00

43 lines
1.1 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import Vue from "vue";
import VueAnalytics from "vue-analytics";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import i18n from "@/locale";
import "@/assets/icons";
import "@/utils/filters";
import "./registerServiceWorker";
import { dailyTask } from "@/utils/common";
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,
});
Vue.config.productionTip = false;
dailyTask();
new Vue({
i18n,
store,
router,
render: (h) => h(App),
}).$mount("#app");