@wzyjs/utils 0.0.24 → 0.0.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -102,9 +102,7 @@ const locationFn = {
|
|
|
102
102
|
};
|
|
103
103
|
// 延迟指定毫秒数
|
|
104
104
|
const delay = (time = 1000) => {
|
|
105
|
-
return new Promise(resolve =>
|
|
106
|
-
setTimeout(resolve, time);
|
|
107
|
-
});
|
|
105
|
+
return new Promise(resolve => setTimeout(resolve, time));
|
|
108
106
|
};
|
|
109
107
|
|
|
110
108
|
exports.delay = delay;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const sendMail: (title: string, content
|
|
1
|
+
export declare const sendMail: (toEmail: string, title: string, content?: string) => Promise<string>;
|
|
@@ -4,7 +4,6 @@ var nodemailer = require('nodemailer');
|
|
|
4
4
|
|
|
5
5
|
const fromEmail = '15835196981@163.com';
|
|
6
6
|
const fromPass = 'REGDSGDETFECIGKE';
|
|
7
|
-
const toEmail = '657189555@qq.com';
|
|
8
7
|
const transporter = nodemailer.createTransport({
|
|
9
8
|
host: 'smtp.163.com',
|
|
10
9
|
port: 465,
|
|
@@ -14,7 +13,7 @@ const transporter = nodemailer.createTransport({
|
|
|
14
13
|
pass: fromPass
|
|
15
14
|
}
|
|
16
15
|
});
|
|
17
|
-
const sendMail = async (title, content) => {
|
|
16
|
+
const sendMail = async (toEmail, title, content) => {
|
|
18
17
|
try {
|
|
19
18
|
await transporter.sendMail({
|
|
20
19
|
from: fromEmail,
|
|
@@ -100,9 +100,7 @@ const locationFn = {
|
|
|
100
100
|
};
|
|
101
101
|
// 延迟指定毫秒数
|
|
102
102
|
const delay = (time = 1000) => {
|
|
103
|
-
return new Promise(resolve =>
|
|
104
|
-
setTimeout(resolve, time);
|
|
105
|
-
});
|
|
103
|
+
return new Promise(resolve => setTimeout(resolve, time));
|
|
106
104
|
};
|
|
107
105
|
|
|
108
106
|
export { delay, executePromise, handleParams, handleRes2List, locationFn };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const sendMail: (title: string, content
|
|
1
|
+
export declare const sendMail: (toEmail: string, title: string, content?: string) => Promise<string>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wzyjs/utils",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.25",
|
|
4
4
|
"description": "description",
|
|
5
5
|
"author": "wzy",
|
|
6
6
|
"license": "ISC",
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"type": "git",
|
|
54
54
|
"url": "https://gitee.com/wang-zhenyu/app.git"
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "6b5f13176bbcdcde7e853b480899dbdeb4455606"
|
|
57
57
|
}
|