Commit 21cfb742 authored by 郭志伟's avatar 郭志伟

fix: 逻辑判断调整

parent 100d613a
......@@ -17,6 +17,7 @@ app/**/*.js
config/plugin.local.js
config/plugin.js
config/config.*.js
config/apollo.json
index.js
config/manifest.json
app/view/*
......
......@@ -9,11 +9,12 @@ export default class EditorController extends Controller {
}
public async home(ctx: Context) {
const { api, qiniu } = await import(path.resolve('./config/apollo.json'));
await ctx.renderClient('editor.js', {
apollo: process.env.NODE_ENV === 'production' ? {...api, ...qiniu} : null
// apollo: {...api, ...qiniu}
});
let cfg = {};
if (process.env.NODE_ENV === 'production') {
const { api, qiniu } = await import(path.resolve('./config/apollo.json'));
cfg = { apollo: {...api, ...qiniu} };
}
await ctx.renderClient('editor.js', cfg);
}
public async save(ctx: Context) {
......
......@@ -5,7 +5,7 @@ const hostMap = {
h5Host: '${protocol}//quantum-h5-test1.liangkebang.net/',
opapiHost: '${protocol}//opapi-test1.liangkebang.net',
qiniuHost: `${protocol}//appsync.lkbang.net/`,
shenceUrl: `${protocol}//bn.xyqb.com/sa?project=production`,
shenceUrl: `${protocol}//bn.xyqb.com/sa?project=default`,
qiniuUpHost: `${protocol}//up-z0.qiniup.com`,
};
......
{
"api": {
"apiHost": "https://quantum-blocks-test1.liangkebang.net/",
"h5Host": "https://quantum-h5-test1.liangkebang.net/",
"opapiHost": "https://opapi-test1.liangkebang.net/",
"passportHost": "https://passportapi-test1.liangkebang.net",
"kdspHost": "https://talos-test1.liangkebang.net"
},
"mysql": {
"low_code": {
"host": "172.17.5.9",
"port": 31024,
"username": "qa",
"password": "qatest",
"database": "low_code"
}
},
"redis": {
"port": 31565,
"host": "172.17.5.13",
"password": "",
"db": 0
},
"qiniu": {
"qiniuUpHost": "https://up-z0.qiniup.com",
"qiniuHost": "https://appsync.lkbang.net"
}
}
\ No newline at end of file
......@@ -3,7 +3,7 @@
"version": "0.0.1",
"description": "低代码平台",
"scripts": {
"start": "cross-env NODE_ENV=production APOLLO_CLUSTER=3C egg-scripts start --port 9050 --workers 1",
"start": "cross-env NODE_ENV=production APOLLO_CLUSTER=RC egg-scripts start --port 9050 --workers 1",
"test": "cross-env NODE_ENV=production EGG_SERVER_ENV=sit DEBUG=apollo APOLLO_CLUSTER=k8s NAMESPACE=qa2 egg-scripts start --port 80 --workers 1",
"stop": "egg-scripts stop",
"backend": "nohup egg-scripts start --port 7001 --workers 4",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment