|
@@ -0,0 +1,124 @@
|
|
|
+
|
|
|
+
|
|
|
+'use strict';
|
|
|
+
|
|
|
+const { jwt } = require('./config.secret');
|
|
|
+
|
|
|
+
|
|
|
+ * @param {Egg.EggAppInfo} appInfo app info
|
|
|
+ */
|
|
|
+module.exports = appInfo => {
|
|
|
+
|
|
|
+ * built-in config
|
|
|
+ * @type {Egg.EggAppConfig}
|
|
|
+ **/
|
|
|
+ const config = exports = {};
|
|
|
+
|
|
|
+
|
|
|
+ config.keys = appInfo.name + '_1578642242928_5726';
|
|
|
+
|
|
|
+
|
|
|
+ config.middleware = [];
|
|
|
+
|
|
|
+
|
|
|
+ const userConfig = {
|
|
|
+
|
|
|
+ };
|
|
|
+
|
|
|
+ config.errorMongo = {
|
|
|
+ details: true,
|
|
|
+ };
|
|
|
+ config.errorHanler = {
|
|
|
+ details: true,
|
|
|
+ };
|
|
|
+
|
|
|
+
|
|
|
+ config.cluster = {
|
|
|
+ listen: {
|
|
|
+ port: 8080,
|
|
|
+ },
|
|
|
+ };
|
|
|
+
|
|
|
+ config.wxapi = {
|
|
|
+ appid: 'wxdf3ed83c095be97a',
|
|
|
+ appSecret: '748df7c2a75077a79ae0c971b1638244',
|
|
|
+ baseUrl: 'http://wx.cc-lotus.info',
|
|
|
+ mchid: '1505364491',
|
|
|
+ mchkey: '1qaz2wsx3edc4rfv5tgb6yhn7ujm8ik9',
|
|
|
+ wxurl: 'http://free.liaoningdoupo.com/api/wxpayback',
|
|
|
+ payurl: 'https://api.mch.weixin.qq.com/pay/unifiedorder',
|
|
|
+ };
|
|
|
+
|
|
|
+ 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`;
|
|
|
+
|
|
|
+ config.sendDirMq = 'http://wx.cc-lotus.info/api.weixin.qq.com/cgi-bin/message/template/send?appid=';
|
|
|
+
|
|
|
+ config.appid = 'wxdf3ed83c095be97a';
|
|
|
+ config.REVIEW_TEMPLATE_ID = 'oqmozBcdkCzBOvNrdzMQ1lDJcobD5uBEpNoLWec0bPY';
|
|
|
+
|
|
|
+
|
|
|
+ config.user_email = 'system@jilinjobs.cn';
|
|
|
+ config.auth_code = 'vgWtywkwMJpN8QDL';
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ config.mongoose = {
|
|
|
+ url: 'mongodb://127.0.0.1:27017/huanqi',
|
|
|
+ options: {
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ },
|
|
|
+ };
|
|
|
+
|
|
|
+
|
|
|
+ config.security = {
|
|
|
+ csrf: {
|
|
|
+
|
|
|
+ enable: false,
|
|
|
+ },
|
|
|
+ };
|
|
|
+
|
|
|
+ config.jwt = {
|
|
|
+ ...jwt,
|
|
|
+ expiresIn: '1d',
|
|
|
+ issuer: 'huanqi',
|
|
|
+ };
|
|
|
+
|
|
|
+ return {
|
|
|
+ ...config,
|
|
|
+ ...userConfig,
|
|
|
+ };
|
|
|
+};
|