Skip to content

Commit

Permalink
pull最新代码
Browse files Browse the repository at this point in the history
  • Loading branch information
lonely-starry committed Aug 4, 2024
1 parent 0921185 commit f83d95f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ VITE_SITE_NAME = "彼岸の星空" # 名称
VITE_SITE_AUTHOR = "lonely" # 作者
VITE_SITE_KEYWORDS = "个人主页" # 关键词
VITE_SITE_DES = "一个默默无闻的主页" # 站点简介
VITE_SITE_URL = "bansky.cc" # 站点地址
VITE_SITE_URL = "lonelyx.cn" # 站点地址
VITE_SITE_LOGO = "/images/icon/favicon.ico" # 站点主图标
VITE_SITE_MAIN_LOGO = "/images/icon/logo.png" # 主页图标
VITE_SITE_APPLE_LOGO = "/images/logo/apple-touch-icon.png" # Apple 端图标
Expand Down Expand Up @@ -35,7 +35,7 @@ VITE_SITE_START = "2023-02-10"

# ICP 备案号
## 若不需要,请设为空即可
VITE_SITE_ICP = ""
VITE_SITE_ICP = "蜀ICP备2023024661号"

# 歌曲 API 地址
## 请参照 https://github.com/xizeyoupan/Meting-API#deno-deploy 进行 API 服务部署
Expand Down
9 changes: 3 additions & 6 deletions src/utils/getTime.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,9 @@ export const getTimeCapsule = () => {
// 计算总的天数或小时数
const total = end.diff(start, unit === "day" ? "hour" : "day") + 1;
// 计算剩余的天数或小时数
let passed;
if (unit === "week" && now.day() === 0) {
// 如果是星期日
passed = total - 1;
} else {
passed = now.diff(start, unit === "day" ? "hour" : "day");
let passed = now.diff(start, unit === "day" ? "hour" : "day");
if (unit === "week") {
passed = (passed + 6) % 7;
}
const remaining = total - passed;
const percentage = (passed / total) * 100;
Expand Down

0 comments on commit f83d95f

Please sign in to comment.