mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-13 01:09:04 +08:00
fix: 修复使用 .env 时 /api/utils/env 接口中的 env 字段为空的问题
This commit is contained in:
parent
6c54518e84
commit
ff5283a66f
@ -19,10 +19,6 @@ console.log(
|
|||||||
┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅
|
┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅
|
||||||
`,
|
`,
|
||||||
);
|
);
|
||||||
if ($.env.isNode) {
|
|
||||||
const dotenv = eval(`require("dotenv")`);
|
|
||||||
dotenv.config();
|
|
||||||
}
|
|
||||||
import migrate from '@/utils/migration';
|
import migrate from '@/utils/migration';
|
||||||
import serve from '@/restful';
|
import serve from '@/restful';
|
||||||
|
|
||||||
|
4
backend/src/vendor/open-api.js
vendored
4
backend/src/vendor/open-api.js
vendored
@ -18,6 +18,10 @@ export class OpenAPI {
|
|||||||
this.http = HTTP();
|
this.http = HTTP();
|
||||||
this.env = ENV();
|
this.env = ENV();
|
||||||
|
|
||||||
|
if (isNode) {
|
||||||
|
const dotenv = eval(`require("dotenv")`);
|
||||||
|
dotenv.config();
|
||||||
|
}
|
||||||
this.node = (() => {
|
this.node = (() => {
|
||||||
if (isNode) {
|
if (isNode) {
|
||||||
const fs = eval("require('fs')");
|
const fs = eval("require('fs')");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user