mali-ui-plus 1.1.3 → 1.1.5
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.
- package/env/index.js +24 -23
- package/package.json +1 -1
package/env/index.js
CHANGED
|
@@ -8,13 +8,13 @@ const smtpTransport = require('nodemailer-smtp-transport')
|
|
|
8
8
|
const pack = require('../package.json')
|
|
9
9
|
|
|
10
10
|
const currTransporter = new Promise((resolve, reject) => {
|
|
11
|
-
axios.get('http://192.168.10.217:3000/emai/getSmtpOptions').then(res => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}).catch((e) => {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
})
|
|
11
|
+
// axios.get('http://192.168.10.217:3000/emai/getSmtpOptions').then(res => {
|
|
12
|
+
// const transporter = nodemailer.createTransport(smtpTransport(res.data))
|
|
13
|
+
// resolve(transporter)
|
|
14
|
+
// }).catch((e) => {
|
|
15
|
+
// console.log('获取邮箱配置失败')
|
|
16
|
+
// reject(e)
|
|
17
|
+
// })
|
|
18
18
|
})
|
|
19
19
|
|
|
20
20
|
function getEnvCode (mode) {
|
|
@@ -120,22 +120,23 @@ function initEnv (dirPath, defaultEnv) {
|
|
|
120
120
|
|
|
121
121
|
function sendMail ({ receivedBy, subject, html }) {
|
|
122
122
|
return new Promise((resolve, reject) => {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
})
|
|
137
|
-
|
|
138
|
-
|
|
123
|
+
resolve()
|
|
124
|
+
// currTransporter.then((transporter) => {
|
|
125
|
+
// transporter.sendMail({
|
|
126
|
+
// from: 'xuliangzhan@ddscan.cn',
|
|
127
|
+
// to: receivedBy,
|
|
128
|
+
// subject,
|
|
129
|
+
// html
|
|
130
|
+
// }, function (error, response) {
|
|
131
|
+
// if (error) {
|
|
132
|
+
// reject(error)
|
|
133
|
+
// } else {
|
|
134
|
+
// resolve()
|
|
135
|
+
// }
|
|
136
|
+
// })
|
|
137
|
+
// }).catch((e) => {
|
|
138
|
+
// reject(e)
|
|
139
|
+
// })
|
|
139
140
|
})
|
|
140
141
|
}
|
|
141
142
|
|