lrf402788946 4 năm trước cách đây
mục cha
commit
8add49ae09
2 tập tin đã thay đổi với 9 bổ sung3 xóa
  1. 1 0
      app/service/util.js
  2. 8 3
      config/config.prod.js

+ 1 - 0
app/service/util.js

@@ -96,6 +96,7 @@ class UtilService extends CrudService {
     const rootPath = `${app.config.cdn.repos_root_path}`;
     const rooturl = `${app.config.cdn.repos_root_url_excel}`;
     const path = `${rootPath}${rooturl}`;
+    console.log(`filePath=>${path}`);
     if (!path) {
       throw new BusinessError(ErrorCode.BUSINESS, '服务端没有设置存储路径');
     }

+ 8 - 3
config/config.prod.js

@@ -1,12 +1,17 @@
 'use strict';
 
 module.exports = () => {
-  const config = exports = {};
+  const config = (exports = {});
 
   config.logger = {
     level: 'DEBUG',
     consoleLevel: 'DEBUG',
   };
+  // 导出配置
+  config.cdn = {
+    repos_root_path: '/usr/local/workspace/service-file/upload',
+    repos_root_url_excel: '/excel',
+  };
 
   config.wxapi = {
     appid: 'wxd2e28415cb866c0b', // 微信公众号APPID
@@ -15,7 +20,8 @@ module.exports = () => {
     mchkey: '1qaz2wsx3edc4rfv5tgb6yhn7ujm8ik9', // 商户key
     wxurl: 'http://jytz.jilinjobs.cn/api/wxpayback',
     payurl: 'https://api.mch.weixin.qq.com/pay/unifiedorder',
-    sendDirMq: 'http://www.jilinjobswx.cn/api.weixin.qq.com/cgi-bin/message/template/send?appid=',
+    sendDirMq:
+      'http://www.jilinjobswx.cn/api.weixin.qq.com/cgi-bin/message/template/send?appid=',
   };
   // 签到小程序
   config.wxapp = {
@@ -54,7 +60,6 @@ module.exports = () => {
     agent: true,
   };
 
-
   // redis config
   config.redis = {
     client: {