123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165 |
- /* eslint valid-jsdoc: "off" */
- 'use strict';
- const { jwt } = require('./config.secret');
- const ip = '120.48.146.1';
- /**
- * @param {Egg.EggAppInfo} appInfo app info
- */
- module.exports = appInfo => {
- /**
- * built-in config
- * @type {Egg.EggAppConfig}
- **/
- const config = (exports = {});
- // use for cookie sign key, should change to your own and keep security
- config.keys = appInfo.name + '_1578642242928_5726';
- // add your middleware config here
- config.middleware = [ 'checkIsLogin', 'logs' ];
- // add your user config here
- const userConfig = {
- // myAppName: 'egg',
- };
- config.errorMongo = {
- details: true,
- };
- config.errorHanler = {
- details: true,
- };
- // add your config here
- config.cluster = {
- listen: {
- port: 7001,
- },
- };
- config.wxapi = {
- appid: 'wxdf3ed83c095be97a', // 微信公众号APPID
- appSecret: '748df7c2a75077a79ae0c971b1638244',
- baseUrl: 'http://wx.cc-lotus.info', // 微信网关地址
- mchid: '1505364491', // 商户ID
- mchkey: '1qaz2wsx3edc4rfv5tgb6yhn7ujm8ik9', // 商户key
- wxurl: 'http://free.liaoningdoupo.com/api/wxpayback',
- payurl: 'https://api.mch.weixin.qq.com/pay/unifiedorder',
- sendDirMq: 'http://wx.cc-lotus.info/api.weixin.qq.com/cgi-bin/message/template/send?appid=',
- };
- // 签到小程序
- config.wxapp = {
- appid: 'wx3b5ac763ada73e0e',
- secret: '0f30fcbb9ad45697800611ad4af585bb',
- grant_type: 'authorization_code',
- };
- config.proxy = true;
- config.hostHeaders = 'x-forwarded-host';
- // 服务器发布路径
- config.baseUrl = 'http://jytz.jilinjobs.cn';
- // 认证回调地址
- config.authUrl = '/api/train/auth';
- // 回调地址
- config.redirect_uri = `${config.baseUrl}/weixin`;
- config.redirect_uri_doctor = `${config.baseUrl}/patient/manage`;
- config.redirect_uri_patient = `${config.baseUrl}/doctor/manage`;
- // base路径
- // appID
- config.appid = 'wxdf3ed83c095be97a';
- config.REVIEW_TEMPLATE_ID = '16F_xIWRXcjefFgBw85uL1JtKYpKOy8tpO1ncG0PO3c';
- // 邮箱配置
- config.user_email = 'system@jilinjobs.cn';
- config.auth_code = 'vgWtywkwMJpN8QDL';
- // 导出配置
- config.cdn = {
- repos_root_path: '/usr/local/workspace/service-file/upload',
- repos_root_url_excel: '/excel/',
- repos_root_url_experience: '/experience/',
- repos_root_url_zip: '/zip/',
- };
- // mq配置
- config.amqp = {
- client: {
- hostname: ip,
- username: 'visit',
- password: 'visit',
- vhost: 'train',
- },
- app: true,
- agent: true,
- };
- // redis config
- config.redis = {
- client: {
- port: 6379, // Redis port
- host: ip, // Redis host
- password: '123456',
- db: 0,
- },
- };
- // mongoose config
- config.mongoose = {
- url: 'mongodb://127.0.0.1:27017/train',
- options: {
- user: 'root',
- pass: 'root',
- authSource: 'admin',
- useNewUrlParser: true,
- useCreateIndex: true,
- },
- };
- // config.mongoose = {
- // url: 'mongodb://192.168.1.20:27017/train',
- // options: {
- // user: 'admin',
- // pass: 'admin',
- // authSource: 'admin',
- // useUnifiedTopology: true,
- // useNewUrlParser: true,
- // useCreateIndex: true,
- // },
- // };
- config.mission = {
- baseUrl: 'http://127.0.0.1:7003',
- };
- config.auth = {
- baseUrl: 'http://127.0.0.1:7002',
- };
- // 安全配置
- config.security = {
- csrf: {
- // ignoreJSON: true, // 默认为 false,当设置为 true 时,将会放过所有 content-type 为 `application/json` 的请求
- enable: false,
- },
- };
- // // JWT config
- config.jwt = {
- ...jwt,
- expiresIn: '1d',
- issuer: 'train',
- };
- config.yunjiuye = {
- toBindPage: 'https://jytz.jilinjobs.cn/y/', // 云就业绑定页面
- toDealTokenPage: 'https://jytz.jilinjobs.cn/y/deal', // 云就业免登录处理token路由
- };
- config.httpclient = {
- request: {
- // 默认 request 超时时间
- timeout: 3000,
- },
- };
- config.yjyLoginKey = 'yjyLoginKey:';
- return {
- ...config,
- ...userConfig,
- };
- };
|