Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
quantum-blocks
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ui
quantum-blocks
Commits
21cfb742
Commit
21cfb742
authored
May 26, 2021
by
郭志伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 逻辑判断调整
parent
100d613a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
35 deletions
+9
-35
.gitignore
.gitignore
+1
-0
editor.ts
app/controller/editor.ts
+6
-5
test.config.ts
app/web/config/test.config.ts
+1
-1
apollo.json
config/apollo.json
+0
-28
package.json
package.json
+1
-1
No files found.
.gitignore
View file @
21cfb742
...
...
@@ -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/*
...
...
app/controller/editor.ts
View file @
21cfb742
...
...
@@ -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
)
{
...
...
app/web/config/test.config.ts
View file @
21cfb742
...
...
@@ -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`
,
};
...
...
config/apollo.json
deleted
100644 → 0
View file @
100d613a
{
"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
package.json
View file @
21cfb742
...
...
@@ -3,7 +3,7 @@
"version"
:
"0.0.1"
,
"description"
:
"低代码平台"
,
"scripts"
:
{
"start"
:
"cross-env NODE_ENV=production
APOLLO_CLUSTER=3
C egg-scripts start --port 9050 --workers 1"
,
"start"
:
"cross-env NODE_ENV=production
APOLLO_CLUSTER=R
C 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"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment