更新日志

This commit is contained in:
Ember 2024-09-03 20:43:40 +08:00
parent 847f2a240b
commit b7bebb31c4
5 changed files with 101 additions and 48 deletions

View File

@ -73,3 +73,38 @@
color: #fff;
border: 1px solid #666;
}
/* 验证按钮普通模式样式 */
#first-verify-btn {
display: block;
margin: 0 auto;
padding: 10px 20px;
background-color: #007BFF;
color: #fff;
border: none;
border-radius: 4px;
cursor: pointer;
text-align: center;
}
#first-verify-btn:hover {
background-color: #0056b3;
}
#first-verify-btn:active {
background-color: #003f7f;
}
/* 夜间模式样式 */
.dark #first-verify-btn {
background-color: #444;
color: #fff;
}
.dark #first-verify-btn:hover {
background-color: #555;
}
.dark #first-verify-btn:active {
background-color: #333;
}

File diff suppressed because it is too large Load Diff

8
js/coin.min.js vendored
View File

@ -8,7 +8,7 @@ function loadCoinSystem(){function d(r){let a=document.getElementById("coin-cont
<p><strong>请注意</strong><strong></strong></p>
<p><strong>每页显示10条东币记录最近的记录将显示在最后</strong></p>
`,c(s),function t(){var n=Math.ceil(r.transactions.length/10),o=document.createElement("div"),e=(o.className="pagination",document.createElement("span"));o.appendChild(e);for(let e=1;e<=n;e++){var i=document.createElement("button");i.textContent=e,i.className="page-link",i.style.margin="0 5px",i.style.fontWeight=e===s?"bold":"normal",i.disabled=e===s,i.addEventListener("click",()=>{c(s=e),t()}),o.appendChild(i)}e=a.querySelector(".pagination");e&&a.removeChild(e),a.appendChild(o)}()}function o(){let a=document.getElementById("verification-modal"),o=(a.style.display="block",document.getElementById("send-code-btn")),s=document.getElementById("verify-btn"),i=document.getElementById("phone-number"),c=document.getElementById("verification-code"),l=document.getElementById("modal-message");o.addEventListener("click",async()=>{var e=i.value.trim();if(/^\d{11}$/.test(e)&&"1"===e.charAt(0))try{var t,n=CryptoJS.SHA256(e).toString();(await(await fetchNoCache("https://download.xn--xhq44jb2fzpc.com/user/pn.json")).json()).includes(n)?(l.innerText="此手机号已被验证过!",o.disabled=!1,o.textContent="发送验证码"):(o.disabled=!0,o.textContent="禁用中...",setTimeout(()=>{o.disabled=!1,o.textContent="发送验证码"},12e4),await(t=await fetch("https://sms.xn--xhq44jb2fzpc.com/send-code",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({phoneNumber:e})})).json(),t.ok?(l.innerText="验证码已发送。若未收到2分钟后可重新发送。",sessionStorage.setItem("phoneNumber",e)):(l.innerText="发送失败!请稍后再试。",o.disabled=!1,o.textContent="发送验证码"))}catch(e){l.innerText="发送验证码时出错,请稍后重试。",o.disabled=!1,o.textContent="发送验证码"}else l.innerText="请输入有效的11位手机号码"}),s.addEventListener("click",async()=>{var e=sessionStorage.getItem("phoneNumber"),t=c.value.trim();if(l.innerText="",t&&e)try{var n,o,i=await fetch("https://sms.xn--xhq44jb2fzpc.com/verify-code",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({phoneNumber:e,verificationCode:t})}),r=await i.json();i.ok&&r.verified?(l.innerText="验证通过,请稍后……",s.disabled=!0,c.disabled=!0,n=CryptoJS.SHA256(e).toString(),(o=await(await fetchNoCache("https://download.xn--xhq44jb2fzpc.com/user/pn.json")).json()).push(n),await client.put("user/pn.json",new Blob([JSON.stringify(o)],{type:"application/json"})),await client.put(`user/${curemail}/pn.json`,new Blob([JSON.stringify({phoneNumber:e})],{type:"application/json"})),setTimeout(async()=>{a.style.display="none";var e={userEmail:curemail,coins:50,transactions:[{type:"credit",amount:50,description:"初始东币奖励",date:(e=new Date,new Date(e.getTime()+288e5).toISOString().replace("T"," ").substring(0,19))}]},t=new Blob([JSON.stringify(!0)],{type:"application/json"}),t=(await client.put(`user/${curemail}/coin/verify.json`,t),new Blob([JSON.stringify(e)],{type:"application/json"}));await client.put(`user/${curemail}/coin/list.json`,t),d(e)},2e3)):l.innerText="验证码错误,请重新输入。"}catch(e){l.innerText="验证时出错,请稍后重试。"}else l.innerText="请输入手机号和验证码。"})}document.getElementById("cancel-btn").addEventListener("click",function(){document.getElementById("verification-modal").style.display="none"}),async function(){try{var e=`https://download.xn--xhq44jb2fzpc.com/user/${curemail}/coin/verify.json`,t=await(await fetchNoCache(e)).json();if(console.log("Verify Response: ",t),!0!==t)throw new Error("Verification required");var n=`https://download.xn--xhq44jb2fzpc.com/user/${curemail}/coin/list.json`;d(await(await fetchNoCache(n)).json())}catch(e){console.error("Error in initializeCoinSystem: ",e);{let e=document.getElementById("coin-content"),t=(e.innerHTML=`
<p>您需要进行手机验证以解锁东币系统下载某些资源时会花费东币而投稿审核通过后可以获得东币</p>
<p><strong>请注意</strong><strong></strong></p>
<button id="first-verify-btn">验证</button>
`,document.getElementById("first-verify-btn"));t.style.display="block",t.style.margin="0 auto",t.style.padding="10px 20px",t.style.backgroundColor="#007BFF",t.style.color="#fff",t.style.border="none",t.style.borderRadius="4px",t.style.cursor="pointer",t.style.textAlign="center",t.onmouseover=function(){t.style.backgroundColor="#0056b3"},t.onmouseout=function(){t.style.backgroundColor="#007BFF"},t.onmousedown=function(){t.style.backgroundColor="#003f7f"},document.body.classList.contains("dark")&&(t.style.backgroundColor="#444",t.style.color="#fff");t.addEventListener("click",o);return}}}()}
<p>您需要进行手机验证以解锁东币系统下载某些资源时会花费东币而投稿审核通过后可以获得东币</p>
<p><strong>请注意</strong><strong></strong></p>
<button id="first-verify-btn">验证</button>
`,document.getElementById("first-verify-btn")),n=(t.style.display="block",t.style.margin="0 auto",t.style.padding="10px 20px",t.style.backgroundColor="#007BFF",t.style.color="#fff",t.style.border="none",t.style.borderRadius="4px",t.style.cursor="pointer",t.style.textAlign="center",document.body.classList.contains("dark"));n&&(t.style.backgroundColor="#444",t.style.color="#fff");t.onmouseover=function(){n?t.style.backgroundColor="#555":t.style.backgroundColor="#0056b3"},t.onmouseout=function(){n?t.style.backgroundColor="#444":t.style.backgroundColor="#007BFF"},t.onmousedown=function(){n?t.style.backgroundColor="#333":t.style.backgroundColor="#003f7f"},t.addEventListener("click",o);return}}}()}

View File

@ -7,7 +7,7 @@
<meta name="robots" content="index, follow">
<title>更新日志 | NEU小站</title>
<meta name="keywords" content="">
<meta name="description" content="2024.09 09.01 更新金币系统并接入手机验证码验证 2024.08 08.31 更新账户验证功能防止非NEU师生注册本网站 08.23 更新资源合集卡片 08.10 资源下载采用临时签名URL防止爬虫 08.08 优化安全下载功能 08.04 优化投稿Markdown编辑器样式 2024.07 07.28 搜索页新增热门关键词 07.26 修复部分情况下加载草稿不展示最新草稿内容的Bug 07.25 修复了内容详情页面不展示最新头像的Bug 配置并优化资源存储子域名 07.03 升级资源内容系统接入投稿用户系统 升级投稿系统为投稿者中心引入投稿用户系统 07.02 新增资源投稿系统 投稿系统优化CORS安全机制以保护文件 2024.06 06.30 优化了资源密码验证机制 06.29 增加资源密码保护功能 06.27 新增 $LaTeX$ 数学公式支持 新增投稿者头像 06.24 优化首页新生指南样式 为网站配置资源防盗链 优化评论区表情稳定性 06.23 新增新生指南板块 06.22 优化主页背景图片稳定性 06.20 更新主页LOGO 更新404页面样式 06.19 更新网站主页样式电脑端和手机端 更新主页按钮样式 06.18 更新网站图标
<meta name="description" content="2024.09 09.03 优化Restful API的安全性优化存储签名机制 09.01 更新东币系统并接入手机验证码验证 2024.08 08.31 更新账户验证功能防止非NEU师生注册本网站 08.23 更新资源合集卡片 08.10 资源下载采用临时签名URL防止爬虫 08.08 优化安全下载功能 08.04 优化投稿Markdown编辑器样式 2024.07 07.28 搜索页新增热门关键词 07.26 修复部分情况下加载草稿不展示最新草稿内容的Bug 07.25 修复了内容详情页面不展示最新头像的Bug 配置并优化资源存储子域名 07.03 升级资源内容系统接入投稿用户系统 升级投稿系统为投稿者中心引入投稿用户系统 07.02 新增资源投稿系统 投稿系统优化CORS安全机制以保护文件 2024.06 06.30 优化了资源密码验证机制 06.29 增加资源密码保护功能 06.27 新增 $LaTeX$ 数学公式支持 新增投稿者头像 06.24 优化首页新生指南样式 为网站配置资源防盗链 优化评论区表情稳定性 06.23 新增新生指南板块 06.22 优化主页背景图片稳定性 06.20 更新主页LOGO 更新404页面样式 06.19 更新网站主页样式电脑端和手机端 更新主页按钮样式 06.18 更新网站图标
评论区启用贴吧表情。
优化投稿作者样式。
优化网站夜间模式样式。
@ -16,7 +16,7 @@
优化帖子样式。
更新评论区样式。
添加优质资源标识。
06.17 优化评论区样式。 网站底部新增二维码。 06.16 优化评论系统,采用免登录模式。 完善资源共享协议内容。 06.15 新增资源共享协议。 修复网站资源完整性SRI问题。 修复搜索不显示结果的bug。 优化网站移动端样式。 修复网站换行符编码引起的bug。 添加评论系统。 06.">
06.17 优化评论区样式。 网站底部新增二维码。 06.16 优化评论系统,采用免登录模式。 完善资源共享协议内容。 06.">
<meta name="author" content="
@ -241,9 +241,13 @@
<div class="post-content">
<h2 id="202409">2024.09<a hidden class="anchor" aria-hidden="true" href="#202409">#</a></h2>
<h3 id="0903">09.03<a hidden class="anchor" aria-hidden="true" href="#0903">#</a></h3>
<ul>
<li>优化Restful API的安全性优化存储签名机制。</li>
</ul>
<h3 id="0901">09.01<a hidden class="anchor" aria-hidden="true" href="#0901">#</a></h3>
<ul>
<li>更新金币系统,并接入手机验证码验证。</li>
<li>更新“东币系统”,并接入手机验证码验证。</li>
</ul>
<h2 id="202408">2024.08<a hidden class="anchor" aria-hidden="true" href="#202408">#</a></h2>
<h3 id="0831">08.31<a hidden class="anchor" aria-hidden="true" href="#0831">#</a></h3>

View File

@ -1002,8 +1002,8 @@ async function fetchNoCache(url) {
<script src="https://download.xn--xhq44jb2fzpc.com/upload/simplemde.min.js?v=1.0.4"></script>
<script src="https://download.xn--xhq44jb2fzpc.com/upload/submission.min.js?v=2.0.1"></script>
<!-- <script src="/js/submission.js"></script> -->
<script src="https://download.xn--xhq44jb2fzpc.com/upload/coin.min.js?v=1.0.3"></script>
<!-- <script src="/js/coin.js"></script> -->
<!-- <script src="https://download.xn--xhq44jb2fzpc.com/upload/coin.min.js?v=1.0.3"></script> -->
<script src="/js/coin.js"></script>