Merge pull request #10113 from rainzm/notify/email_style

feat(notify): verification email style optimization
This commit is contained in:
Zexi Li
2021-02-02 20:05:00 +08:00
committed by GitHub
4 changed files with 14 additions and 13 deletions
@@ -6,12 +6,12 @@
</head>
<body>
<table style="width: 650px; margin-bottom: 20px;" border="0" cellpadding="0" cellspacing="0" align="center">
<tr style="height: 50px; background: #333; overflow: hidden;">
<tr style="height: 50px; background: #C2DEF2; overflow: hidden;">
<td>
<table style="margin-left: 20px;">
<tr>
<td>
<img src="data:{{.login_logo_format}};base64,{{.login_logo}}" alt="" style="color: #fff; height: 32px; vertical-align: middle;">
<img src="data:{{.login_logo_format}};base64,{{.login_logo}}" alt="{{.name}}" style="color: #333; height: 32px; vertical-align: middle;">
</td>
</tr>
</table>
@@ -43,7 +43,7 @@
<table style="padding: 20px 10px; width: 100%;">
<tr>
<td style="padding-bottom: 20px;">
尊敬的{{.name}},您好:
尊敬的{{.receiver_name}},您好:
</td>
</tr>
<tr>
@@ -53,10 +53,10 @@
</td>
</tr>
<tr style="width: 96%;">
<td colspan="2" style="border-top: 1px dashed #ccc; color: #333; font-size: 12px; padding-bottom: 10px; font-weight: 100;">如非本人操作,请及时登录平台并修改密码以保证账户的安全</td>
<td colspan="2" style="border-top: 1px dashed #ccc; color: #333; font-size: 12px; padding-bottom: 10px; font-weight: 100; text-align: center">如非本人操作,请及时登录平台并修改密码以保证账户的安全</td>
</tr>
<tr>
<td colspan="2" style="background: #333; text-align: right; padding-right: 20px; font-size: 12px; color: #fff; height: 50px;">版权所有 © {{.copyright}} 保留一切权利</td>
<td colspan="2" style="background: #C2DEF2; text-align: right; padding-right: 20px; font-size: 12px; color: #333; height: 50px;">版权所有 © {{.copyright}} 保留一切权利</td>
</tr>
</table>
</body>
@@ -6,12 +6,12 @@
</head>
<body>
<table style="width: 650px; margin-bottom: 20px;" border="0" cellpadding="0" cellspacing="0" align="center">
<tr style="height: 50px; background: #333; overflow: hidden;">
<tr style="height: 50px; background: #C2DEF2; overflow: hidden;">
<td>
<table style="margin-left: 20px;">
<tr>
<td>
<img src="data:{{.login_logo_format}};base64,{{.login_logo}}" alt="" style="color: #fff; height: 32px; vertical-align: middle;">
<img src="data:{{.login_logo_format}};base64,{{.login_logo}}" alt="{{.name}}" style="color: #333; height: 32px; vertical-align: middle;">
</td>
</tr>
</table>
@@ -43,7 +43,7 @@
<table style="padding: 20px 10px; width: 100%;">
<tr>
<td style="padding-bottom: 13px;">
Dear {{.name}}:
Dear {{.receiver_name}}:
</td>
</tr>
<tr>
@@ -56,10 +56,10 @@
</td>
</tr>
<tr style="width: 96%;">
<td colspan="2" style="border-top: 1px dashed #ccc; color: #333; font-size: 12px; padding-bottom: 10px; font-weight: 100;">If you are not operating by yourself, please log in to the platform in time and change your password to ensure the security of your account.</td>
<td colspan="2" style="border-top: 1px dashed #ccc; color: #333; font-size: 12px; padding-bottom: 10px; font-weight: 100; padding-left: 10px;">If you are not operating by yourself, please log in to the platform in time and change your password to ensure the security of your account.</td>
</tr>
<tr>
<td colspan="2" style="background: #333; text-align: right; padding-right: 20px; font-size: 12px; color: #fff; height: 50px;">Copyrights © {{.copyright}}. All rights reserved.</td>
<td colspan="2" style="background: #C2DEF2; text-align: right; padding-right: 20px; font-size: 12px; color: #333; height: 50px;">Copyrights © {{.copyright}}. All rights reserved.</td>
</tr>
</table>
</body>
+1
View File
@@ -128,6 +128,7 @@ type SCompanyInfo struct {
LoginLogo string `json:"login_logo"`
LoginLogoFormat string `json:"login_logo_format"`
Copyright string `json:"copyright"`
Name string `json:"name"`
}
func (tm *STemplateManager) GetCompanyInfo(ctx context.Context) (SCompanyInfo, error) {
+3 -3
View File
@@ -54,10 +54,10 @@ func (self *VerificationSendTask) OnInit(ctx context.Context, obj db.IStandalone
}
data := struct {
models.SCompanyInfo
Name string
Code string
ReceiverName string
Code string
}{
Name: receiver.Name,
ReceiverName: receiver.Name,
Code: verification.Token,
SCompanyInfo: info,
}