更新东币逻辑

This commit is contained in:
Ember 2024-11-25 18:49:58 +08:00
parent f7ea8b5b3d
commit c1b7e791fd
36 changed files with 36 additions and 36 deletions

View File

@ -488,7 +488,7 @@
<div class="popup-content">3秒后将开始下载...</div>
</div>
<script>
let client;function getCookie(t){const n=t+"=";const o=document.cookie.split(";");for(let e=0;e<o.length;e++){let t=o[e];while(t.charAt(0)==" ")t=t.substring(1,t.length);if(t.indexOf(n)==0)return t.substring(n.length,t.length)}return null}async function fetchNoCache(t){const e=(new Date).getTime();const n=`${t}?timestamp=${e}`;return fetch(n)}async function f1(){try{const t=await fetchNoCache("https://download.xn--xhq44jb2fzpc.com/upload/json/s.json");const e=await t.json();const n=e.masterKey;const o=CryptoJS.SHA256(n);const c={region:d2(e.encryptedRegion,o),accessKeyId:d2(e.encryptedKeyId,o),accessKeySecret:d2(e.encryptedKeySecret,o),bucket:d2(e.encryptedBucket,o)};client=new OSS(c)}catch(t){console.error("Failed to fetch or decrypt OSS config:",t)}}function d2(t,e){t=t.replace(/\s/g,"");const n=CryptoJS.enc.Base64.parse(t);const o=CryptoJS.lib.WordArray.create(n.words.slice(0,4));const c=CryptoJS.lib.WordArray.create(n.words.slice(4));const s=CryptoJS.AES.decrypt({ciphertext:c},e,{iv:o,mode:CryptoJS.mode.CBC,padding:CryptoJS.pad.Pkcs7});return s.toString(CryptoJS.enc.Utf8)}f1();document.addEventListener("DOMContentLoaded",function(){const s="download-1";const i="resources\/ba\/draft\/Python.7z";const r="popup-"+s;const a= 15 ;const l="《python文管类》PPT";const t=async()=>{await p();const t=d;if(!t){alert("请登录后下载!");window.location.href="/submission";return}if(a>0){const e=`https://download.xn--xhq44jb2fzpc.com/user/${t}/coin/list.json`;try{const n=await fetchNoCache(e);if(!n.ok){alert("您还未激活东币系统,请前往激活!");window.location.href="/submission";return}const o=await n.json();if(o.coins<a){alert(`您的东币数量不够当前资源要求东币数${a}您的东币数${o.coins}`);return}else{if(confirm(`当前下载操作花费${a}东币您的东币${o.coins}是否继续`)){o.coins-=a;o.transactions.push({type:"debit",amount:a,description:`下载资源:${l}`,date:getCurrentTime()});const c=new Blob([JSON.stringify(o)],{type:"application/json"});await client.put(`user/${t}/coin/list.json`,c);u(s,r,i)}}}catch(t){console.error("Error handling coins for download:",t);alert("无法处理您的请求请稍后重试")}}else{u(s,r,i)}};let d=null;const p=async()=>{if(d){return}const t=document.cookie.split("; ");const e=t.find(t=>t.startsWith("token="));const n=e?e.split("=")[1]:"";if(!n){console.error("未找到JWT信息");return}try{const o=await fetch("https://userlogin.xn--xhq44jb2fzpc.com/verifyToken",{method:"POST",headers:{"Content-Type":"application/json",Authorization:n}});const c=await o.json();if(o.ok&&c.email){d=c.email}else{console.error("JWT验证失败或未找到邮箱")}}catch(t){console.error("JWT验证时出错:",t)}};const u=(t,e,n)=>{let o=3;const c=document.getElementById(e);const s=c.querySelector(".popup-content");if(client){let t=client.signatureUrl(n,{expires:20,response:{"content-disposition":"attachment"}});const i=t.replace("emberimg.oss-cn-beijing.aliyuncs.com","download.xn--xhq44jb2fzpc.com");const r=()=>{if(o>0){s.textContent=`${o}秒后将开始下载...`;o--;setTimeout(r,1e3)}else{c.style.display="none";window.location.href=i}};c.style.display="block";r()}else{console.error("OSS client is not initialized.")}};document.getElementById(s).addEventListener("click",t)});function getCurrentTime(){const t=new Date;const e=new Date(t.getTime()+8*60*60*1e3);return e.toISOString().replace("T"," ").substring(0,19)}
let client;function getCookie(e){const n=e+"=";const o=document.cookie.split(";");for(let t=0;t<o.length;t++){let e=o[t];while(e.charAt(0)==" ")e=e.substring(1,e.length);if(e.indexOf(n)==0)return e.substring(n.length,e.length)}return null}async function fetchNoCache(e){const t=(new Date).getTime();const n=`${e}?timestamp=${t}`;return fetch(n)}async function f1(){try{const e=await fetchNoCache("https://download.xn--xhq44jb2fzpc.com/upload/json/s.json");const t=await e.json();const n=t.masterKey;const o=CryptoJS.SHA256(n);const s={region:d2(t.encryptedRegion,o),accessKeyId:d2(t.encryptedKeyId,o),accessKeySecret:d2(t.encryptedKeySecret,o),bucket:d2(t.encryptedBucket,o)};client=new OSS(s)}catch(e){console.error("Failed to fetch or decrypt OSS config:",e)}}function d2(e,t){e=e.replace(/\s/g,"");const n=CryptoJS.enc.Base64.parse(e);const o=CryptoJS.lib.WordArray.create(n.words.slice(0,4));const s=CryptoJS.lib.WordArray.create(n.words.slice(4));const c=CryptoJS.AES.decrypt({ciphertext:s},t,{iv:o,mode:CryptoJS.mode.CBC,padding:CryptoJS.pad.Pkcs7});return c.toString(CryptoJS.enc.Utf8)}f1();document.addEventListener("DOMContentLoaded",function(){const s="download-1";const c="resources\/ba\/draft\/Python.7z";const i="popup-"+s;const r= 15 ;const a="《python文管类》PPT";const e=async()=>{const e=getCookie("token");if(!e){alert("请登录后下载!");window.location.href="/submission";return}if(r>0){try{const t=await fetch("https://userlogin.xn--xhq44jb2fzpc.com/coin/download",{method:"POST",headers:{"Content-Type":"application/json",Authorization:e},body:JSON.stringify({amount:r,title:a})});const n=await t.json();if(t.ok){const o=confirm(`当前下载操作扣除东币数:${r},是否继续?`);if(o){l(s,i,c)}}else if(t.status===400&&n.message==="Insufficient coins."){alert(`您的东币数量不够!当前资源要求东币数:${r},您的东币数:${n.currentCoins||0}。`)}else if(t.status===400&&n.message==="Coin system not activated. Please activate your coin system."){alert("您还未激活东币系统,请前往激活!")}else if(t.status===404&&n.message==="User not found."){alert("未找到您的账户信息,请重新登录!");window.location.href="/submission"}else{alert(`下载失败:${n.message}`)}}catch(e){console.error("Error during download request:",e);alert("无法处理您的请求,请稍后重试。")}}else{l(s,i,c)}};const l=(e,t,n)=>{let o=3;const s=document.getElementById(t);const c=s.querySelector(".popup-content");if(client){let e=client.signatureUrl(n,{expires:20,response:{"content-disposition":"attachment"}});const i=e.replace("emberimg.oss-cn-beijing.aliyuncs.com","download.xn--xhq44jb2fzpc.com");const r=()=>{if(o>0){c.textContent=`${o}秒后将开始下载...`;o--;setTimeout(r,1e3)}else{s.style.display="none";window.location.href=i}};s.style.display="block";r()}else{console.error("OSS client is not initialized.")}};document.getElementById(s).addEventListener("click",e)});function getCurrentTime(){const e=new Date;const t=new Date(e.getTime()+8*60*60*1e3);return t.toISOString().replace("T"," ").substring(0,19)}
</script>
<hr>

View File

