新增图片存储路径 #1
@ -6,6 +6,7 @@ wechat:
|
||||
autoSetCallback: false
|
||||
# 回调IP,如果是Docker运行,本参数必填(填auto表示自动,不适用于 docker 环境),如果Docker修改了映射,格式为 ip:port
|
||||
callback: 10.0.0.51
|
||||
imgPath: /data/
|
||||
# 转发到其他地址
|
||||
forward:
|
||||
# - 10.0.0.247:4299
|
||||
|
@ -9,6 +9,7 @@ type wechat struct {
|
||||
AutoSetCallback bool `json:"autoSetCallback" yaml:"autoSetCallback"` // 是否自动设置回调地址
|
||||
Callback string `json:"callback" yaml:"callback"` // 回调地址
|
||||
Forward []string `json:"forward" yaml:"forward"` // 转发地址
|
||||
ImgPath string `json:"imgPath" yaml:"imgPath"` // 图片存储位置
|
||||
}
|
||||
|
||||
// Check
|
||||
|
@ -44,5 +44,6 @@ services:
|
||||
volumes:
|
||||
# 配置文件请参阅项目根目录的config.yaml文件
|
||||
- ./config/config.yaml:/app/config.yaml
|
||||
- ./imgData:/data
|
||||
ports:
|
||||
- "19099:19099"
|
||||
|
@ -2,6 +2,7 @@ package watergroup
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"go-wechat/config"
|
||||
"go-wechat/service"
|
||||
"go-wechat/utils"
|
||||
"log"
|
||||
@ -25,7 +26,7 @@ func Month() {
|
||||
yd := time.Now().Local().AddDate(0, 0, -1).Format("200601")
|
||||
// 发送词云
|
||||
fileName := fmt.Sprintf("%s_%s.png", yd, group.Wxid)
|
||||
utils.SendImage(group.Wxid, "D:\\Share\\wordcloud\\"+fileName, 0)
|
||||
utils.SendImage(group.Wxid, config.Conf.Wechat.ImgPath+fileName, 0)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,6 +2,7 @@ package watergroup
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"go-wechat/config"
|
||||
"go-wechat/service"
|
||||
"go-wechat/utils"
|
||||
"log"
|
||||
@ -25,7 +26,7 @@ func Week() {
|
||||
year, weekNo := time.Now().Local().AddDate(0, 0, -1).ISOWeek()
|
||||
// 发送词云
|
||||
fileName := fmt.Sprintf("%d%d_%s.png", year, weekNo, group.Wxid)
|
||||
utils.SendImage(group.Wxid, "D:\\Share\\wordcloud\\"+fileName, 0)
|
||||
utils.SendImage(group.Wxid, config.Conf.Wechat.ImgPath+fileName, 0)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,6 +2,7 @@ package watergroup
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"go-wechat/config"
|
||||
"go-wechat/service"
|
||||
"go-wechat/utils"
|
||||
"log"
|
||||
@ -27,7 +28,7 @@ func Yesterday() {
|
||||
yd := time.Now().Local().AddDate(0, 0, -1).Format("20060102")
|
||||
// 发送词云
|
||||
fileName := fmt.Sprintf("%s_%s.png", yd, group.Wxid)
|
||||
utils.SendImage(group.Wxid, "D:\\Share\\wordcloud\\"+fileName, 0)
|
||||
utils.SendImage(group.Wxid, config.Conf.Wechat.ImgPath+fileName, 0)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user