[go: nahoru, domu]

Skip to content

Commit

Permalink
完善部分页面
Browse files Browse the repository at this point in the history
  • Loading branch information
imsyy committed Feb 28, 2023
1 parent ed384be commit a70c324
Show file tree
Hide file tree
Showing 9 changed files with 866 additions and 793 deletions.
1,094 changes: 554 additions & 540 deletions src/api/index.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/components/DataList/CoverLists.vue
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@ const closeUpdateModel = () => {
// 删除歌单
const toDelPlayList = (data) => {
$dialog.warning({
class: "s-dialog",
title: "删除歌单",
content: "确认删除歌单 " + data.name + "",
positiveText: "删除",
Expand Down
1 change: 1 addition & 0 deletions src/components/DataList/DataLists.vue
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,7 @@ const => {
// 云盘歌曲删除
const delCloudSong = (data) => {
$dialog.warning({
class: "s-dialog",
title: "歌曲删除",
content: "确认从云盘中删除歌曲 " + data.name + "",
positiveText: "删除",
Expand Down
3 changes: 2 additions & 1 deletion src/components/Nav/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ const dropdownSelect = (key) => {
if (user.userLogin) {
// 退出登录
$dialog.warning({
class: "s-dialog",
title: "退出登录",
content: "确认退出当前用户登录?",
positiveText: "退出",
Expand Down Expand Up @@ -467,4 +468,4 @@ nav {
margin-top: 8px;
}
}
</style>
</style>
34 changes: 7 additions & 27 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,31 +23,11 @@ app.use(router);
app.mount("#app");

// PWA
if ("serviceWorker" in navigator) {
console.log("serviceWorker 可用");
navigator.serviceWorker.ready.then((registration) => {
registration.addEventListener("updatefound", () => {
// 新的 Service Worker 可用,准备安装
registration.installing.addEventListener("statechange", () => {
if (registration.installing.state === "installed") {
// Service Worker 已安装,可以更新页面了
if (navigator.serviceWorker.controller) {
// 弹出更新提醒
console.log("站点已更新,刷新后生效");
$message.info("站点已更新,刷新后生效", {
closable: true,
duration: 0,
});
} else {
// Service Worker 已激活,但页面尚未受其控制
console.log("站点已安装,刷新后生效");
// $message.info("站点已安装,刷新后生效", {
// closable: true,
// duration: 0,
// });
}
}
});
});
navigator.serviceWorker.addEventListener("controllerchange", () => {
// 弹出更新提醒
console.log("站点已更新,刷新后生效");
$message.info("站点已更新,刷新后生效", {
closable: true,
duration: 0,
});
}
});
Loading

0 comments on commit a70c324

Please sign in to comment.