Commit 4dc05c87 authored by 郭志伟's avatar 郭志伟

fix: 问题修复

parent d2ab8433
import { Controller, Context } from 'egg'; import { Controller, Context } from 'egg';
import * as path from 'path';
export default class ActivityController extends Controller { export default class ActivityController extends Controller {
public async home(ctx: Context) { public async home(ctx: Context) {
......
const protocol = EASY_ENV_IS_BROWSER ? window.location.protocol : 'http'; import apolloSsr from '../../../config/apollo.ssr.json';
const protocol = EASY_ENV_IS_BROWSER ? window.location.protocol : 'https';
export default { const hostMap = {
// apiHost: `http://localhost:7001/`, apiHost: `${protocol}//quantum-blocks-test1.liangkebang.net`,
// apiHost: `http://192.168.28.199:7001/`,
apiHost: 'https://quantum-blocks-test1.liangkebang.net',
shenceUrl: `${protocol}//bn.xyqb.com/sa?project=default`, shenceUrl: `${protocol}//bn.xyqb.com/sa?project=default`,
// opapiHost: `https://opapi-vcc2.liangkebang.net`,
kdspHost: 'https://kdsp-api-test1.liangkebang.net',
test: true test: true
}; };
if (EASY_ENV_IS_BROWSER) {
const apolloWin = window.apollo || window.__INITIAL_STATE__.apollo;
if (apolloWin) {
for (const key in apolloWin) {
if (apolloWin[key]) {
hostMap[key] = apolloWin[key];
}
}
}
}
if (EASY_ENV_IS_NODE) {
if (apolloSsr) {
for (const key in apolloSsr) {
if (apolloSsr[key]) {
hostMap[key] = apolloSsr[key];
}
}
}
}
export default hostMap;
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