@ -488,7 +488,7 @@
<div class="popup-content">3秒后将开始下载...</div>
</div>
<script>
let client;function getCookie(t){const n=t+"=";const o=document.cookie.split(";");for(let e=0;e<o.length;e++){let t=o[e];while(t.charAt(0)==" ")t=t.substring(1,t.length);if(t.indexOf(n)==0)return t.substring(n.length,t.length)}return null}async function fetchNoCache(t){const e=(new Date).getTime();const n=`${t}?timestamp=${e}`;return fetch(n)}async function f1(){try{const t=await fetchNoCache("https://download.xn--xhq44jb2fzpc.com/upload/json/s.json");const e=await t.json();const n=e.masterKey;const o=CryptoJS.SHA256(n);const c={region:d2(e.encryptedRegion,o),accessKeyId:d2(e.encryptedKeyId,o),accessKeySecret:d2(e.encryptedKeySecret,o),bucket:d2(e.encryptedBucket,o)};client=new OSS(c)}catch(t){console.error("Failed to fetch or decrypt OSS config:",t)}}function d2(t,e){t=t.replace(/\s/g,"");const n=CryptoJS.enc.Base64.parse(t);const o=CryptoJS.lib.WordArray.create(n.words.slice(0,4));const c=CryptoJS.lib.WordArray.create(n.words.slice(4));const s=CryptoJS.AES.decrypt({ciphertext:c},e,{iv:o,mode:CryptoJS.mode.CBC,padding:CryptoJS.pad.Pkcs7});return s.toString(CryptoJS.enc.Utf8)}f1();document.addEventListener("DOMContentLoaded",function(){const s="download-1";const i="resources\/ba\/draft\/中级财务1.zip";const r="popup-"+s;const a= 10 ;const l="《中级财务1》PPT";const t=async()=>{await p();const t=d;if(!t){alert("请登录后下载!");window.location.href="/submission";return}if(a>0){const e=`https://download.xn--xhq44jb2fzpc.com/user/${t}/coin/list.json`;try{const n=await fetchNoCache(e);if(!n.ok){alert("您还未激活东币系统,请前往激活!");window.location.href="/submission";return}const o=await n.json();if(o.coins<a){alert(`您的东币数量不够当前资源要求东币数${a}您的东币数${o.coins}`);return}else{if(confirm(`当前下载操作花费${a}东币您的东币${o.coins}是否继续`)){o.coins-=a;o.transactions.push({type:"debit",amount:a,description:`下载资源:${l}`,date:getCurrentTime()});const c=new Blob([JSON.stringify(o)],{type:"application/json"});await client.put(`user/${t}/coin/list.json`,c);u(s,r,i)}}}catch(t){console.error("Error handling coins for download:",t);alert("无法处理您的请求请稍后重试")}}else{u(s,r,i)}};let d=null;const p=async()=>{if(d){return}const t=document.cookie.split("; ");const e=t.find(t=>t.startsWith("token="));const n=e?e.split("=")[1]:"";if(!n){console.error("未找到JWT信息");return}try{const o=await fetch("https://userlogin.xn--xhq44jb2fzpc.com/verifyToken",{method:"POST",headers:{"Content-Type":"application/json",Authorization:n}});const c=await o.json();if(o.ok&&c.email){d=c.email}else{console.error("JWT验证失败或未找到邮箱")}}catch(t){console.error("JWT验证时出错:",t)}};const u=(t,e,n)=>{let o=3;const c=document.getElementById(e);const s=c.querySelector(".popup-content");if(client){let t=client.signatureUrl(n,{expires:20,response:{"content-disposition":"attachment"}});const i=t.replace("emberimg.oss-cn-beijing.aliyuncs.com","download.xn--xhq44jb2fzpc.com");const r=()=>{if(o>0){s.textContent=`${o}秒后将开始下载...`;o--;setTimeout(r,1e3)}else{c.style.display="none";window.location.href=i}};c.style.display="block";r()}else{console.error("OSS client is not initialized.")}};document.getElementById(s).addEventListener("click",t)});function getCurrentTime(){const t=new Date;const e=new Date(t.getTime()+8*60*60*1e3);return e.toISOString().replace("T"," ").substring(0,19)}
let client;function getCookie(e){const n=e+"=";const o=document.cookie.split(";");for(let t=0;t<o.length;t++){let e=o[t];while(e.charAt(0)==" ")e=e.substring(1,e.length);if(e.indexOf(n)==0)return e.substring(n.length,e.length)}return null}async function fetchNoCache(e){const t=(new Date).getTime();const n=`${e}?timestamp=${t}`;return fetch(n)}async function f1(){try{const e=await fetchNoCache("https://download.xn--xhq44jb2fzpc.com/upload/json/s.json");const t=await e.json();const n=t.masterKey;const o=CryptoJS.SHA256(n);const s={region:d2(t.encryptedRegion,o),accessKeyId:d2(t.encryptedKeyId,o),accessKeySecret:d2(t.encryptedKeySecret,o),bucket:d2(t.encryptedBucket,o)};client=new OSS(s)}catch(e){console.error("Failed to fetch or decrypt OSS config:",e)}}function d2(e,t){e=e.replace(/\s/g,"");const n=CryptoJS.enc.Base64.parse(e);const o=CryptoJS.lib.WordArray.create(n.words.slice(0,4));const s=CryptoJS.lib.WordArray.create(n.words.slice(4));const c=CryptoJS.AES.decrypt({ciphertext:s},t,{iv:o,mode:CryptoJS.mode.CBC,padding:CryptoJS.pad.Pkcs7});return c.toString(CryptoJS.enc.Utf8)}f1();document.addEventListener("DOMContentLoaded",function(){const s="download-1";const c="resources\/ba\/draft\/中级财务1.zip";const i="popup-"+s;const r= 10 ;const a="《中级财务1》PPT";const e=async()=>{const e=getCookie("token");if(!e){alert("请登录后下载!");window.location.href="/submission";return}if(r>0){try{const t=await fetch("https://userlogin.xn--xhq44jb2fzpc.com/coin/download",{method:"POST",headers:{"Content-Type":"application/json",Authorization:e},body:JSON.stringify({amount:r,title:a})});const n=await t.json();if(t.ok){const o=confirm(`当前下载操作扣除东币数:${r},是否继续?`);if(o){l(s,i,c)}}else if(t.status===400&&n.message==="Insufficient coins."){alert(`您的东币数量不够!当前资源要求东币数:${r},您的东币数:${n.currentCoins||0}。`)}else if(t.status===400&&n.message==="Coin system not activated. Please activate your coin system."){alert("您还未激活东币系统,请前往激活!")}else if(t.status===404&&n.message==="User not found."){alert("未找到您的账户信息,请重新登录!");window.location.href="/submission"}else{alert(`下载失败:${n.message}`)}}catch(e){console.error("Error during download request:",e);alert("无法处理您的请求,请稍后重试。")}}else{l(s,i,c)}};const l=(e,t,n)=>{let o=3;const s=document.getElementById(t);const c=s.querySelector(".popup-content");if(client){let e=client.signatureUrl(n,{expires:20,response:{"content-disposition":"attachment"}});const i=e.replace("emberimg.oss-cn-beijing.aliyuncs.com","download.xn--xhq44jb2fzpc.com");const r=()=>{if(o>0){c.textContent=`${o}秒后将开始下载...`;o--;setTimeout(r,1e3)}else{s.style.display="none";window.location.href=i}};s.style.display="block";r()}else{console.error("OSS client is not initialized.")}};document.getElementById(s).addEventListener("click",e)});function getCurrentTime(){const e=new Date;const t=new Date(e.getTime()+8*60*60*1e3);return t.toISOString().replace("T"," ").substring(0,19)}
</script>
<hr>

View File

