2021-09-27 22:53:42 +08:00
|
|
|
<!DOCTYPE html>
|
2022-10-15 23:32:33 +08:00
|
|
|
<html lang="zh-cmn-Hans">
|
2021-10-22 20:00:32 +08:00
|
|
|
|
2021-09-27 22:53:42 +08:00
|
|
|
<head>
|
|
|
|
|
<meta charset="UTF-8">
|
2022-07-16 00:43:41 +08:00
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
2023-01-14 22:48:02 +08:00
|
|
|
<link rel="stylesheet" href="./statics/github.css">
|
|
|
|
|
<link rel="stylesheet" href="./statics/theme.css">
|
2023-03-18 21:32:59 +08:00
|
|
|
<script src="./statics/modules/jquery.min.js"></script>
|
2023-04-19 03:59:52 +08:00
|
|
|
<script type="module">
|
|
|
|
|
import { IO } from "./statics/modules/tools.js"
|
2023-06-07 22:59:41 +08:00
|
|
|
let page = 10
|
2025-07-30 13:34:22 +08:00
|
|
|
let url = `https://solidaim.cn:3000/api/v1/repos/hbk01/qctool/commits?page=1&limit=${page}`
|
2022-08-08 01:19:45 +08:00
|
|
|
|
|
|
|
|
let functions = [
|
|
|
|
|
{
|
|
|
|
|
"name": "干燥失重",
|
2023-01-14 22:48:02 +08:00
|
|
|
"location": "./views/lod.html"
|
2022-08-08 01:19:45 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "炽灼残渣",
|
2023-01-14 22:48:02 +08:00
|
|
|
"location": "./views/roi.html"
|
2022-08-08 01:19:45 +08:00
|
|
|
},
|
|
|
|
|
{
|
2023-01-02 20:52:03 +08:00
|
|
|
"name": "进样时间",
|
2023-01-14 22:48:02 +08:00
|
|
|
"location": "./views/injection-sequence.html"
|
2022-08-08 01:19:45 +08:00
|
|
|
},
|
2025-11-11 19:11:50 +08:00
|
|
|
// {
|
|
|
|
|
// "name": "效期查询",
|
|
|
|
|
// "location": "./views/expir-info.html"
|
|
|
|
|
// },
|
2022-08-08 01:19:45 +08:00
|
|
|
{
|
2025-11-11 19:11:50 +08:00
|
|
|
"name": "日期计算",
|
|
|
|
|
"location": "./views/calc-date.html"
|
2023-03-14 00:55:50 +08:00
|
|
|
},
|
|
|
|
|
{
|
2023-04-19 03:59:52 +08:00
|
|
|
"name": "操作规程",
|
|
|
|
|
"location": "./views/sop.html"
|
2023-03-13 21:36:28 +08:00
|
|
|
}
|
2022-11-20 00:19:56 +08:00
|
|
|
]
|
2022-08-08 01:19:45 +08:00
|
|
|
|
2023-04-19 03:59:52 +08:00
|
|
|
$(() => {
|
2022-08-08 01:19:45 +08:00
|
|
|
// 加载功能列表
|
|
|
|
|
functions.forEach(value => {
|
2023-06-07 22:59:41 +08:00
|
|
|
let onclick = `window.location.href='${value.location}'`
|
|
|
|
|
let div = `<div class="item" onclick="${onclick}">${value.name}</div>`
|
2022-11-20 00:19:56 +08:00
|
|
|
$(".list").append(div)
|
|
|
|
|
})
|
2022-08-08 01:19:45 +08:00
|
|
|
|
|
|
|
|
// 加载最近的 commit 记录
|
2022-07-21 13:21:06 +08:00
|
|
|
$.getJSON(url, data => {
|
2022-10-20 20:50:24 +08:00
|
|
|
let color1 = '#f9f9f9'
|
|
|
|
|
let color2 = '#f3f3f3'
|
2022-10-15 23:32:33 +08:00
|
|
|
let changeColor = false
|
2022-07-21 13:21:06 +08:00
|
|
|
data.forEach(element => {
|
2022-10-20 20:50:24 +08:00
|
|
|
// 处理换行和+号
|
2022-11-20 00:19:56 +08:00
|
|
|
let message = element.commit.message.replaceAll("\n", "<br>")
|
2022-07-21 13:21:06 +08:00
|
|
|
if (message.startsWith("+")) {
|
2022-11-20 00:19:56 +08:00
|
|
|
message = message.replace("+", "<br> <strong>•</strong>")
|
2022-07-21 13:21:06 +08:00
|
|
|
}
|
2022-10-20 20:50:24 +08:00
|
|
|
message = message.replaceAll("+", " <strong>•</strong>")
|
|
|
|
|
|
2022-11-20 00:19:56 +08:00
|
|
|
// 处理提交的日期
|
2022-10-20 20:50:24 +08:00
|
|
|
let date = new Date(element.commit.committer.date) // "2022-10-08T10:54:36Z"
|
2022-11-20 00:19:56 +08:00
|
|
|
date = new Date(+ new Date(date) + 28800000).toISOString()
|
|
|
|
|
date = date.replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '')
|
2022-10-20 20:50:24 +08:00
|
|
|
|
2022-11-20 00:19:56 +08:00
|
|
|
// 组装标题信息
|
|
|
|
|
let verifiedString = "<span style='color: green;'><strong>Verified</strong></span>"
|
|
|
|
|
let hash = `<a href='${element.html_url}'>${element.sha.slice(0, 7)}</a>`
|
|
|
|
|
let verified = `${element.commit.verification.verified ? verifiedString : ""}`
|
|
|
|
|
let header = `${hash} ${date} ${verified}`
|
2022-10-25 01:36:31 +08:00
|
|
|
|
2022-11-20 00:19:56 +08:00
|
|
|
changeColor = !changeColor
|
|
|
|
|
let color = `${changeColor ? color1 : color2}`
|
2022-10-20 20:50:24 +08:00
|
|
|
let msg = `
|
2022-11-20 00:19:56 +08:00
|
|
|
<div style="background-color: ${color}; padding: 5px 0px 5px 10px">
|
2022-10-25 01:36:31 +08:00
|
|
|
${header}
|
|
|
|
|
${message}
|
2022-10-20 20:50:24 +08:00
|
|
|
</div>`
|
2022-11-20 00:19:56 +08:00
|
|
|
$(".changelog").append(msg)
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
})
|
2022-07-21 13:21:06 +08:00
|
|
|
</script>
|
2021-09-27 22:53:42 +08:00
|
|
|
<title>QC TOOL</title>
|
|
|
|
|
</head>
|
2021-10-22 20:00:32 +08:00
|
|
|
|
2021-09-27 22:53:42 +08:00
|
|
|
<body>
|
2023-06-07 22:59:41 +08:00
|
|
|
<h4>功能列表</h4>
|
2022-08-08 01:19:45 +08:00
|
|
|
<div class="list"></div>
|
|
|
|
|
<h4>关于</h4>
|
2022-07-21 13:21:06 +08:00
|
|
|
<div class="about">
|
2022-10-15 23:32:33 +08:00
|
|
|
<p>建议使用系统自带浏览器,以完善使用体验!</p>
|
2022-07-21 13:21:06 +08:00
|
|
|
</div>
|
2023-04-19 03:59:52 +08:00
|
|
|
<h4 id="changelog_title">变更日志</h4>
|
2022-10-20 20:50:24 +08:00
|
|
|
<div class="changelog" style="width: 100%;"></div>
|
2021-09-27 22:53:42 +08:00
|
|
|
</body>
|
2021-10-22 20:00:32 +08:00
|
|
|
|
2025-07-27 20:38:50 +08:00
|
|
|
<footer>
|
|
|
|
|
<p><a href="https://beian.miit.gov.cn" target="_blank">赣ICP备2025067425号</a></p>
|
|
|
|
|
</footer>
|
|
|
|
|
|
|
|
|
|
</html>
|