config.local.js 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. 'use strict';
  2. /**
  3. * 开发环境相关配置
  4. *
  5. * @author CaiAoLin
  6. * @date 2017/8/29
  7. * @version
  8. */
  9. module.exports = appInfo => {
  10. const config = {};
  11. // 数据库配置
  12. config.mysql = {
  13. client: {
  14. // host
  15. host: '192.168.1.76',
  16. // 端口号
  17. port: '3306',
  18. // 用户名
  19. user: 'zh_dev',
  20. // 密码
  21. password: 'zongheng2019',
  22. // 数据库名
  23. database: 'calculation',
  24. // database: 'calc_copy_pro',
  25. },
  26. // 是否加载到 app 上,默认开启
  27. app: true,
  28. // 是否加载到 agent 上,默认关闭
  29. agent: false,
  30. };
  31. // 表名前缀
  32. config.tablePrefix = 'zh_';
  33. // redis设置
  34. config.redis = {
  35. client: {
  36. host: '192.168.1.76',
  37. port: '6379',
  38. password: 'zongheng2019',
  39. db: '0',
  40. },
  41. agent: true,
  42. };
  43. // geetest验证码key
  44. config.geetest = {
  45. id: '23c50f6711966f744c93a70167c8e0a4',
  46. key: '9b67989994f9def437ea68bb495f0162',
  47. };
  48. // 前端验证
  49. config.jsValidator = {
  50. client: {},
  51. app: true,
  52. };
  53. // 上传设置
  54. config.multipart = {
  55. whitelist: ['.json', '.txt',
  56. '.xls', '.xlsx',
  57. '.doc', '.docx',
  58. '.pdf',
  59. '.ppt', '.pptx',
  60. '.png', '.jpg', '.jpeg', '.gif', '.bmp', '.cad', '.dwg',
  61. '.zip', '.rar', '.7z', ''],
  62. fileSize: '100mb',
  63. fields: '15',
  64. };
  65. // session配置
  66. config.session = {
  67. key: 'ZHC_SESS',
  68. maxAge: 7 * 24 * 3600 * 1000, // 7天
  69. httpOnly: true,
  70. encrypt: true,
  71. //renew: true, // session临近过期更新过期时间
  72. rolling: true, // 每次都更新session有效期
  73. };
  74. // 是否压缩替换前端js
  75. config.min = false;
  76. config.logger = {
  77. consoleLevel: 'WARN',
  78. disableConsoleAfterReady: false,
  79. };
  80. // wx扫码登录
  81. config.wxCode = {
  82. appid: 'wx3d5394b238a3bc9a',
  83. appsecret: '457d64c55f48f57cd22eca47e53d15cb',
  84. };
  85. config.hisOssPath = 'qa/';
  86. config.stashOssPath = 'stash/qa/';
  87. config.oss = {
  88. clients: {
  89. signPdf: {
  90. bucket: 'measure-sign-pdf',
  91. },
  92. fujian: {
  93. bucket: 'jiliang-qa',
  94. },
  95. his: {
  96. bucket: 'jiliang-his',
  97. }
  98. },
  99. default: {
  100. accessKeyId: 'LTAIALMjBHOs9PLA',
  101. accessKeySecret: 'HSnULQs87wAJhcziAdyRv3GZ4EYctc',
  102. endpoint: 'oss-cn-shenzhen.aliyuncs.com',
  103. timeout: '60s',
  104. },
  105. };
  106. config.fujianOssPath = 'https://jiliang-qa-oss-cdn.smartcost.com.cn/qa/';
  107. config.fujianOssFolder = 'qa/';
  108. // 自带接口系统地址
  109. config.syncUrl = 'http://127.0.0.1:7169/';
  110. config.is_debug = true;
  111. // 项目管理跳转路径
  112. config.managementPath = 'http://localhost:3000';
  113. config.managementProxyPath = 'http://192.168.1.76:2020';
  114. config.url3f = 'http://127.0.0.1:7005/3f';
  115. return config;
  116. };