@ -488,7 +488,7 @@
<div class="popup-content">3秒后将开始下载...</div>
</div>
<script>
let client;function getCookie(t){const n=t+"=";const o=document.cookie.split(";");for(let e=0;e<o.length;e++){let t=o[e];while(t.charAt(0)==" ")t=t.substring(1,t.length);if(t.indexOf(n)==0)return t.substring(n.length,t.length)}return null}async function fetchNoCache(t){const e=(new Date).getTime();const n=`${t}?timestamp=${e}`;return fetch(n)}async function f1(){try{const t=await fetchNoCache("https://download.xn--xhq44jb2fzpc.com/upload/json/s.json");const e=await t.json();const n=e.masterKey;const o=CryptoJS.SHA256(n);const c={region:d2(e.encryptedRegion,o),accessKeyId:d2(e.encryptedKeyId,o),accessKeySecret:d2(e.encryptedKeySecret,o),bucket:d2(e.encryptedBucket,o)};client=new OSS(c)}catch(t){console.error("Failed to fetch or decrypt OSS config:",t)}}function d2(t,e){t=t.replace(/\s/g,"");const n=CryptoJS.enc.Base64.parse(t);const o=CryptoJS.lib.WordArray.create(n.words.slice(0,4));const c=CryptoJS.lib.WordArray.create(n.words.slice(4));const s=CryptoJS.AES.decrypt({ciphertext:c},e,{iv:o,mode:CryptoJS.mode.CBC,padding:CryptoJS.pad.Pkcs7});return s.toString(CryptoJS.enc.Utf8)}f1();document.addEventListener("DOMContentLoaded",function(){const s="download-1";const i="resources\/ba\/draft\/中级财务2.zip";const r="popup-"+s;const a= 10 ;const l="《中级财务2》PPT";const t=async()=>{await p();const t=d;if(!t){alert("请登录后下载!");window.location.href="/submission";return}if(a>0){const e=`https://download.xn--xhq44jb2fzpc.com/user/${t}/coin/list.json`;try{const n=await fetchNoCache(e);if(!n.ok){alert("您还未激活东币系统,请前往激活!");window.location.href="/submission";return}const o=await n.json();if(o.coins<a){alert(`您的东币数量不够当前资源要求东币数${a}您的东币数${o.coins}`);return}else{if(confirm(`当前下载操作花费${a}东币您的东币${o.coins}是否继续`)){o.coins-=a;o.transactions.push({type:"debit",amount:a,description:`下载资源:${l}`,date:getCurrentTime()});const c=new Blob([JSON.stringify(o)],{type:"application/json"});await client.put(`user/${t}/coin/list.json`,c);u(s,r,i)}}}catch(t){console.error("Error handling coins for download:",t);alert("无法处理您的请求请稍后重试")}}else{u(s,r,i)}};let d=null;const p=async()=>{if(d){return}const t=document.cookie.split("; ");const e=t.find(t=>t.startsWith("token="));const n=e?e.split("=")[1]:"";if(!n){console.error("未找到JWT信息");return}try{const o=await fetch("https://userlogin.xn--xhq44jb2fzpc.com/verifyToken",{method:"POST",headers:{"Content-Type":"application/json",Authorization:n}});const c=await o.json();if(o.ok&&c.email){d=c.email}else{console.error("JWT验证失败或未找到邮箱")}}catch(t){console.error("JWT验证时出错:",t)}};const u=(t,e,n)=>{let o=3;const c=document.getElementById(e);const s=c.querySelector(".popup-content");if(client){let t=client.signatureUrl(n,{expires:20,response:{"content-disposition":"attachment"}});const i=t.replace("emberimg.oss-cn-beijing.aliyuncs.com","download.xn--xhq44jb2fzpc.com");const r=()=>{if(o>0){s.textContent=`${o}秒后将开始下载...`;o--;setTimeout(r,1e3)}else{c.style.display="none";window.location.href=i}};c.style.display="block";r()}else{console.error("OSS client is not initialized.")}};document.getElementById(s).addEventListener("click",t)});function getCurrentTime(){const t=new Date;const e=new Date(t.getTime()+8*60*60*1e3);return e.toISOString().replace("T"," ").substring(0,19)}
let client;function getCookie(e){const n=e+"=";const o=document.cookie.split(";");for(let t=0;t<o.length;t++){let e=o[t];while(e.charAt(0)==" ")e=e.substring(1,e.length);if(e.indexOf(n)==0)return e.substring(n.length,e.length)}return null}async function fetchNoCache(e){const t=(new Date).getTime();const n=`${e}?timestamp=${t}`;return fetch(n)}async function f1(){try{const e=await fetchNoCache("https://download.xn--xhq44jb2fzpc.com/upload/json/s.json");const t=await e.json();const n=t.masterKey;const o=CryptoJS.SHA256(n);const s={region:d2(t.encryptedRegion,o),accessKeyId:d2(t.encryptedKeyId,o),accessKeySecret:d2(t.encryptedKeySecret,o),bucket:d2(t.encryptedBucket,o)};client=new OSS(s)}catch(e){console.error("Failed to fetch or decrypt OSS config:",e)}}function d2(e,t){e=e.replace(/\s/g,"");const n=CryptoJS.enc.Base64.parse(e);const o=CryptoJS.lib.WordArray.create(n.words.slice(0,4));const s=CryptoJS.lib.WordArray.create(n.words.slice(4));const c=CryptoJS.AES.decrypt({ciphertext:s},t,{iv:o,mode:CryptoJS.mode.CBC,padding:CryptoJS.pad.Pkcs7});return c.toString(CryptoJS.enc.Utf8)}f1();document.addEventListener("DOMContentLoaded",function(){const s="download-1";const c="resources\/ba\/draft\/中级财务2.zip";const i="popup-"+s;const r= 10 ;const a="《中级财务2》PPT";const e=async()=>{const e=getCookie("token");if(!e){alert("请登录后下载!");window.location.href="/submission";return}if(r>0){try{const t=await fetch("https://userlogin.xn--xhq44jb2fzpc.com/coin/download",{method:"POST",headers:{"Content-Type":"application/json",Authorization:e},body:JSON.stringify({amount:r,title:a})});const n=await t.json();if(t.ok){const o=confirm(`当前下载操作扣除东币数:${r},是否继续?`);if(o){l(s,i,c)}}else if(t.status===400&&n.message==="Insufficient coins."){alert(`您的东币数量不够!当前资源要求东币数:${r},您的东币数:${n.currentCoins||0}。`)}else if(t.status===400&&n.message==="Coin system not activated. Please activate your coin system."){alert("您还未激活东币系统,请前往激活!")}else if(t.status===404&&n.message==="User not found."){alert("未找到您的账户信息,请重新登录!");window.location.href="/submission"}else{alert(`下载失败:${n.message}`)}}catch(e){console.error("Error during download request:",e);alert("无法处理您的请求,请稍后重试。")}}else{l(s,i,c)}};const l=(e,t,n)=>{let o=3;const s=document.getElementById(t);const c=s.querySelector(".popup-content");if(client){let e=client.signatureUrl(n,{expires:20,response:{"content-disposition":"attachment"}});const i=e.replace("emberimg.oss-cn-beijing.aliyuncs.com","download.xn--xhq44jb2fzpc.com");const r=()=>{if(o>0){c.textContent=`${o}秒后将开始下载...`;o--;setTimeout(r,1e3)}else{s.style.display="none";window.location.href=i}};s.style.display="block";r()}else{console.error("OSS client is not initialized.")}};document.getElementById(s).addEventListener("click",e)});function getCurrentTime(){const e=new Date;const t=new Date(e.getTime()+8*60*60*1e3);return t.toISOString().replace("T"," ").substring(0,19)}
</script>
<hr>

View File

@ -488,7 +488,7 @@
<div class="popup-content">3秒后将开始下载...</div>
</div>
<script>
let client;function getCookie(t){const n=t+"=";const o=document.cookie.split(";");for(let e=0;e<o.length;e++){let t=o[e];while(t.charAt(0)==" ")t=t.substring(1,t.length);if(t.indexOf(n)==0)return t.substring(n.length,t.length)}return null}async function fetchNoCache(t){const e=(new Date).getTime();const n=`${t}?timestamp=${e}`;return fetch(n)}async function f1(){try{const t=await fetchNoCache("https://download.xn--xhq44jb2fzpc.com/upload/json/s.json");const e=await t.json();const n=e.masterKey;const o=CryptoJS.SHA256(n);const c={region:d2(e.encryptedRegion,o),accessKeyId:d2(e.encryptedKeyId,o),accessKeySecret:d2(e.encryptedKeySecret,o),bucket:d2(e.encryptedBucket,o)};client=new OSS(c)}catch(t){console.error("Failed to fetch or decrypt OSS config:",t)}}function d2(t,e){t=t.replace(/\s/g,"");const n=CryptoJS.enc.Base64.parse(t);const o=CryptoJS.lib.WordArray.create(n.words.slice(0,4));const c=CryptoJS.lib.WordArray.create(n.words.slice(4));const s=CryptoJS.AES.decrypt({ciphertext:c},e,{iv:o,mode:CryptoJS.mode.CBC,padding:CryptoJS.pad.Pkcs7});return s.toString(CryptoJS.enc.Utf8)}f1();document.addEventListener("DOMContentLoaded",function(){const s="download-1";const i="resources\/ba\/draft\/2022注会教材会计高清无水印.pdf";const r="popup-"+s;const a= 70 ;const l="《会计》课本";const t=async()=>{await p();const t=d;if(!t){alert("请登录后下载!");window.location.href="/submission";return}if(a>0){const e=`https://download.xn--xhq44jb2fzpc.com/user/${t}/coin/list.json`;try{const n=await fetchNoCache(e);if(!n.ok){alert("您还未激活东币系统,请前往激活!");window.location.href="/submission";return}const o=await n.json();if(o.coins<a){alert(`您的东币数量不够当前资源要求东币数${a}您的东币数${o.coins}`);return}else{if(confirm(`当前下载操作花费${a}东币您的东币${o.coins}是否继续`)){o.coins-=a;o.transactions.push({type:"debit",amount:a,description:`下载资源:${l}`,date:getCurrentTime()});const c=new Blob([JSON.stringify(o)],{type:"application/json"});await client.put(`user/${t}/coin/list.json`,c);u(s,r,i)}}}catch(t){console.error("Error handling coins for download:",t);alert("无法处理您的请求请稍后重试")}}else{u(s,r,i)}};let d=null;const p=async()=>{if(d){return}const t=document.cookie.split("; ");const e=t.find(t=>t.startsWith("token="));const n=e?e.split("=")[1]:"";if(!n){console.error("未找到JWT信息");return}try{const o=await fetch("https://userlogin.xn--xhq44jb2fzpc.com/verifyToken",{method:"POST",headers:{"Content-Type":"application/json",Authorization:n}});const c=await o.json();if(o.ok&&c.email){d=c.email}else{console.error("JWT验证失败或未找到邮箱")}}catch(t){console.error("JWT验证时出错:",t)}};const u=(t,e,n)=>{let o=3;const c=document.getElementById(e);const s=c.querySelector(".popup-content");if(client){let t=client.signatureUrl(n,{expires:20,response:{"content-disposition":"attachment"}});const i=t.replace("emberimg.oss-cn-beijing.aliyuncs.com","download.xn--xhq44jb2fzpc.com");const r=()=>{if(o>0){s.textContent=`${o}秒后将开始下载...`;o--;setTimeout(r,1e3)}else{c.style.display="none";window.location.href=i}};c.style.display="block";r()}else{console.error("OSS client is not initialized.")}};document.getElementById(s).addEventListener("click",t)});function getCurrentTime(){const t=new Date;const e=new Date(t.getTime()+8*60*60*1e3);return e.toISOString().replace("T"," ").substring(0,19)}
let client;function getCookie(e){const n=e+"=";const o=document.cookie.split(";");for(let t=0;t<o.length;t++){let e=o[t];while(e.charAt(0)==" ")e=e.substring(1,e.length);if(e.indexOf(n)==0)return e.substring(n.length,e.length)}return null}async function fetchNoCache(e){const t=(new Date).getTime();const n=`${e}?timestamp=${t}`;return fetch(n)}async function f1(){try{const e=await fetchNoCache("https://download.xn--xhq44jb2fzpc.com/upload/json/s.json");const t=await e.json();const n=t.masterKey;const o=CryptoJS.SHA256(n);const s={region:d2(t.encryptedRegion,o),accessKeyId:d2(t.encryptedKeyId,o),accessKeySecret:d2(t.encryptedKeySecret,o),bucket:d2(t.encryptedBucket,o)};client=new OSS(s)}catch(e){console.error("Failed to fetch or decrypt OSS config:",e)}}function d2(e,t){e=e.replace(/\s/g,"");const n=CryptoJS.enc.Base64.parse(e);const o=CryptoJS.lib.WordArray.create(n.words.slice(0,4));const s=CryptoJS.lib.WordArray.create(n.words.slice(4));const c=CryptoJS.AES.decrypt({ciphertext:s},t,{iv:o,mode:CryptoJS.mode.CBC,padding:CryptoJS.pad.Pkcs7});return c.toString(CryptoJS.enc.Utf8)}f1();document.addEventListener("DOMContentLoaded",function(){const s="download-1";const c="resources\/ba\/draft\/2022注会教材会计高清无水印.pdf";const i="popup-"+s;const r= 70 ;const a="《会计》课本";const e=async()=>{const e=getCookie("token");if(!e){alert("请登录后下载!");window.location.href="/submission";return}if(r>0){try{const t=await fetch("https://userlogin.xn--xhq44jb2fzpc.com/coin/download",{method:"POST",headers:{"Content-Type":"application/json",Authorization:e},body:JSON.stringify({amount:r,title:a})});const n=await t.json();if(t.ok){const o=confirm(`当前下载操作扣除东币数:${r},是否继续?`);if(o){l(s,i,c)}}else if(t.status===400&&n.message==="Insufficient coins."){alert(`您的东币数量不够!当前资源要求东币数:${r},您的东币数:${n.currentCoins||0}。`)}else if(t.status===400&&n.message==="Coin system not activated. Please activate your coin system."){alert("您还未激活东币系统,请前往激活!")}else if(t.status===404&&n.message==="User not found."){alert("未找到您的账户信息,请重新登录!");window.location.href="/submission"}else{alert(`下载失败:${n.message}`)}}catch(e){console.error("Error during download request:",e);alert("无法处理您的请求,请稍后重试。")}}else{l(s,i,c)}};const l=(e,t,n)=>{let o=3;const s=document.getElementById(t);const c=s.querySelector(".popup-content");if(client){let e=client.signatureUrl(n,{expires:20,response:{"content-disposition":"attachment"}});const i=e.replace("emberimg.oss-cn-beijing.aliyuncs.com","download.xn--xhq44jb2fzpc.com");const r=()=>{if(o>0){c.textContent=`${o}秒后将开始下载...`;o--;setTimeout(r,1e3)}else{s.style.display="none";window.location.href=i}};s.style.display="block";r()}else{console.error("OSS client is not initialized.")}};document.getElementById(s).addEventListener("click",e)});function getCurrentTime(){const e=new Date;const t=new Date(e.getTime()+8*60*60*1e3);return t.toISOString().replace("T"," ").substring(0,19)}
</script>
<hr>

