diff --git a/src/App.vue b/src/App.vue
index 0872a22..fa9dbdc 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -6,7 +6,6 @@
-
@@ -35,7 +34,7 @@ onMounted(() => {
// 加载完成事件
window.addEventListener("load", () => {
console.log("加载完成");
- console.clear();
+ // console.clear();
// 去除加载标记
document.getElementsByTagName("body")[0].className = "";
// 给加载动画添加结束标记
@@ -45,11 +44,11 @@ onMounted(() => {
// 监听当前页面宽度
getWidth();
- window.addEventListener("resize", getWidth());
+ window.addEventListener("resize", getWidth);
});
onBeforeUnmount(() => {
- window.removeEventListener("resize", getWidth());
+ window.removeEventListener("resize", getWidth);
});
diff --git a/src/components/Message/index.vue b/src/components/Message/index.vue
index 0c999d2..be6a09a 100644
--- a/src/components/Message/index.vue
+++ b/src/components/Message/index.vue
@@ -28,9 +28,10 @@
+
+
\ No newline at end of file
diff --git a/src/store/index.js b/src/store/index.js
index 3d5ae81..1bda991 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -9,7 +9,7 @@ export const mainStore = defineStore("main", {
coverType: 0, // 壁纸种类
musicIsOk: false, // 音乐是否加载完成
musicOpenState: false, // 音乐面板开启状态
- boxOpenState: false, // 更多页面开启状态
+ boxOpenState: false, // 盒子开启状态
playerState: false, // 当前播放状态
playerTitle: null, // 当前播放歌曲名
playerArtist: null, // 当前播放歌手名
diff --git a/src/style/style.scss b/src/style/style.scss
index 6f52ade..e934b10 100644
--- a/src/style/style.scss
+++ b/src/style/style.scss
@@ -94,6 +94,28 @@ p {
}
}
+// 进度条样式
+.el-progress-bar {
+ .el-progress-bar__outer {
+ border-radius: 6px;
+ background-color: #00000020;
+
+ .el-progress-bar__inner {
+ background-color: #efefef;
+ border-radius: 6px;
+ text-align: center;
+ font-family: 'UnidreamLED';
+
+ span {
+ color: #564d59;
+ font-size: .9rem;
+ }
+
+ }
+ }
+
+}
+
// 渐入动画
.fade-enter-active {
animation: fade 0.3s ease-in-out;
diff --git a/src/utils/getTime.js b/src/utils/getTime.js
index 220609b..264d24d 100644
--- a/src/utils/getTime.js
+++ b/src/utils/getTime.js
@@ -1,3 +1,4 @@
+// 时钟
export const getCurrentTime = () => {
let time = new Date();
let year = time.getFullYear();
@@ -14,7 +15,45 @@ export const getCurrentTime = () => {
hour,
minute,
second,
- weekday:weekday[time.getDay()],
+ weekday: weekday[time.getDay()],
}
return currentTime;
+}
+
+// 时光胶囊
+export const getTimeCapsule = () => {
+ // 日进度
+ let todayStartDate = new Date(new Date().toLocaleDateString()).getTime();
+ let todayPassHours = (new Date() - todayStartDate) / 1000 / 60 / 60;
+ let todayPassHoursPercent = (todayPassHours / 24) * 100;
+ // 周进度
+ let weeks = [7, 1, 2, 3, 4, 5, 6];
+ let weekDay = weeks[new Date().getDay()];
+ let weekDayPassPercent = (weekDay / 7) * 100;
+ // 月进度
+ let year = new Date().getFullYear();
+ let date = new Date().getDate();
+ let month = new Date().getMonth() + 1;
+ let monthAll = new Date(year, month, 0).getDate();
+ let monthPassPercent = (date / monthAll) * 100;
+ // 年进度
+ let yearPass = (month / 12) * 100;
+ return {
+ day: {
+ start: parseInt(todayPassHours),
+ pass: parseInt(todayPassHoursPercent),
+ },
+ week: {
+ start: weekDay,
+ pass: parseInt(weekDayPassPercent),
+ },
+ month: {
+ start: date,
+ pass: parseInt(monthPassPercent),
+ },
+ year: {
+ start: month == 0 ? month : month - 1,
+ pass: parseInt(yearPass),
+ }
+ }
}
\ No newline at end of file
diff --git a/src/views/Box/index.vue b/src/views/Box/index.vue
index 17348f3..fc5c31f 100644
--- a/src/views/Box/index.vue
+++ b/src/views/Box/index.vue
@@ -14,17 +14,31 @@
@click="store.boxOpenState = false"
/>
- 6666
+
+
+
\ No newline at end of file
diff --git a/src/views/Func/index.vue b/src/views/Func/index.vue
index bae6d41..032c668 100644
--- a/src/views/Func/index.vue
+++ b/src/views/Func/index.vue
@@ -34,7 +34,7 @@