Commit a504ebda authored by 郭志伟's avatar 郭志伟

fix: apollo调试

parent 65335ec1
// const protocol = EASY_ENV_IS_BROWSER ? window.location.protocol : 'https';
// export default {
// apiHost: `https://quantum-blocks-vcc2.liangkebang.net/`,
// h5Host: 'https://quantum-h5-vcc2.liangkebang.net/',
// opapiHost: 'https://opapi-vcc2.liangkebang.net',
// qiniuHost: `https://appsync.lkbang.net/`,
// shenceUrl: `${protocol}//bn.xyqb.com/sa?project=production`,
// qiniuUpHost: `${protocol}//up-z0.qiniup.com`,
// };
import apollo from '../../../config/apollo.json';
const protocol = EASY_ENV_IS_BROWSER ? window.location.protocol : 'https'; const protocol = EASY_ENV_IS_BROWSER ? window.location.protocol : 'https';
const { api, qiniu } = EASY_ENV_IS_BROWSER ? window.apollo : { api: {}, qiniu: {} };
export default { export default {
...api, ...apollo.api,
...qiniu, ...apollo.qiniu,
shenceUrl: `${protocol}//bn.xyqb.com/sa?project=production`, shenceUrl: `${protocol}//bn.xyqb.com/sa?project=production`,
}; };
declare module "*.json" {
const value: any;
export default value;
}
\ No newline at end of file
...@@ -6,16 +6,16 @@ ...@@ -6,16 +6,16 @@
}, },
"mysql": { "mysql": {
"low_code": { "low_code": {
"host": "mysql", "host": "undefined",
"port": "3306", "port": "undefined",
"username": "qa", "username": "qa",
"password": "qatest", "password": "qatest",
"database": "low_code" "database": "low_code"
} }
}, },
"redis": { "redis": {
"port": "6379", "port": "undefined",
"host": "redis", "host": "undefined",
"password": "", "password": "",
"db": 0 "db": 0
}, },
......
import { EggAppConfig } from 'egg'; import { EggAppConfig } from 'egg';
import * as fs from 'fs'; import * as fs from 'fs';
import * as path from 'path'; import * as path from 'path';
import apollo from '../config/apollo.json';
const { api, qiniu } = apollo;
export default (appInfo: EggAppConfig) => { export default (appInfo: EggAppConfig) => {
const config: any = {}; const config: any = {};
config.siteFile = { config.siteFile = {
'/favicon.ico': fs.readFileSync(path.join(appInfo.baseDir, 'app/web/asset/images/favicon.ico')), '/favicon.ico': fs.readFileSync(path.join(appInfo.baseDir, 'app/web/asset/images/favicon.ico'))
'/apiHost.js': `var apollo = ${JSON.stringify({ api, qiniu })}`,
}; };
config.view = { config.view = {
......
// This file is created by egg-ts-helper@1.25.8 // This file is created by egg-ts-helper@1.25.9
// Do not modify this file!!!!!!!!! // Do not modify this file!!!!!!!!!
import 'egg'; import 'egg';
......
// This file is created by egg-ts-helper@1.25.8 // This file is created by egg-ts-helper@1.25.9
// Do not modify this file!!!!!!!!! // Do not modify this file!!!!!!!!!
import 'egg'; import 'egg';
......
// This file is created by egg-ts-helper@1.25.8 // This file is created by egg-ts-helper@1.25.9
// Do not modify this file!!!!!!!!! // Do not modify this file!!!!!!!!!
import 'egg'; import 'egg';
......
// This file is created by egg-ts-helper@1.25.8 // This file is created by egg-ts-helper@1.25.9
// Do not modify this file!!!!!!!!! // Do not modify this file!!!!!!!!!
import 'egg'; import 'egg';
......
// This file is created by egg-ts-helper@1.25.8 // This file is created by egg-ts-helper@1.25.9
// Do not modify this file!!!!!!!!! // Do not modify this file!!!!!!!!!
import 'egg'; import 'egg';
......
// This file is created by egg-ts-helper@1.25.8 // This file is created by egg-ts-helper@1.25.9
// Do not modify this file!!!!!!!!! // Do not modify this file!!!!!!!!!
import 'egg'; import 'egg';
......
// This file is created by egg-ts-helper@1.25.8 // This file is created by egg-ts-helper@1.25.9
// Do not modify this file!!!!!!!!! // Do not modify this file!!!!!!!!!
import 'egg'; import 'egg';
......
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