Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
quantum-blocks-h5
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-h5
Commits
d93ad624
Commit
d93ad624
authored
Sep 23, 2021
by
郭志伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(config): 调整配置项
parent
0aa55b47
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
+10
-6
activity.ts
app/controller/activity.ts
+5
-1
prod.config.ts
app/web/config/prod.config.ts
+5
-5
No files found.
app/controller/activity.ts
View file @
d93ad624
...
@@ -2,6 +2,11 @@ import { Controller, Context } from 'egg';
...
@@ -2,6 +2,11 @@ import { Controller, Context } from 'egg';
export
default
class
ActivityController
extends
Controller
{
export
default
class
ActivityController
extends
Controller
{
public
async
home
(
ctx
:
Context
)
{
public
async
home
(
ctx
:
Context
)
{
// 开发环境不走redis缓存
if
(
process
.
env
.
NODE_ENV
===
'
development
'
)
{
ctx
.
body
=
await
ctx
.
renderView
(
'
activity.js
'
,
{
url
:
ctx
.
url
});
return
;
}
const
redisKey
=
`quantum-blocks:page:
${
ctx
.
params
.
id
}
`
;
const
redisKey
=
`quantum-blocks:page:
${
ctx
.
params
.
id
}
`
;
let
body
=
await
ctx
.
service
.
redis
.
get
(
redisKey
);
let
body
=
await
ctx
.
service
.
redis
.
get
(
redisKey
);
if
(
body
)
{
if
(
body
)
{
...
@@ -16,6 +21,5 @@ export default class ActivityController extends Controller {
...
@@ -16,6 +21,5 @@ export default class ActivityController extends Controller {
await
ctx
.
service
.
redis
.
set
(
redisKey
,
body
);
await
ctx
.
service
.
redis
.
set
(
redisKey
,
body
);
}
}
ctx
.
body
=
body
;
ctx
.
body
=
body
;
// ctx.body = await ctx.renderView('activity.js', { url: ctx.url });
}
}
}
}
\ No newline at end of file
app/web/config/prod.config.ts
View file @
d93ad624
const
protocol
=
EASY_ENV_IS_BROWSER
?
window
.
location
.
protocol
:
'
https
'
;
//
const protocol = EASY_ENV_IS_BROWSER ? window.location.protocol : 'https';
export
default
{
export
default
{
apiHost
:
`
${
protocol
}
//quantum-blocks.q-gp.com`
,
apiHost
:
`
https:
//quantum-blocks.q-gp.com`
,
kdspHost
:
`
${
protocol
}
//talos.q-gp.com`
,
kdspHost
:
`
https:
//talos.q-gp.com`
,
shenceUrl
:
`
${
protocol
}
//bn.xyqb.com/sa?project=production`
,
shenceUrl
:
`
https:
//bn.xyqb.com/sa?project=production`
,
mallHost
:
`
${
protocol
}
://mall.q-gp.com`
,
mallHost
:
`
https
://mall.q-gp.com`
,
test
:
false
test
:
false
};
};
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