View File

@ -488,7 +488,7 @@
<div class="popup-content">3秒后将开始下载...</div>
</div>
<script>
let client;function getCookie(t){const n=t+"=";const o=document.cookie.split(";");for(let e=0;e<o.length;e++){let t=o[e];while(t.charAt(0)==" ")t=t.substring(1,t.length);if(t.indexOf(n)==0)return t.substring(n.length,t.length)}return null}async function fetchNoCache(t){const e=(new Date).getTime();const n=`${t}?timestamp=${e}`;return fetch(n)}async function f1(){try{const t=await fetchNoCache("https://download.xn--xhq44jb2fzpc.com/upload/json/s.json");const e=await t.json();const n=e.masterKey;const o=CryptoJS.SHA256(n);const c={region:d2(e.encryptedRegion,o),accessKeyId:d2(e.encryptedKeyId,o),accessKeySecret:d2(e.encryptedKeySecret,o),bucket:d2(e.encryptedBucket,o)};client=new OSS(c)}catch(t){console.error("Failed to fetch or decrypt OSS config:",t)}}function d2(t,e){t=t.replace(/\s/g,"");const n=CryptoJS.enc.Base64.parse(t);const o=CryptoJS.lib.WordArray.create(n.words.slice(0,4));const c=CryptoJS.lib.WordArray.create(n.words.slice(4));const s=CryptoJS.AES.decrypt({ciphertext:c},e,{iv:o,mode:CryptoJS.mode.CBC,padding:CryptoJS.pad.Pkcs7});return s.toString(CryptoJS.enc.Utf8)}f1();document.addEventListener("DOMContentLoaded",function(){const s="download-1";const i="resources\/ba\/draft\/马工程《发展经济学》书.pdf";const r="popup-"+s;const a= 65 ;const l="《发展经济学》课本";const t=async()=>{await p();const t=d;if(!t){alert("请登录后下载!");window.location.href="/submission";return}if(a>0){const e=`https://download.xn--xhq44jb2fzpc.com/user/${t}/coin/list.json`;try{const n=await fetchNoCache(e);if(!n.ok){alert("您还未激活东币系统,请前往激活!");window.location.href="/submission";return}const o=await n.json();if(o.coins<a){alert(`您的东币数量不够当前资源要求东币数${a}您的东币数${o.coins}`);return}else{if(confirm(`当前下载操作花费${a}东币您的东币${o.coins}是否继续`)){o.coins-=a;o.transactions.push({type:"debit",amount:a,description:`下载资源:${l}`,date:getCurrentTime()});const c=new Blob([JSON.stringify(o)],{type:"application/json"});await client.put(`user/${t}/coin/list.json`,c);u(s,r,i)}}}catch(t){console.error("Error handling coins for download:",t);alert("无法处理您的请求请稍后重试")}}else{u(s,r,i)}};let d=null;const p=async()=>{if(d){return}const t=document.cookie.split("; ");const e=t.find(t=>t.startsWith("token="));const n=e?e.split("=")[1]:"";if(!n){console.error("未找到JWT信息");return}try{const o=await fetch("https://userlogin.xn--xhq44jb2fzpc.com/verifyToken",{method:"POST",headers:{"Content-Type":"application/json",Authorization:n}});const c=await o.json();if(o.ok&&c.email){d=c.email}else{console.error("JWT验证失败或未找到邮箱")}}catch(t){console.error("JWT验证时出错:",t)}};const u=(t,e,n)=>{let o=3;const c=document.getElementById(e);const s=c.querySelector(".popup-content");if(client){let t=client.signatureUrl(n,{expires:20,response:{"content-disposition":"attachment"}});const i=t.replace("emberimg.oss-cn-beijing.aliyuncs.com","download.xn--xhq44jb2fzpc.com");const r=()=>{if(o>0){s.textContent=`${o}秒后将开始下载...`;o--;setTimeout(r,1e3)}else{c.style.display="none";window.location.href=i}};c.style.display="block";r()}else{console.error("OSS client is not initialized.")}};document.getElementById(s).addEventListener("click",t)});function getCurrentTime(){const t=new Date;const e=new Date(t.getTime()+8*60*60*1e3);return e.toISOString().replace("T"," ").substring(0,19)}
let client;function getCookie(e){const n=e+"=";const o=document.cookie.split(";");for(let t=0;t<o.length;t++){let e=o[t];while(e.charAt(0)==" ")e=e.substring(1,e.length);if(e.indexOf(n)==0)return e.substring(n.length,e.length)}return null}async function fetchNoCache(e){const t=(new Date).getTime();const n=`${e}?timestamp=${t}`;return fetch(n)}async function f1(){try{const e=await fetchNoCache("https://download.xn--xhq44jb2fzpc.com/upload/json/s.json");const t=await e.json();const n=t.masterKey;const o=CryptoJS.SHA256(n);const s={region:d2(t.encryptedRegion,o),accessKeyId:d2(t.encryptedKeyId,o),accessKeySecret:d2(t.encryptedKeySecret,o),bucket:d2(t.encryptedBucket,o)};client=new OSS(s)}catch(e){console.error("Failed to fetch or decrypt OSS config:",e)}}function d2(e,t){e=e.replace(/\s/g,"");const n=CryptoJS.enc.Base64.parse(e);const o=CryptoJS.lib.WordArray.create(n.words.slice(0,4));const s=CryptoJS.lib.WordArray.create(n.words.slice(4));const c=CryptoJS.AES.decrypt({ciphertext:s},t,{iv:o,mode:CryptoJS.mode.CBC,padding:CryptoJS.pad.Pkcs7});return c.toString(CryptoJS.enc.Utf8)}f1();document.addEventListener("DOMContentLoaded",function(){const s="download-1";const c="resources\/ba\/draft\/马工程《发展经济学》书.pdf";const i="popup-"+s;const r= 65 ;const a="《发展经济学》课本";const e=async()=>{const e=getCookie("token");if(!e){alert("请登录后下载!");window.location.href="/submission";return}if(r>0){try{const t=await fetch("https://userlogin.xn--xhq44jb2fzpc.com/coin/download",{method:"POST",headers:{"Content-Type":"application/json",Authorization:e},body:JSON.stringify({amount:r,title:a})});const n=await t.json();if(t.ok){const o=confirm(`当前下载操作扣除东币数:${r},是否继续?`);if(o){l(s,i,c)}}else if(t.status===400&&n.message==="Insufficient coins."){alert(`您的东币数量不够!当前资源要求东币数:${r},您的东币数:${n.currentCoins||0}。`)}else if(t.status===400&&n.message==="Coin system not activated. Please activate your coin system."){alert("您还未激活东币系统,请前往激活!")}else if(t.status===404&&n.message==="User not found."){alert("未找到您的账户信息,请重新登录!");window.location.href="/submission"}else{alert(`下载失败:${n.message}`)}}catch(e){console.error("Error during download request:",e);alert("无法处理您的请求,请稍后重试。")}}else{l(s,i,c)}};const l=(e,t,n)=>{let o=3;const s=document.getElementById(t);const c=s.querySelector(".popup-content");if(client){let e=client.signatureUrl(n,{expires:20,response:{"content-disposition":"attachment"}});const i=e.replace("emberimg.oss-cn-beijing.aliyuncs.com","download.xn--xhq44jb2fzpc.com");const r=()=>{if(o>0){c.textContent=`${o}秒后将开始下载...`;o--;setTimeout(r,1e3)}else{s.style.display="none";window.location.href=i}};s.style.display="block";r()}else{console.error("OSS client is not initialized.")}};document.getElementById(s).addEventListener("click",e)});function getCurrentTime(){const e=new Date;const t=new Date(e.getTime()+8*60*60*1e3);return t.toISOString().replace("T"," ").substring(0,19)}
</script>
<hr>

View File

@ -488,7 +488,7 @@
<div class="popup-content">3秒后将开始下载...</div>
</div>
<script>
let client;function getCookie(t){const n=t+"=";const o=document.cookie.split(";");for(let e=0;e<o.length;e++){let t=o[e];while(t.charAt(0)==" ")t=t.substring(1,t.length);if(t.indexOf(n)==0)return t.substring(n.length,t.length)}return null}async function fetchNoCache(t){const e=(new Date).getTime();const n=`${t}?timestamp=${e}`;return fetch(n)}async function f1(){try{const t=await fetchNoCache("https://download.xn--xhq44jb2fzpc.com/upload/json/s.json");const e=await t.json();const n=e.masterKey;const o=CryptoJS.SHA256(n);const c={region:d2(e.encryptedRegion,o),accessKeyId:d2(e.encryptedKeyId,o),accessKeySecret:d2(e.encryptedKeySecret,o),bucket:d2(e.encryptedBucket,o)};client=new OSS(c)}catch(t){console.error("Failed to fetch or decrypt OSS config:",t)}}function d2(t,e){t=t.replace(/\s/g,"");const n=CryptoJS.enc.Base64.parse(t);const o=CryptoJS.lib.WordArray.create(n.words.slice(0,4));const c=CryptoJS.lib.WordArray.create(n.words.slice(4));const s=CryptoJS.AES.decrypt({ciphertext:c},e,{iv:o,mode:CryptoJS.mode.CBC,padding:CryptoJS.pad.Pkcs7});return s.toString(CryptoJS.enc.Utf8)}f1();document.addEventListener("DOMContentLoaded",function(){const s="download-1";const i="resources\/ba\/draft\/商务信息与管理.zip";const r="popup-"+s;const a= 15 ;const l="《商务信息与管理》PPT";const t=async()=>{await p();const t=d;if(!t){alert("请登录后下载!");window.location.href="/submission";return}if(a>0){const e=`https://download.xn--xhq44jb2fzpc.com/user/${t}/coin/list.json`;try{const n=await fetchNoCache(e);if(!n.ok){alert("您还未激活东币系统,请前往激活!");window.location.href="/submission";return}const o=await n.json();if(o.coins<a){alert(`您的东币数量不够当前资源要求东币数${a}您的东币数${o.coins}`);return}else{if(confirm(`当前下载操作花费${a}东币您的东币${o.coins}是否继续`)){o.coins-=a;o.transactions.push({type:"debit",amount:a,description:`下载资源:${l}`,date:getCurrentTime()});const c=new Blob([JSON.stringify(o)],{type:"application/json"});await client.put(`user/${t}/coin/list.json`,c);u(s,r,i)}}}catch(t){console.error("Error handling coins for download:",t);alert("无法处理您的请求请稍后重试")}}else{u(s,r,i)}};let d=null;const p=async()=>{if(d){return}const t=document.cookie.split("; ");const e=t.find(t=>t.startsWith("token="));const n=e?e.split("=")[1]:"";if(!n){console.error("未找到JWT信息");return}try{const o=await fetch("https://userlogin.xn--xhq44jb2fzpc.com/verifyToken",{method:"POST",headers:{"Content-Type":"application/json",Authorization:n}});const c=await o.json();if(o.ok&&c.email){d=c.email}else{console.error("JWT验证失败或未找到邮箱")}}catch(t){console.error("JWT验证时出错:",t)}};const u=(t,e,n)=>{let o=3;const c=document.getElementById(e);const s=c.querySelector(".popup-content");if(client){let t=client.signatureUrl(n,{expires:20,response:{"content-disposition":"attachment"}});const i=t.replace("emberimg.oss-cn-beijing.aliyuncs.com","download.xn--xhq44jb2fzpc.com");const r=()=>{if(o>0){s.textContent=`${o}秒后将开始下载...`;o--;setTimeout(r,1e3)}else{c.style.display="none";window.location.href=i}};c.style.display="block";r()}else{console.error("OSS client is not initialized.")}};document.getElementById(s).addEventListener("click",t)});function getCurrentTime(){const t=new Date;const e=new Date(t.getTime()+8*60*60*1e3);return e.toISOString().replace("T"," ").substring(0,19)}
let client;function getCookie(e){const n=e+"=";const o=document.cookie.split(";");for(let t=0;t<o.length;t++){let e=o[t];while(e.charAt(0)==" ")e=e.substring(1,e.length);if(e.indexOf(n)==0)return e.substring(n.length,e.length)}return null}async function fetchNoCache(e){const t=(new Date).getTime();const n=`${e}?timestamp=${t}`;return fetch(n)}async function f1(){try{const e=await fetchNoCache("https://download.xn--xhq44jb2fzpc.com/upload/json/s.json");const t=await e.json();const n=t.masterKey;const o=CryptoJS.SHA256(n);const s={region:d2(t.encryptedRegion,o),accessKeyId:d2(t.encryptedKeyId,o),accessKeySecret:d2(t.encryptedKeySecret,o),bucket:d2(t.encryptedBucket,o)};client=new OSS(s)}catch(e){console.error("Failed to fetch or decrypt OSS config:",e)}}function d2(e,t){e=e.replace(/\s/g,"");const n=CryptoJS.enc.Base64.parse(e);const o=CryptoJS.lib.WordArray.create(n.words.slice(0,4));const s=CryptoJS.lib.WordArray.create(n.words.slice(4));const c=CryptoJS.AES.decrypt({ciphertext:s},t,{iv:o,mode:CryptoJS.mode.CBC,padding:CryptoJS.pad.Pkcs7});return c.toString(CryptoJS.enc.Utf8)}f1();document.addEventListener("DOMContentLoaded",function(){const s="download-1";const c="resources\/ba\/draft\/商务信息与管理.zip";const i="popup-"+s;const r= 15 ;const a="《商务信息与管理》PPT";const e=async()=>{const e=getCookie("token");if(!e){alert("请登录后下载!");window.location.href="/submission";return}if(r>0){try{const t=await fetch("https://userlogin.xn--xhq44jb2fzpc.com/coin/download",{method:"POST",headers:{"Content-Type":"application/json",Authorization:e},body:JSON.stringify({amount:r,title:a})});const n=await t.json();if(t.ok){const o=confirm(`当前下载操作扣除东币数:${r},是否继续?`);if(o){l(s,i,c)}}else if(t.status===400&&n.message==="Insufficient coins."){alert(`您的东币数量不够!当前资源要求东币数:${r},您的东币数:${n.currentCoins||0}。`)}else if(t.status===400&&n.message==="Coin system not activated. Please activate your coin system."){alert("您还未激活东币系统,请前往激活!")}else if(t.status===404&&n.message==="User not found."){alert("未找到您的账户信息,请重新登录!");window.location.href="/submission"}else{alert(`下载失败:${n.message}`)}}catch(e){console.error("Error during download request:",e);alert("无法处理您的请求,请稍后重试。")}}else{l(s,i,c)}};const l=(e,t,n)=>{let o=3;const s=document.getElementById(t);const c=s.querySelector(".popup-content");if(client){let e=client.signatureUrl(n,{expires:20,response:{"content-disposition":"attachment"}});const i=e.replace("emberimg.oss-cn-beijing.aliyuncs.com","download.xn--xhq44jb2fzpc.com");const r=()=>{if(o>0){c.textContent=`${o}秒后将开始下载...`;o--;setTimeout(r,1e3)}else{s.style.display="none";window.location.href=i}};s.style.display="block";r()}else{console.error("OSS client is not initialized.")}};document.getElementById(s).addEventListener("click",e)});function getCurrentTime(){const e=new Date;const t=new Date(e.getTime()+8*60*60*1e3);return t.toISOString().replace("T"," ").substring(0,19)}
</script>
<hr>

View File

