调整东币

This commit is contained in:
Ember 2024-09-02 14:26:09 +08:00
parent cde31bf6e8
commit 9a3fbd1630
7 changed files with 86 additions and 80 deletions

File diff suppressed because one or more lines are too long

View File

@ -340,6 +340,7 @@ $$
此处收录了2014-2021学年的12套《概率论与数理统计》期末考试真题。
页面已提供在线预览,推荐您使用全屏预览。
温馨提示手机端可能无法正常预览PDF文件。请使用电脑浏览器访问。
下载该资源需要15东币
点击下载 下载安全保护中 3秒后将开始下载... 预览 </description>
</item>
<item>

File diff suppressed because it is too large Load Diff

2
js/coin.min.js vendored
View File

@ -2,7 +2,7 @@ function loadCoinSystem(){function l(e){var t=document.getElementById("coin-cont
<td>${e.date}</td>
<td>${"credit"===e.type?"+":"-"}${e.amount}</td>
<td>${e.description}</td>
`}),t.appendChild(n)}function o(){let s=document.getElementById("verification-modal"),o=(s.style.display="block",document.getElementById("send-code-btn")),a=document.getElementById("verify-btn"),i=document.getElementById("phone-number"),c=document.getElementById("verification-code"),d=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)?(d.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?(d.innerText="验证码已发送。若未收到2分钟后可重新发送。",sessionStorage.setItem("phoneNumber",e)):(d.innerText="发送失败!请稍后再试。",o.disabled=!1,o.textContent="发送验证码"))}catch(e){d.innerText="发送验证码时出错,请稍后重试。",o.disabled=!1,o.textContent="发送验证码"}else d.innerText="请输入有效的11位手机号码"}),a.addEventListener("click",async()=>{var e=sessionStorage.getItem("phoneNumber"),t=c.value.trim();if(d.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?(d.innerText="验证通过,请稍后……",a.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"})),setTimeout(async()=>{s.style.display="none";var e={userEmail:curemail,coins:20,transactions:[{type:"credit",amount:20,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),l(e)},2e3)):d.innerText="验证码错误,请重新输入。"}catch(e){d.innerText="验证时出错,请稍后重试。"}else d.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`;l(await(await fetchNoCache(n)).json())}catch(e){console.error("Error in initializeCoinSystem: ",e);{let e=document.getElementById("coin-content"),t=(e.innerHTML=`
`}),t.appendChild(n)}function o(){let s=document.getElementById("verification-modal"),o=(s.style.display="block",document.getElementById("send-code-btn")),a=document.getElementById("verify-btn"),i=document.getElementById("phone-number"),c=document.getElementById("verification-code"),d=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)?(d.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?(d.innerText="验证码已发送。若未收到2分钟后可重新发送。",sessionStorage.setItem("phoneNumber",e)):(d.innerText="发送失败!请稍后再试。",o.disabled=!1,o.textContent="发送验证码"))}catch(e){d.innerText="发送验证码时出错,请稍后重试。",o.disabled=!1,o.textContent="发送验证码"}else d.innerText="请输入有效的11位手机号码"}),a.addEventListener("click",async()=>{var e=sessionStorage.getItem("phoneNumber"),t=c.value.trim();if(d.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?(d.innerText="验证通过,请稍后……",a.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()=>{s.style.display="none";var e={userEmail:curemail,coins:20,transactions:[{type:"credit",amount:20,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),l(e)},2e3)):d.innerText="验证码错误,请重新输入。"}catch(e){d.innerText="验证时出错,请稍后重试。"}else d.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`;l(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>

View File

@ -218,6 +218,7 @@
此处收录了2014-2021学年的12套《概率论与数理统计》期末考试真题。
页面已提供在线预览,推荐您使用全屏预览。
温馨提示手机端可能无法正常预览PDF文件。请使用电脑浏览器访问。
下载该资源需要15东币
点击下载 下载安全保护中 3秒后将开始下载... 预览 </description>
</item>
<item>

View File

@ -334,6 +334,7 @@ createCardSection('xzttk', '选择题');
此处收录了2014-2021学年的12套《概率论与数理统计》期末考试真题。
页面已提供在线预览,推荐您使用全屏预览。
温馨提示手机端可能无法正常预览PDF文件。请使用电脑浏览器访问。
下载该资源需要15东币
点击下载 下载安全保护中 3秒后将开始下载... 预览 </p>
</div>

File diff suppressed because it is too large Load Diff