guhongwei 4 年 前
コミット
450f31fbd5
3 ファイル変更110 行追加54 行削除
  1. 63 34
      config/config.default.js
  2. 15 2
      config/config.local.js
  3. 32 18
      config/config.prod.js

+ 63 - 34
config/config.default.js

@@ -10,53 +10,82 @@ module.exports = appInfo => {
  * built-in config
  * @type {Egg.EggAppConfig}
  **/
-const config = exports = {};
+  const config = exports = {};
 
-// use for cookie sign key, should change to your own and keep security
-config.keys = appInfo.name + '_1579225760252_7743';
+  // use for cookie sign key, should change to your own and keep security
+  config.keys = appInfo.name + '_1579225760252_7743';
 
-// add your middleware config here
-config.middleware = [];
+  // add your middleware config here
+  config.middleware = [];
 
-// add your user config here
-const userConfig = {
+  // add your user config here
+  const userConfig = {
   // myAppName: 'egg',
-};
+  };
 
-// add your config here
-config.cluster = {
-  listen: {
-    port: 8081,
-  },
-};
+  // add your config here
+  config.cluster = {
+    listen: {
+      port: 8081,
+    },
+  };
+  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',
+  };
 
-config.mongoose = {
-  url: "mongodb://localhost:27017/servicetest",
-  options: {
+  config.proxy = true;
+  config.hostHeaders = 'x-forwarded-host';
+  // 服务器发布路径
+  config.baseUrl = 'http://free.liaoningdoupo.com';
+  // 认证回调地址
+  config.authUrl = '/api/quanqi/auth';
+  // 回调地址
+  config.redirect_uri = `${config.baseUrl}/weixin`;
+  config.redirect_uri_doctor = `${config.baseUrl}/patient/manage`;
+  config.redirect_uri_patient = `${config.baseUrl}/doctor/manage`;
+  // base路径
+  config.sendDirMq =
+      'http://wx.cc-lotus.info/api.weixin.qq.com/cgi-bin/message/template/send?appid=';
+  // appID
+  config.appid = 'wxdf3ed83c095be97a';
+  config.REVIEW_TEMPLATE_ID = 'oqmozBcdkCzBOvNrdzMQ1lDJcobD5uBEpNoLWec0bPY';
+  // 邮箱配置
+  config.user_email = 'system@jilinjobs.cn';
+  config.auth_code = 'vgWtywkwMJpN8QDL';
+
+  config.mongoose = {
+    url: 'mongodb://localhost:27017/servicetest',
+    options: {
     // user: 'admin',
     // pass: 'admin',
     // authSource: 'admin',
     // useNewUrlParser: true,
     // useCreateIndex: true,
-  },
-};
+    },
+  };
 
-config.jwt = {
-  ...jwt,
-  expiresIn: "1d",
-  issuer: "servicetest",
-};
+  config.jwt = {
+    ...jwt,
+    expiresIn: '1d',
+    issuer: 'servicetest',
+  };
 
-// config.amqp = {
-//   client: {
-//     hostname: "127.0.0.1",
-//     username: "visit",
-//     password: "visit",
-//     vhost: "visit",
-//   },
-//   app: true,
-//   agent: true,
-// };
+  // config.amqp = {
+  //   client: {
+  //     hostname: "127.0.0.1",
+  //     username: "visit",
+  //     password: "visit",
+  //     vhost: "visit",
+  //   },
+  //   app: true,
+  //   agent: true,
+  // };
 
   return {
     ...config,

+ 15 - 2
config/config.local.js

@@ -7,9 +7,22 @@ module.exports = () => {
     level: 'DEBUG',
     consoleLevel: 'DEBUG',
   };
-  
+  config.wxapi = {
+    appid: 'wxdf3ed83c095be97a', // 微信公众号APPID
+    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',
+  };
+
+  // 服务器发布路径
+  config.baseUrl = 'http://free.liaoningdoupo.com';
+  // 认证回调地址
+  config.authUrl = '/api/auth';
+
   config.mongoose = {
-    url: "mongodb://localhost:27017/servicetest",
+    url: 'mongodb://localhost:27017/servicetest',
     options: {
       // user: 'demo',
       // pass: 'demo',

+ 32 - 18
config/config.prod.js

@@ -1,34 +1,48 @@
 'use strict';
 
 module.exports = () => {
-const config = exports = {};
+  const config = exports = {};
 
-config.logger = {
+  config.logger = {
   // level: 'DEBUG',
   // consoleLevel: 'DEBUG',
-};
+  };
+
+  config.wxapi = {
+    appid: 'wxdf3ed83c095be97a', // 微信公众号APPID
+    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',
+  };
+
+  // 服务器发布路径
+  config.baseUrl = 'http://free.liaoningdoupo.com';
+  // 认证回调地址
+  config.authUrl = '/api/huanqi/auth';
 
-// mongoose config
-config.mongoose = {
-  url: "mongodb://localhost:27017/servicetest",
-  options: {
+  // mongoose config
+  config.mongoose = {
+    url: 'mongodb://localhost:27017/servicetest',
+    options: {
     // user: "admin",
     // pass: "admin",
     // authSource: "admin",
     // useNewUrlParser: true,
     // useCreateIndex: true,
-  },
-};
+    },
+  };
 
-// redis config
-config.redis = {
-  client: {
-    port: 6379, // Redis port
-    host: '127.0.0.1', // Redis host
-    password: 123456,
-    db: 0,
-  },
-};
+  // redis config
+  config.redis = {
+    client: {
+      port: 6379, // Redis port
+      host: '127.0.0.1', // Redis host
+      password: 123456,
+      db: 0,
+    },
+  };
 
   return config;
 };