Selaa lähdekoodia

修改分题线上环境地址;增加字号配置项

luoshi 4 vuotta sitten
vanhempi
commit
83fb6c0c7c
2 muutettua tiedostoa jossa 3 lisäystä ja 2 poistoa
  1. 2 1
      config.json
  2. 1 1
      source/lib/image.js

+ 2 - 1
config.json

@@ -12,6 +12,7 @@
     },
     "watermark": {
         "fontFile": "font/simsun.ttf",
+        "fontSize": 30,
         "color": "#ff0000"
     },
     "logger": {
@@ -21,7 +22,7 @@
     "servers": [
         {
             "name": "线上环境",
-            "host": "https://ft.markingcloud.com"
+            "host": "https://www.markingcloud.com"
         },
         {
             "name": "线下环境",

+ 1 - 1
source/lib/image.js

@@ -49,7 +49,7 @@ class executor extends EventEmitter {
             let x = 30
             let y = 10
             //最大宽/高限制
-            let fontSize = 30
+            let fontSize = config.watermark.fontSize || 30
             let maxX = size.width / 2 - x * 2
             let height = fontSize + 10
             //计算总分