forked from lxh/go-wxhelper
Merge pull request 'dev' (#8) from dev into main
Reviewed-on: lxh/go-wxhelper#8
This commit is contained in:
commit
f796e7b3a8
@ -3,6 +3,7 @@ package app
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/gin-gonic/gin"
|
||||
"go-wechat/config"
|
||||
"go-wechat/service"
|
||||
"net/http"
|
||||
)
|
||||
@ -21,6 +22,7 @@ func Index(ctx *gin.Context) {
|
||||
}
|
||||
result["friends"] = friends
|
||||
result["groups"] = groups
|
||||
result["vnc"] = config.Conf.Wechat.VncUrl
|
||||
// 渲染页面
|
||||
ctx.HTML(http.StatusOK, "index.html", result)
|
||||
}
|
||||
|
@ -2,6 +2,8 @@
|
||||
wechat:
|
||||
# 微信HOOK接口地址
|
||||
host: 10.0.0.73:19088
|
||||
# 微信容器映射出来的vnc页面地址,没有就不填
|
||||
vncUrl: http://192.168.1.175:19087/vnc_lite.html
|
||||
# 是否在启动的时候自动设置hook服务的回调
|
||||
autoSetCallback: false
|
||||
# 回调IP,如果是Docker运行,本参数必填(填auto表示自动,不适用于 docker 环境),如果Docker修改了映射,格式为 ip:port
|
||||
@ -29,7 +31,7 @@ task:
|
||||
yesterday: '30 9 * * *' # 每天9:30
|
||||
week: '30 9 * * 1' # 每周一9:30
|
||||
month: '30 9 1 * *' # 每月1号9:30
|
||||
year: '55 0 1 1 *' # 每年1月1号9:30
|
||||
year: '0 9 1 1 *' # 每年1月1号9:30
|
||||
|
||||
# AI回复
|
||||
ai:
|
||||
|
@ -6,6 +6,7 @@ import "strings"
|
||||
// @description: 微信助手
|
||||
type wechat struct {
|
||||
Host string `json:"host" yaml:"host"` // 接口地址
|
||||
VncUrl string `json:"vncUrl" yaml:"vncUrl"` // vnc页面地址
|
||||
AutoSetCallback bool `json:"autoSetCallback" yaml:"autoSetCallback"` // 是否自动设置回调地址
|
||||
Callback string `json:"callback" yaml:"callback"` // 回调地址
|
||||
Forward []string `json:"forward" yaml:"forward"` // 转发地址
|
||||
|
@ -2,7 +2,7 @@ version: '3.9'
|
||||
|
||||
services:
|
||||
wechat:
|
||||
image: lxh01/wxhelper-docker:3.9.5.81
|
||||
image: lxh01/wxhelper-docker:3.9.5.81-v11
|
||||
container_name: gw-wechat
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
@ -10,7 +10,7 @@ services:
|
||||
volumes:
|
||||
- ./data/wechat:/home/app/.wine/drive_c/users/app/Documents/WeChat\ Files
|
||||
ports:
|
||||
- "8080:8080"
|
||||
- "19087:8080"
|
||||
- "19088:19088"
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:19088/api/checkLogin"]
|
||||
|
@ -14,6 +14,8 @@ vim config.yaml # 编辑配置文件,内容如下,最新配置请参考项
|
||||
wechat:
|
||||
# 微信HOOK接口地址
|
||||
host: wechat:19088
|
||||
# 微信容器映射出来的vnc页面地址,没有就不填
|
||||
vncUrl: http://192.168.1.175:19087/vnc_lite.html
|
||||
# 是否在启动的时候自动设置hook服务的回调
|
||||
autoSetCallback: true
|
||||
# 回调IP,如果是Docker运行,本参数必填,如果Docker修改了映射,格式为 ip:port,如果使用项目提供的docker-compsoe.yaml文件启动,可以填`auto`
|
||||
@ -46,7 +48,7 @@ version: '3.9'
|
||||
|
||||
services:
|
||||
wechat:
|
||||
image: lxh01/wxhelper-docker:3.9.5.81
|
||||
image: lxh01/wxhelper-docker:3.9.5.81-v11
|
||||
container_name: gw-wechat
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
@ -54,7 +56,7 @@ services:
|
||||
volumes:
|
||||
- ./data/wechat:/home/app/.wine/drive_c/users/app/Documents/WeChat\ Files
|
||||
ports:
|
||||
- "8080:8080"
|
||||
- "19087:8080"
|
||||
- "19088:19088"
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:19088/api/checkLogin"]
|
||||
|
@ -67,8 +67,7 @@ func dealYear(gid string) {
|
||||
notifyMsgs = append(notifyMsgs, "对于那些未上榜的朋友们,我要说,你们也是我们群聊中非常重要的一部分。你们或许没有在排行榜上留下痕迹,但你们的存在和参与同样不可或缺。你们为群聊注入了新的思维和观点,为我们提供了不同的视角和见解。")
|
||||
notifyMsgs = append(notifyMsgs, "因此,我想特别鼓励未上榜的朋友们,继续发扬你们的热情和积极性。无论是在分享知识、讨论问题、还是互相支持鼓励,你们的贡献都是宝贵的。让我们共同创造一个更加活跃和有意义的群聊环境。")
|
||||
notifyMsgs = append(notifyMsgs, "最后,让我们一起迈向新的一年,相信自己的潜力和可能性,用我们的友谊和互助支持彼此。愿新的一年给我们带来更多的快乐、成功和成长。")
|
||||
notifyMsgs = append(notifyMsgs, "祝福你们新年快乐!让我们一起迎接2022年的到来!")
|
||||
notifyMsgs = append(notifyMsgs, " -- OpnWechat")
|
||||
notifyMsgs = append(notifyMsgs, fmt.Sprintf("祝福你们新年快乐!让我们一起迎接%d年的到来!", time.Now().Local().Year()))
|
||||
notifyMsgs = append(notifyMsgs, " ")
|
||||
notifyMsgs = append(notifyMsgs, fmt.Sprintf("🗣️ 去年本群 %d 位朋友共产生 %d 条发言", len(records), msgCount))
|
||||
notifyMsgs = append(notifyMsgs, "\n🏵 活跃用户排行榜 🏵")
|
||||
|
@ -151,6 +151,15 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{{ if ne .vnc "" }}
|
||||
<input type="radio" name="friend_tab" role="tab" class="tab" aria-label="运行状态"/>
|
||||
<div role="tabpanel" class="tab-content p-6">
|
||||
<div style="height: 747px;width: 1280px;overflow: hidden !important;">
|
||||
<iframe src="{{ .vnc }}" frameborder="0" style="width: 100%;height: 100%;pointer-events: none;"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user