mali-applet-ui 1.1.52 → 1.1.54
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
CHANGED
|
@@ -9,11 +9,14 @@ const nodemailer = require('nodemailer')
|
|
|
9
9
|
const smtpTransport = require('nodemailer-smtp-transport')
|
|
10
10
|
const pack = require('../package.json')
|
|
11
11
|
|
|
12
|
+
const apiURL = 'http://192.168.10.217:3000'
|
|
13
|
+
|
|
12
14
|
function getEnvCode (mode) {
|
|
13
15
|
const maps = {
|
|
14
16
|
dev: 'development',
|
|
15
17
|
test: 'testing',
|
|
16
18
|
demo: 'demo',
|
|
19
|
+
pre: 'prerelease',
|
|
17
20
|
prod: 'production'
|
|
18
21
|
}
|
|
19
22
|
return maps[mode] || 'production'
|
|
@@ -24,6 +27,7 @@ function getEnvName (mode) {
|
|
|
24
27
|
dev: '开发环境',
|
|
25
28
|
test: '测试环境',
|
|
26
29
|
demo: '演示环境',
|
|
30
|
+
pre: '预发布环境',
|
|
27
31
|
prod: '正式环境'
|
|
28
32
|
}
|
|
29
33
|
return maps[mode] || '正式环境'
|
|
@@ -246,7 +250,7 @@ let currTransporter = null
|
|
|
246
250
|
function getTransporter () {
|
|
247
251
|
if (!currTransporter) {
|
|
248
252
|
currTransporter = new Promise((resolve, reject) => {
|
|
249
|
-
axios.get(
|
|
253
|
+
axios.get(`${apiURL}/emai/getSmtpOptions`).then(res => {
|
|
250
254
|
const transporter = nodemailer.createTransport(smtpTransport(res.data))
|
|
251
255
|
resolve(transporter)
|
|
252
256
|
}).catch((e) => {
|