@ -488,7 +488,7 @@
<div class="popup-content">3秒后将开始下载...</div>
</div>
<script>
let client;function getCookie(t){const n=t+"=";const o=document.cookie.split(";");for(let e=0;e<o.length;e++){let t=o[e];while(t.charAt(0)==" ")t=t.substring(1,t.length);if(t.indexOf(n)==0)return t.substring(n.length,t.length)}return null}async function fetchNoCache(t){const e=(new Date).getTime();const n=`${t}?timestamp=${e}`;return fetch(n)}async function f1(){try{const t=await fetchNoCache("https://download.xn--xhq44jb2fzpc.com/upload/json/s.json");const e=await t.json();const n=e.masterKey;const o=CryptoJS.SHA256(n);const c={region:d2(e.encryptedRegion,o),accessKeyId:d2(e.encryptedKeyId,o),accessKeySecret:d2(e.encryptedKeySecret,o),bucket:d2(e.encryptedBucket,o)};client=new OSS(c)}catch(t){console.error("Failed to fetch or decrypt OSS config:",t)}}function d2(t,e){t=t.replace(/\s/g,"");const n=CryptoJS.enc.Base64.parse(t);const o=CryptoJS.lib.WordArray.create(n.words.slice(0,4));const c=CryptoJS.lib.WordArray.create(n.words.slice(4));const s=CryptoJS.AES.decrypt({ciphertext:c},e,{iv:o,mode:CryptoJS.mode.CBC,padding:CryptoJS.pad.Pkcs7});return s.toString(CryptoJS.enc.Utf8)}f1();document.addEventListener("DOMContentLoaded",function(){const s="download-1";const i="resources\/ba\/draft\/商务网站开发管理.zip";const r="popup-"+s;const a= 25 ;const l="《商务网站开发管理》PPT";const t=async()=>{await p();const t=d;if(!t){alert("请登录后下载!");window.location.href="/submission";return}if(a>0){const e=`https://download.xn--xhq44jb2fzpc.com/user/${t}/coin/list.json`;try{const n=await fetchNoCache(e);if(!n.ok){alert("您还未激活东币系统,请前往激活!");window.location.href="/submission";return}const o=await n.json();if(o.coins<a){alert(`您的东币数量不够当前资源要求东币数${a}您的东币数${o.coins}`);return}else{if(confirm(`当前下载操作花费${a}东币您的东币${o.coins}是否继续`)){o.coins-=a;o.transactions.push({type:"debit",amount:a,description:`下载资源:${l}`,date:getCurrentTime()});const c=new Blob([JSON.stringify(o)],{type:"application/json"});await client.put(`user/${t}/coin/list.json`,c);u(s,r,i)}}}catch(t){console.error("Error handling coins for download:",t);alert("无法处理您的请求请稍后重试")}}else{u(s,r,i)}};let d=null;const p=async()=>{if(d){return}const t=document.cookie.split("; ");const e=t.find(t=>t.startsWith("token="));const n=e?e.split("=")[1]:"";if(!n){console.error("未找到JWT信息");return}try{const o=await fetch("https://userlogin.xn--xhq44jb2fzpc.com/verifyToken",{method:"POST",headers:{"Content-Type":"application/json",Authorization:n}});const c=await o.json();if(o.ok&&c.email){d=c.email}else{console.error("JWT验证失败或未找到邮箱")}}catch(t){console.error("JWT验证时出错:",t)}};const u=(t,e,n)=>{let o=3;const c=document.getElementById(e);const s=c.querySelector(".popup-content");if(client){let t=client.signatureUrl(n,{expires:20,response:{"content-disposition":"attachment"}});const i=t.replace("emberimg.oss-cn-beijing.aliyuncs.com","download.xn--xhq44jb2fzpc.com");const r=()=>{if(o>0){s.textContent=`${o}秒后将开始下载...`;o--;setTimeout(r,1e3)}else{c.style.display="none";window.location.href=i}};c.style.display="block";r()}else{console.error("OSS client is not initialized.")}};document.getElementById(s).addEventListener("click",t)});function getCurrentTime(){const t=new Date;const e=new Date(t.getTime()+8*60*60*1e3);return e.toISOString().replace("T"," ").substring(0,19)}
let client;function getCookie(e){const n=e+"=";const o=document.cookie.split(";");for(let t=0;t<o.length;t++){let e=o[t];while(e.charAt(0)==" ")e=e.substring(1,e.length);if(e.indexOf(n)==0)return e.substring(n.length,e.length)}return null}async function fetchNoCache(e){const t=(new Date).getTime();const n=`${e}?timestamp=${t}`;return fetch(n)}async function f1(){try{const e=await fetchNoCache("https://download.xn--xhq44jb2fzpc.com/upload/json/s.json");const t=await e.json();const n=t.masterKey;const o=CryptoJS.SHA256(n);const s={region:d2(t.encryptedRegion,o),accessKeyId:d2(t.encryptedKeyId,o),accessKeySecret:d2(t.encryptedKeySecret,o),bucket:d2(t.encryptedBucket,o)};client=new OSS(s)}catch(e){console.error("Failed to fetch or decrypt OSS config:",e)}}function d2(e,t){e=e.replace(/\s/g,"");const n=CryptoJS.enc.Base64.parse(e);const o=CryptoJS.lib.WordArray.create(n.words.slice(0,4));const s=CryptoJS.lib.WordArray.create(n.words.slice(4));const c=CryptoJS.AES.decrypt({ciphertext:s},t,{iv:o,mode:CryptoJS.mode.CBC,padding:CryptoJS.pad.Pkcs7});return c.toString(CryptoJS.enc.Utf8)}f1();document.addEventListener("DOMContentLoaded",function(){const s="download-1";const c="resources\/ba\/draft\/商务网站开发管理.zip";const i="popup-"+s;const r= 25 ;const a="《商务网站开发管理》PPT";const e=async()=>{const e=getCookie("token");if(!e){alert("请登录后下载!");window.location.href="/submission";return}if(r>0){try{const t=await fetch("https://userlogin.xn--xhq44jb2fzpc.com/coin/download",{method:"POST",headers:{"Content-Type":"application/json",Authorization:e},body:JSON.stringify({amount:r,title:a})});const n=await t.json();if(t.ok){const o=confirm(`当前下载操作扣除东币数:${r},是否继续?`);if(o){l(s,i,c)}}else if(t.status===400&&n.message==="Insufficient coins."){alert(`您的东币数量不够!当前资源要求东币数:${r},您的东币数:${n.currentCoins||0}。`)}else if(t.status===400&&n.message==="Coin system not activated. Please activate your coin system."){alert("您还未激活东币系统,请前往激活!")}else if(t.status===404&&n.message==="User not found."){alert("未找到您的账户信息,请重新登录!");window.location.href="/submission"}else{alert(`下载失败:${n.message}`)}}catch(e){console.error("Error during download request:",e);alert("无法处理您的请求,请稍后重试。")}}else{l(s,i,c)}};const l=(e,t,n)=>{let o=3;const s=document.getElementById(t);const c=s.querySelector(".popup-content");if(client){let e=client.signatureUrl(n,{expires:20,response:{"content-disposition":"attachment"}});const i=e.replace("emberimg.oss-cn-beijing.aliyuncs.com","download.xn--xhq44jb2fzpc.com");const r=()=>{if(o>0){c.textContent=`${o}秒后将开始下载...`;o--;setTimeout(r,1e3)}else{s.style.display="none";window.location.href=i}};s.style.display="block";r()}else{console.error("OSS client is not initialized.")}};document.getElementById(s).addEventListener("click",e)});function getCurrentTime(){const e=new Date;const t=new Date(e.getTime()+8*60*60*1e3);return t.toISOString().replace("T"," ").substring(0,19)}
</script>
<hr>

View File

@ -488,7 +488,7 @@
<div class="popup-content">3秒后将开始下载...</div>
</div>
<script>
let client;function getCookie(t){const n=t+"=";const o=document.cookie.split(";");for(let e=0;e<o.length;e++){let t=o[e];while(t.charAt(0)==" ")t=t.substring(1,t.length);if(t.indexOf(n)==0)return t.substring(n.length,t.length)}return null}async function fetchNoCache(t){const e=(new Date).getTime();const n=`${t}?timestamp=${e}`;return fetch(n)}async function f1(){try{const t=await fetchNoCache("https://download.xn--xhq44jb2fzpc.com/upload/json/s.json");const e=await t.json();const n=e.masterKey;const o=CryptoJS.SHA256(n);const c={region:d2(e.encryptedRegion,o),accessKeyId:d2(e.encryptedKeyId,o),accessKeySecret:d2(e.encryptedKeySecret,o),bucket:d2(e.encryptedBucket,o)};client=new OSS(c)}catch(t){console.error("Failed to fetch or decrypt OSS config:",t)}}function d2(t,e){t=t.replace(/\s/g,"");const n=CryptoJS.enc.Base64.parse(t);const o=CryptoJS.lib.WordArray.create(n.words.slice(0,4));const c=CryptoJS.lib.WordArray.create(n.words.slice(4));const s=CryptoJS.AES.decrypt({ciphertext:c},e,{iv:o,mode:CryptoJS.mode.CBC,padding:CryptoJS.pad.Pkcs7});return s.toString(CryptoJS.enc.Utf8)}f1();document.addEventListener("DOMContentLoaded",function(){const s="download-1";const i="resources\/ba\/draft\/国际贸易.rar";const r="popup-"+s;const a= 15 ;const l="《国际贸易》PPT";const t=async()=>{await p();const t=d;if(!t){alert("请登录后下载!");window.location.href="/submission";return}if(a>0){const e=`https://download.xn--xhq44jb2fzpc.com/user/${t}/coin/list.json`;try{const n=await fetchNoCache(e);if(!n.ok){alert("您还未激活东币系统,请前往激活!");window.location.href="/submission";return}const o=await n.json();if(o.coins<a){alert(`您的东币数量不够当前资源要求东币数${a}您的东币数${o.coins}`);return}else{if(confirm(`当前下载操作花费${a}东币您的东币${o.coins}是否继续`)){o.coins-=a;o.transactions.push({type:"debit",amount:a,description:`下载资源:${l}`,date:getCurrentTime()});const c=new Blob([JSON.stringify(o)],{type:"application/json"});await client.put(`user/${t}/coin/list.json`,c);u(s,r,i)}}}catch(t){console.error("Error handling coins for download:",t);alert("无法处理您的请求请稍后重试")}}else{u(s,r,i)}};let d=null;const p=async()=>{if(d){return}const t=document.cookie.split("; ");const e=t.find(t=>t.startsWith("token="));const n=e?e.split("=")[1]:"";if(!n){console.error("未找到JWT信息");return}try{const o=await fetch("https://userlogin.xn--xhq44jb2fzpc.com/verifyToken",{method:"POST",headers:{"Content-Type":"application/json",Authorization:n}});const c=await o.json();if(o.ok&&c.email){d=c.email}else{console.error("JWT验证失败或未找到邮箱")}}catch(t){console.error("JWT验证时出错:",t)}};const u=(t,e,n)=>{let o=3;const c=document.getElementById(e);const s=c.querySelector(".popup-content");if(client){let t=client.signatureUrl(n,{expires:20,response:{"content-disposition":"attachment"}});const i=t.replace("emberimg.oss-cn-beijing.aliyuncs.com","download.xn--xhq44jb2fzpc.com");const r=()=>{if(o>0){s.textContent=`${o}秒后将开始下载...`;o--;setTimeout(r,1e3)}else{c.style.display="none";window.location.href=i}};c.style.display="block";r()}else{console.error("OSS client is not initialized.")}};document.getElementById(s).addEventListener("click",t)});function getCurrentTime(){const t=new Date;const e=new Date(t.getTime()+8*60*60*1e3);return e.toISOString().replace("T"," ").substring(0,19)}
let client;function getCookie(e){const n=e+"=";const o=document.cookie.split(";");for(let t=0;t<o.length;t++){let e=o[t];while(e.charAt(0)==" ")e=e.substring(1,e.length);if(e.indexOf(n)==0)return e.substring(n.length,e.length)}return null}async function fetchNoCache(e){const t=(new Date).getTime();const n=`${e}?timestamp=${t}`;return fetch(n)}async function f1(){try{const e=await fetchNoCache("https://download.xn--xhq44jb2fzpc.com/upload/json/s.json");const t=await e.json();const n=t.masterKey;const o=CryptoJS.SHA256(n);const s={region:d2(t.encryptedRegion,o),accessKeyId:d2(t.encryptedKeyId,o),accessKeySecret:d2(t.encryptedKeySecret,o),bucket:d2(t.encryptedBucket,o)};client=new OSS(s)}catch(e){console.error("Failed to fetch or decrypt OSS config:",e)}}function d2(e,t){e=e.replace(/\s/g,"");const n=CryptoJS.enc.Base64.parse(e);const o=CryptoJS.lib.WordArray.create(n.words.slice(0,4));const s=CryptoJS.lib.WordArray.create(n.words.slice(4));const c=CryptoJS.AES.decrypt({ciphertext:s},t,{iv:o,mode:CryptoJS.mode.CBC,padding:CryptoJS.pad.Pkcs7});return c.toString(CryptoJS.enc.Utf8)}f1();document.addEventListener("DOMContentLoaded",function(){const s="download-1";const c="resources\/ba\/draft\/国际贸易.rar";const i="popup-"+s;const r= 15 ;const a="《国际贸易》PPT";const e=async()=>{const e=getCookie("token");if(!e){alert("请登录后下载!");window.location.href="/submission";return}if(r>0){try{const t=await fetch("https://userlogin.xn--xhq44jb2fzpc.com/coin/download",{method:"POST",headers:{"Content-Type":"application/json",Authorization:e},body:JSON.stringify({amount:r,title:a})});const n=await t.json();if(t.ok){const o=confirm(`当前下载操作扣除东币数:${r},是否继续?`);if(o){l(s,i,c)}}else if(t.status===400&&n.message==="Insufficient coins."){alert(`您的东币数量不够!当前资源要求东币数:${r},您的东币数:${n.currentCoins||0}。`)}else if(t.status===400&&n.message==="Coin system not activated. Please activate your coin system."){alert("您还未激活东币系统,请前往激活!")}else if(t.status===404&&n.message==="User not found."){alert("未找到您的账户信息,请重新登录!");window.location.href="/submission"}else{alert(`下载失败:${n.message}`)}}catch(e){console.error("Error during download request:",e);alert("无法处理您的请求,请稍后重试。")}}else{l(s,i,c)}};const l=(e,t,n)=>{let o=3;const s=document.getElementById(t);const c=s.querySelector(".popup-content");if(client){let e=client.signatureUrl(n,{expires:20,response:{"content-disposition":"attachment"}});const i=e.replace("emberimg.oss-cn-beijing.aliyuncs.com","download.xn--xhq44jb2fzpc.com");const r=()=>{if(o>0){c.textContent=`${o}秒后将开始下载...`;o--;setTimeout(r,1e3)}else{s.style.display="none";window.location.href=i}};s.style.display="block";r()}else{console.error("OSS client is not initialized.")}};document.getElementById(s).addEventListener("click",e)});function getCurrentTime(){const e=new Date;const t=new Date(e.getTime()+8*60*60*1e3);return t.toISOString().replace("T"," ").substring(0,19)}
</script>
<hr>

View File

@ -488,7 +488,7 @@
<div class="popup-content">3秒后将开始下载...</div>
</div>
<script>
let client;function getCookie(t){const n=t+"=";const o=document.cookie.split(";");for(let e=0;e<o.length;e++){let t=o[e];while(t.charAt(0)==" ")t=t.substring(1,t.length);if(t.indexOf(n)==0)return t.substring(n.length,t.length)}return null}async function fetchNoCache(t){const e=(new Date).getTime();const n=`${t}?timestamp=${e}`;return fetch(n)}async function f1(){try{const t=await fetchNoCache("https://download.xn--xhq44jb2fzpc.com/upload/json/s.json");const e=await t.json();const n=e.masterKey;const o=CryptoJS.SHA256(n);const c={region:d2(e.encryptedRegion,o),accessKeyId:d2(e.encryptedKeyId,o),accessKeySecret:d2(e.encryptedKeySecret,o),bucket:d2(e.encryptedBucket,o)};client=new OSS(c)}catch(t){console.error("Failed to fetch or decrypt OSS config:",t)}}function d2(t,e){t=t.replace(/\s/g,"");const n=CryptoJS.enc.Base64.parse(t);const o=CryptoJS.lib.WordArray.create(n.words.slice(0,4));const c=CryptoJS.lib.WordArray.create(n.words.slice(4));const s=CryptoJS.AES.decrypt({ciphertext:c},e,{iv:o,mode:CryptoJS.mode.CBC,padding:CryptoJS.pad.Pkcs7});return s.toString(CryptoJS.enc.Utf8)}f1();document.addEventListener("DOMContentLoaded",function(){const s="download-1";const i="resources\/ba\/draft\/(国际贸易课本)克鲁格曼国际经济学.pdf";const r="popup-"+s;const a= 7 ;const l="《国际贸易》课本";const t=async()=>{await p();const t=d;if(!t){alert("请登录后下载!");window.location.href="/submission";return}if(a>0){const e=`https://download.xn--xhq44jb2fzpc.com/user/${t}/coin/list.json`;try{const n=await fetchNoCache(e);if(!n.ok){alert("您还未激活东币系统,请前往激活!");window.location.href="/submission";return}const o=await n.json();if(o.coins<a){alert(`您的东币数量不够当前资源要求东币数${a}您的东币数${o.coins}`);return}else{if(confirm(`当前下载操作花费${a}东币您的东币${o.coins}是否继续`)){o.coins-=a;o.transactions.push({type:"debit",amount:a,description:`下载资源:${l}`,date:getCurrentTime()});const c=new Blob([JSON.stringify(o)],{type:"application/json"});await client.put(`user/${t}/coin/list.json`,c);u(s,r,i)}}}catch(t){console.error("Error handling coins for download:",t);alert("无法处理您的请求请稍后重试")}}else{u(s,r,i)}};let d=null;const p=async()=>{if(d){return}const t=document.cookie.split("; ");const e=t.find(t=>t.startsWith("token="));const n=e?e.split("=")[1]:"";if(!n){console.error("未找到JWT信息");return}try{const o=await fetch("https://userlogin.xn--xhq44jb2fzpc.com/verifyToken",{method:"POST",headers:{"Content-Type":"application/json",Authorization:n}});const c=await o.json();if(o.ok&&c.email){d=c.email}else{console.error("JWT验证失败或未找到邮箱")}}catch(t){console.error("JWT验证时出错:",t)}};const u=(t,e,n)=>{let o=3;const c=document.getElementById(e);const s=c.querySelector(".popup-content");if(client){let t=client.signatureUrl(n,{expires:20,response:{"content-disposition":"attachment"}});const i=t.replace("emberimg.oss-cn-beijing.aliyuncs.com","download.xn--xhq44jb2fzpc.com");const r=()=>{if(o>0){s.textContent=`${o}秒后将开始下载...`;o--;setTimeout(r,1e3)}else{c.style.display="none";window.location.href=i}};c.style.display="block";r()}else{console.error("OSS client is not initialized.")}};document.getElementById(s).addEventListener("click",t)});function getCurrentTime(){const t=new Date;const e=new Date(t.getTime()+8*60*60*1e3);return e.toISOString().replace("T"," ").substring(0,19)}
let client;function getCookie(e){const n=e+"=";const o=document.cookie.split(";");for(let t=0;t<o.length;t++){let e=o[t];while(e.charAt(0)==" ")e=e.substring(1,e.length);if(e.indexOf(n)==0)return e.substring(n.length,e.length)}return null}async function fetchNoCache(e){const t=(new Date).getTime();const n=`${e}?timestamp=${t}`;return fetch(n)}async function f1(){try{const e=await fetchNoCache("https://download.xn--xhq44jb2fzpc.com/upload/json/s.json");const t=await e.json();const n=t.masterKey;const o=CryptoJS.SHA256(n);const s={region:d2(t.encryptedRegion,o),accessKeyId:d2(t.encryptedKeyId,o),accessKeySecret:d2(t.encryptedKeySecret,o),bucket:d2(t.encryptedBucket,o)};client=new OSS(s)}catch(e){console.error("Failed to fetch or decrypt OSS config:",e)}}function d2(e,t){e=e.replace(/\s/g,"");const n=CryptoJS.enc.Base64.parse(e);const o=CryptoJS.lib.WordArray.create(n.words.slice(0,4));const s=CryptoJS.lib.WordArray.create(n.words.slice(4));const c=CryptoJS.AES.decrypt({ciphertext:s},t,{iv:o,mode:CryptoJS.mode.CBC,padding:CryptoJS.pad.Pkcs7});return c.toString(CryptoJS.enc.Utf8)}f1();document.addEventListener("DOMContentLoaded",function(){const s="download-1";const c="resources\/ba\/draft\/(国际贸易课本)克鲁格曼国际经济学.pdf";const i="popup-"+s;const r= 7 ;const a="《国际贸易》课本";const e=async()=>{const e=getCookie("token");if(!e){alert("请登录后下载!");window.location.href="/submission";return}if(r>0){try{const t=await fetch("https://userlogin.xn--xhq44jb2fzpc.com/coin/download",{method:"POST",headers:{"Content-Type":"application/json",Authorization:e},body:JSON.stringify({amount:r,title:a})});const n=await t.json();if(t.ok){const o=confirm(`当前下载操作扣除东币数:${r},是否继续?`);if(o){l(s,i,c)}}else if(t.status===400&&n.message==="Insufficient coins."){alert(`您的东币数量不够!当前资源要求东币数:${r},您的东币数:${n.currentCoins||0}。`)}else if(t.status===400&&n.message==="Coin system not activated. Please activate your coin system."){alert("您还未激活东币系统,请前往激活!")}else if(t.status===404&&n.message==="User not found."){alert("未找到您的账户信息,请重新登录!");window.location.href="/submission"}else{alert(`下载失败:${n.message}`)}}catch(e){console.error("Error during download request:",e);alert("无法处理您的请求,请稍后重试。")}}else{l(s,i,c)}};const l=(e,t,n)=>{let o=3;const s=document.getElementById(t);const c=s.querySelector(".popup-content");if(client){let e=client.signatureUrl(n,{expires:20,response:{"content-disposition":"attachment"}});const i=e.replace("emberimg.oss-cn-beijing.aliyuncs.com","download.xn--xhq44jb2fzpc.com");const r=()=>{if(o>0){c.textContent=`${o}秒后将开始下载...`;o--;setTimeout(r,1e3)}else{s.style.display="none";window.location.href=i}};s.style.display="block";r()}else{console.error("OSS client is not initialized.")}};document.getElementById(s).addEventListener("click",e)});function getCurrentTime(){const e=new Date;const t=new Date(e.getTime()+8*60*60*1e3);return t.toISOString().replace("T"," ").substring(0,19)}
</script>
<hr>

View File

@ -488,7 +488,7 @@
<div class="popup-content">3秒后将开始下载...</div>
</div>
<script>
let client;function getCookie(t){const n=t+"=";const o=document.cookie.split(";");for(let e=0;e<o.length;e++){let t=o[e];while(t.charAt(0)==" ")t=t.substring(1,t.length);if(t.indexOf(n)==0)return t.substring(n.length,t.length)}return null}async function fetchNoCache(t){const e=(new Date).getTime();const n=`${t}?timestamp=${e}`;return fetch(n)}async function f1(){try{const t=await fetchNoCache("https://download.xn--xhq44jb2fzpc.com/upload/json/s.json");const e=await t.json();const n=e.masterKey;const o=CryptoJS.SHA256(n);const c={region:d2(e.encryptedRegion,o),accessKeyId:d2(e.encryptedKeyId,o),accessKeySecret:d2(e.encryptedKeySecret,o),bucket:d2(e.encryptedBucket,o)};client=new OSS(c)}catch(t){console.error("Failed to fetch or decrypt OSS config:",t)}}function d2(t,e){t=t.replace(/\s/g,"");const n=CryptoJS.enc.Base64.parse(t);const o=CryptoJS.lib.WordArray.create(n.words.slice(0,4));const c=CryptoJS.lib.WordArray.create(n.words.slice(4));const s=CryptoJS.AES.decrypt({ciphertext:c},e,{iv:o,mode:CryptoJS.mode.CBC,padding:CryptoJS.pad.Pkcs7});return s.toString(CryptoJS.enc.Utf8)}f1();document.addEventListener("DOMContentLoaded",function(){const s="download-1";const i="resources\/ba\/draft\/国际金融市场 价格与政策 原书第2版.pdf";const r="popup-"+s;const a= 7 ;const l="《国际金融市场 价格与政策》原书第2版";const t=async()=>{await p();const t=d;if(!t){alert("请登录后下载!");window.location.href="/submission";return}if(a>0){const e=`https://download.xn--xhq44jb2fzpc.com/user/${t}/coin/list.json`;try{const n=await fetchNoCache(e);if(!n.ok){alert("您还未激活东币系统,请前往激活!");window.location.href="/submission";return}const o=await n.json();if(o.coins<a){alert(`您的东币数量不够当前资源要求东币数${a}您的东币数${o.coins}`);return}else{if(confirm(`当前下载操作花费${a}东币您的东币${o.coins}是否继续`)){o.coins-=a;o.transactions.push({type:"debit",amount:a,description:`下载资源:${l}`,date:getCurrentTime()});const c=new Blob([JSON.stringify(o)],{type:"application/json"});await client.put(`user/${t}/coin/list.json`,c);u(s,r,i)}}}catch(t){console.error("Error handling coins for download:",t);alert("无法处理您的请求请稍后重试")}}else{u(s,r,i)}};let d=null;const p=async()=>{if(d){return}const t=document.cookie.split("; ");const e=t.find(t=>t.startsWith("token="));const n=e?e.split("=")[1]:"";if(!n){console.error("未找到JWT信息");return}try{const o=await fetch("https://userlogin.xn--xhq44jb2fzpc.com/verifyToken",{method:"POST",headers:{"Content-Type":"application/json",Authorization:n}});const c=await o.json();if(o.ok&&c.email){d=c.email}else{console.error("JWT验证失败或未找到邮箱")}}catch(t){console.error("JWT验证时出错:",t)}};const u=(t,e,n)=>{let o=3;const c=document.getElementById(e);const s=c.querySelector(".popup-content");if(client){let t=client.signatureUrl(n,{expires:20,response:{"content-disposition":"attachment"}});const i=t.replace("emberimg.oss-cn-beijing.aliyuncs.com","download.xn--xhq44jb2fzpc.com");const r=()=>{if(o>0){s.textContent=`${o}秒后将开始下载...`;o--;setTimeout(r,1e3)}else{c.style.display="none";window.location.href=i}};c.style.display="block";r()}else{console.error("OSS client is not initialized.")}};document.getElementById(s).addEventListener("click",t)});function getCurrentTime(){const t=new Date;const e=new Date(t.getTime()+8*60*60*1e3);return e.toISOString().replace("T"," ").substring(0,19)}
let client;function getCookie(e){const n=e+"=";const o=document.cookie.split(";");for(let t=0;t<o.length;t++){let e=o[t];while(e.charAt(0)==" ")e=e.substring(1,e.length);if(e.indexOf(n)==0)return e.substring(n.length,e.length)}return null}async function fetchNoCache(e){const t=(new Date).getTime();const n=`${e}?timestamp=${t}`;return fetch(n)}async function f1(){try{const e=await fetchNoCache("https://download.xn--xhq44jb2fzpc.com/upload/json/s.json");const t=await e.json();const n=t.masterKey;const o=CryptoJS.SHA256(n);const s={region:d2(t.encryptedRegion,o),accessKeyId:d2(t.encryptedKeyId,o),accessKeySecret:d2(t.encryptedKeySecret,o),bucket:d2(t.encryptedBucket,o)};client=new OSS(s)}catch(e){console.error("Failed to fetch or decrypt OSS config:",e)}}function d2(e,t){e=e.replace(/\s/g,"");const n=CryptoJS.enc.Base64.parse(e);const o=CryptoJS.lib.WordArray.create(n.words.slice(0,4));const s=CryptoJS.lib.WordArray.create(n.words.slice(4));const c=CryptoJS.AES.decrypt({ciphertext:s},t,{iv:o,mode:CryptoJS.mode.CBC,padding:CryptoJS.pad.Pkcs7});return c.toString(CryptoJS.enc.Utf8)}f1();document.addEventListener("DOMContentLoaded",function(){const s="download-1";const c="resources\/ba\/draft\/国际金融市场 价格与政策 原书第2版.pdf";const i="popup-"+s;const r= 7 ;const a="《国际金融市场 价格与政策》原书第2版";const e=async()=>{const e=getCookie("token");if(!e){alert("请登录后下载!");window.location.href="/submission";return}if(r>0){try{const t=await fetch("https://userlogin.xn--xhq44jb2fzpc.com/coin/download",{method:"POST",headers:{"Content-Type":"application/json",Authorization:e},body:JSON.stringify({amount:r,title:a})});const n=await t.json();if(t.ok){const o=confirm(`当前下载操作扣除东币数:${r},是否继续?`);if(o){l(s,i,c)}}else if(t.status===400&&n.message==="Insufficient coins."){alert(`您的东币数量不够!当前资源要求东币数:${r},您的东币数:${n.currentCoins||0}。`)}else if(t.status===400&&n.message==="Coin system not activated. Please activate your coin system."){alert("您还未激活东币系统,请前往激活!")}else if(t.status===404&&n.message==="User not found."){alert("未找到您的账户信息,请重新登录!");window.location.href="/submission"}else{alert(`下载失败:${n.message}`)}}catch(e){console.error("Error during download request:",e);alert("无法处理您的请求,请稍后重试。")}}else{l(s,i,c)}};const l=(e,t,n)=>{let o=3;const s=document.getElementById(t);const c=s.querySelector(".popup-content");if(client){let e=client.signatureUrl(n,{expires:20,response:{"content-disposition":"attachment"}});const i=e.replace("emberimg.oss-cn-beijing.aliyuncs.com","download.xn--xhq44jb2fzpc.com");const r=()=>{if(o>0){c.textContent=`${o}秒后将开始下载...`;o--;setTimeout(r,1e3)}else{s.style.display="none";window.location.href=i}};s.style.display="block";r()}else{console.error("OSS client is not initialized.")}};document.getElementById(s).addEventListener("click",e)});function getCurrentTime(){const e=new Date;const t=new Date(e.getTime()+8*60*60*1e3);return t.toISOString().replace("T"," ").substring(0,19)}
</script>
<hr>

Some files were not shown because too many files have changed in this diff Show More