亲爱的用户,你好!
请核对你的用户名:{username}
验证码:{captcha}
(请输入该验证码完成验证,验证码10分钟内有效!)
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ @Copyright (C) ansjer cop Video Technology Co.,Ltd.All rights reserved. @AUTHOR: ASJRD018 @NAME: Ansjer @software: PyCharm @DATE: 2018/7/3 11:11 @Version: python3.6 @MODIFY DECORD:ansjer dev @file: TemplateService.py @Contact: chanjunkai@163.com """ class TemplateService: @staticmethod def log_api(): apiList = [ 'account/showUserMore', 'account/perfectUserInfo', 'account/getAvatar', 'account/delUser', 'account/setUserValid', 'account/showAllUser', 'account/help', 'account/searchUser', 'account/unsharedUserEquipment', 'account/success', 'equipment/queryUserEquipment', 'equipment/addNewUserEquipment', 'equipment/delUserEquipment', 'equipment/modifyUserEquipment', 'equipment/showAllUserEquipment', 'accessLog/findEquipmentInfo', 'OTA/uploads', 'OTA/download', 'OTA/downloads', 'OTA/getEquipmentVersion', 'OTA/getUpdataFileUrl', 'OTA/addNewEquipmentVersion', 'OTA/showAllEquipmentVersion', 'OTA/getUpdataFileUrl', 'mobile/uploadlogFile', 'roles/addNewRole', 'roles/queryRole', 'roles/delRole', 'roles/modifyRole', 'perms/addNewPerms', 'perms/delPerms', 'perms/queryPerms', 'perms/modifyPerms', 'permsManager/queryRolePerms', 'uploads/upgrade', 'upgrade/download', 'downloads/upgrade', 'getOTAurl/getUpdataFileUrl', 'equipment/sensor', 'equipment/info', 'adminManage/manage', 'equipment/OTA', 'feedbackInfo', 'appInfo', ] return apiList @staticmethod def email_message(type, language): if language is None: language = 'en' if type == 'register_code': data = { 'cn': { 'title': '注册码获取邮件', 'body': """
亲爱的用户,你好!
请核对你的用户名:{username}
验证码:{captcha}
(请输入该验证码完成验证,验证码10分钟内有效!)
Dear,{username}!
Please check your username:{username}
Your validation code:{captcha}
(Please input the verification code to complete the verification. The verification code is valid in 10 minutes!)
' '{domain}/account/activate/{token}' '
'
},
'en': {
'title': 'Registration activation link',
'body': 'Dear user {username}, Hello!' +
'
' + 'Congratulations, you have successfully registered users of the Zhuhai Internet security system, welcome you to use the system!' +
'
' + 'In order to ensure that you can receive timely notification of the site, and timely access to relevant information.Please click on the following open link to verify your mailbox, and you can use the mailbox to retrieve it when you forget your account password.' +
'
' + '
{domain}/account/activate/{token}
' } } elif type == 'forget': data = { 'cn': { 'title': '重置密码信息', 'body': '您好{username}\n' + '您已经请求了重置密码,可以点击下面的链接来重置密码\n' + '
\n' + '更改后的密码为: {reset_pwd}\n如果你没有请求重置密码,请忽略这封邮件.\n在你点击上面链接修改密码之前,你的密码将会保持不变\n' }, 'en': { 'title': 'Reset the password information', 'body': 'Hello! Dear {username}.