Browse Source

修改邮件模板、解除当日次数限制

Pchen. 3 months ago
parent
commit
59b90c5697
2 changed files with 4 additions and 102 deletions
  1. 3 3
      lib/Lepao/cg_lepao.js
  2. 1 99
      plugin/Email/emailTemplate.js

+ 3 - 3
lib/Lepao/cg_lepao.js

@@ -150,9 +150,9 @@ class cgLepao {
             this.logger.info(`${account}开始执行乐跑流程`)
             this.logger.info(`${account}开始执行乐跑流程`)
 
 
             // 检查redis是否存在当天乐跑成功记录
             // 检查redis是否存在当天乐跑成功记录
-            const isSuccess = await Redis.get(`cgLepaoSuccess:${account}`)
-            if (isSuccess)
-                throw new Error('该账号当天已存在成功乐跑记录')
+            // const isSuccess = await Redis.get(`cgLepaoSuccess:${account}`)
+            // if (isSuccess)
+            //     throw new Error('该账号当天已存在成功乐跑记录')
             const isProgress = await Redis.get(`cgLepaoProgress:${account}`)
             const isProgress = await Redis.get(`cgLepaoProgress:${account}`)
             if (isProgress)
             if (isProgress)
                 throw new Error('该账号已进入乐跑任务队列,请等待乐跑完成后再进行乐跑操作')
                 throw new Error('该账号已进入乐跑任务队列,请等待乐跑完成后再进行乐跑操作')

+ 1 - 99
plugin/Email/emailTemplate.js

@@ -177,102 +177,6 @@ class emailTemplate {
         )
         )
     }
     }
 
 
-    async updateSuccess(email, data) {
-        await sendEmail(email, '乐跑账号更新成功提醒',
-            `<html lang="zh-CN">
-            <head>
-                <meta charset="UTF-8">
-                <meta name="viewport" content="width=device-width, initial-scale=1.0">
-                <title>RunForge - 乐跑账号更新成功提醒</title>
-                <style>
-                    body {
-                        font-family: Arial, sans-serif;
-                        background-color: #f4f4f4;
-                        margin: 0;
-                        padding: 0;
-                    }
-
-                    .container {
-                        width: 80%;
-                        margin: 20px auto;
-                        background-color: #fff;
-                        padding: 20px;
-                        border-radius: 8px;
-                        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
-                    }
-
-                    .head {
-                        display: flex;
-                        justify-content: center;
-                        align-items: center;
-                        gap: 10px;
-                        color: #2c3e50;
-                    }
-
-                    p {
-                        font-size: 16px;
-                        color: #34495e;
-                        line-height: 1.6;
-                        text-indent: 2em;
-                    }
-
-                    .info {
-                        background-color: #ecf0f1;
-                        padding: 15px;
-                        border-radius: 5px;
-                        margin: 20px 0;
-                    }
-
-                    .info p {
-                        margin: 5px 0;
-                    }
-
-                    .important {
-                        color: #e74c3c;
-                        font-weight: bold;
-                    }
-
-                    .footer {
-                        font-size: 14px;
-                        text-align: center;
-                        color: #7f8c8d;
-                        margin-top: 50px;
-                    }
-                </style>
-            </head>
-
-            <body>
-            <div class="container">
-                <div class="head">
-                <h2>RunForge - 乐跑账号更新好啦,宝宝快看看~ 🎉💖✨</h2>
-                </div>
-
-                <p>亲爱的 ${data.name} 宝宝 🌸:</p>
-                <p>嘻嘻~ 你已经成功更新了乐跑账号的登录信息啦 🥰💌:</p>
-
-                <div class="info">
-                <p><strong>学号:</strong> ${data.account} 🎓</p>
-                <p><strong>年级:</strong> ${data.grade_id} 📚</p>
-                <p><strong>学院:</strong> ${data.academy_name} 🏫</p>
-                <p><strong>更新时间:</strong> ${this.stramptoTime(new Date().getTime())} ⏰</p>
-                </div>
-
-                <p class="important">
-                ${data.auto_run === 0
-                ? '现在还没有帮宝宝开启自动乐跑呢 🐾💦 如果想要开始跑跑的话,记得登录后去RunForge手动点一下哦~ 🌈💕'
-                : '已经为宝宝开启了自动乐跑啦 🏃‍♀️✨ 登录后系统会乖乖替你完成乐跑 💖 记得留意邮箱提醒哟~ 📬'}
-                </p>
-                <p class="important">宝宝要记得不要在其他设备上登录“智慧体育”小程序哦 🚫📱,不然会失效,到时候又要重新登录啦 😢💦~</p>
-                <p class="important">有问题随时喊RunForge客服小可爱呀 💕💌 我们都会耐心陪宝宝解决的哟 ✨🥰</p>
-
-                <p class="footer">Copyright © 2025 RunForge 🌟</p>
-            </div>
-            </body>
-
-            </html>`
-        )
-    }
-
     async lepaoOver(email, data) {
     async lepaoOver(email, data) {
         await sendEmail(email, '🎉乐跑完成祝贺',
         await sendEmail(email, '🎉乐跑完成祝贺',
             `<!DOCTYPE html>
             `<!DOCTYPE html>
@@ -460,7 +364,6 @@ class emailTemplate {
                 <p><strong>结束时间:</strong> ${data.endTime} 💨</p>
                 <p><strong>结束时间:</strong> ${data.endTime} 💨</p>
                 </div>
                 </div>
 
 
-                <p class="important">如果宝宝开启了自动乐跑,要记得不要在其他设备上登录“智慧体育”小程序哦 🚫📱,不然登录就会失效,要重新来一次啦~</p>
                 <p class="important">有问题随时找RunForge客服小可爱呀 💌 我们会陪你耐心解决的~</p>
                 <p class="important">有问题随时找RunForge客服小可爱呀 💌 我们会陪你耐心解决的~</p>
                 <p class="footer">Copyright © 2025 RunForge ✨</p>
                 <p class="footer">Copyright © 2025 RunForge ✨</p>
             </div>
             </div>
@@ -551,8 +454,7 @@ class emailTemplate {
                     <p><strong>失败原因:</strong> ${data.reason} 😭</p>
                     <p><strong>失败原因:</strong> ${data.reason} 😭</p>
                     </div>
                     </div>
 
 
-                    <p class="important">宝宝如果是登录失效的话 🥺✨,要记得重新启动RunForge乐跑登录器,再登录“智慧体育”小程序就可以啦 💕</p>
-                    <p class="important">如果还是不懂,随时可以来找RunForge客服小可爱哟 💌 我们会耐心陪宝宝解决问题的 🌈🥰</p>
+                    <p class="important">宝宝随时可以来找RunForge客服小可爱哟 💌 我们会耐心陪宝宝解决问题的 🌈🥰</p>
 
 
                     <p class="footer">Copyright © 2025 RunForge 💖</p>
                     <p class="footer">Copyright © 2025 RunForge 💖</p>
                 </div>
                 </div>