|
|
@@ -670,6 +670,264 @@ class emailTemplate {
|
|
|
)
|
|
|
}
|
|
|
|
|
|
+ async sendCountRequestNotifyAdmins(email, data) {
|
|
|
+ await sendEmail(email, 'RunForge - 赠送次数待审核提醒',
|
|
|
+ `<html lang="zh-CN">
|
|
|
+ <head>
|
|
|
+ <meta charset="UTF-8">
|
|
|
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
+ <title>赠送次数待审核提醒</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;
|
|
|
+ text-indent: 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>赠送次数待审核提醒</h2>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <p>尊敬的管理员:</p>
|
|
|
+ <p>系统收到一条新的赠送次数申请,请及时审核处理:</p>
|
|
|
+ <div class="info">
|
|
|
+ <p><strong>申请ID:</strong> ${data.requestId}</p>
|
|
|
+ <p><strong>赠送人:</strong> ${data.senderUsername}</p>
|
|
|
+ <p><strong>接收人:</strong> ${data.receiverUsername}</p>
|
|
|
+ <p><strong>赠送次数:</strong> ${data.count}</p>
|
|
|
+ <p><strong>申请时间:</strong> ${this.stramptoTime(data.createTime)}</p>
|
|
|
+ </div>
|
|
|
+ <p class="important">请前往 RunForge 管理后台进行审核,请勿直接回复邮件。</p>
|
|
|
+ <p class="footer">Copyright © 2025 RunForge</p>
|
|
|
+ </div>
|
|
|
+ </body>
|
|
|
+
|
|
|
+ </html>`
|
|
|
+ )
|
|
|
+ }
|
|
|
+
|
|
|
+ async sendCountRequestApproved(email, data) {
|
|
|
+ await sendEmail(email, 'RunForge - 赠送次数审核通过提醒',
|
|
|
+ `<html lang="zh-CN">
|
|
|
+ <head>
|
|
|
+ <meta charset="UTF-8">
|
|
|
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
+ <title>赠送次数审核通过提醒</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;
|
|
|
+ text-indent: 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ .footer {
|
|
|
+ font-size: 14px;
|
|
|
+ text-align: center;
|
|
|
+ color: #7f8c8d;
|
|
|
+ margin-top: 50px;
|
|
|
+ }
|
|
|
+ </style>
|
|
|
+ </head>
|
|
|
+
|
|
|
+ <body>
|
|
|
+ <div class="container">
|
|
|
+ <div class="head">
|
|
|
+ <h2>赠送次数审核通过提醒</h2>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <p>尊敬的用户:</p>
|
|
|
+ <p>您收到的一笔赠送次数申请已审核通过,次数已到账:</p>
|
|
|
+ <div class="info">
|
|
|
+ <p><strong>赠送人:</strong> ${data.senderUsername}</p>
|
|
|
+ <p><strong>到账次数:</strong> ${data.count}</p>
|
|
|
+ <p><strong>审核时间:</strong> ${this.stramptoTime(data.reviewTime)}</p>
|
|
|
+ </div>
|
|
|
+ <p class="footer">Copyright © 2025 RunForge</p>
|
|
|
+ </div>
|
|
|
+ </body>
|
|
|
+
|
|
|
+ </html>`
|
|
|
+ )
|
|
|
+ }
|
|
|
+
|
|
|
+ async sendCountRequestRejected(email, data) {
|
|
|
+ await sendEmail(email, 'RunForge - 赠送次数审核失败提醒',
|
|
|
+ `<html lang="zh-CN">
|
|
|
+ <head>
|
|
|
+ <meta charset="UTF-8">
|
|
|
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
+ <title>赠送次数审核失败提醒</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;
|
|
|
+ text-indent: 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>赠送次数审核失败提醒</h2>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <p>尊敬的用户:</p>
|
|
|
+ <p>您发起的一笔赠送次数申请未通过审核,已将次数退回到您的账户:</p>
|
|
|
+ <div class="info">
|
|
|
+ <p><strong>接收人:</strong> ${data.receiverUsername}</p>
|
|
|
+ <p><strong>退回次数:</strong> ${data.count}</p>
|
|
|
+ <p><strong>审核时间:</strong> ${this.stramptoTime(data.reviewTime)}</p>
|
|
|
+ <p><strong>拒绝原因:</strong> ${data.rejectReason}</p>
|
|
|
+ </div>
|
|
|
+ <p class="important">如有疑问,请前往 RunForge 联系客服处理。</p>
|
|
|
+ <p class="footer">Copyright © 2025 RunForge</p>
|
|
|
+ </div>
|
|
|
+ </body>
|
|
|
+
|
|
|
+ </html>`
|
|
|
+ )
|
|
|
+ }
|
|
|
+
|
|
|
async powerCheck(email, data) {
|
|
|
await sendEmail(email, '宿舍电费提醒',
|
|
|
`<html lang="zh-CN">
|