From 7352c847b8ddc87f3398e3169168dadac4a2145b Mon Sep 17 00:00:00 2001 From: johlanse Date: Thu, 4 Aug 2022 11:01:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- conf/config.go | 11 ++++++----- docs/config.md | 3 +++ docs/index.html | 2 +- docs/linux/index.md | 8 +++++++- docs/problem.md | 7 ++++--- docs/push.md | 17 +++++++++++++---- 6 files changed, 34 insertions(+), 14 deletions(-) diff --git a/conf/config.go b/conf/config.go index 0900805..4be3232 100644 --- a/conf/config.go +++ b/conf/config.go @@ -36,11 +36,12 @@ type Config struct { QQ struct { } Web struct { - Enable bool `json:"enable" yaml:"enable"` - Account string `json:"account" yaml:"account"` - Password string `json:"password" yaml:"password"` - Host string `json:"host" yaml:"host"` - Port int `json:"port" yaml:"port"` + Enable bool `json:"enable" yaml:"enable"` + Account string `json:"account" yaml:"account"` + Password string `json:"password" yaml:"password"` + Host string `json:"host" yaml:"host"` + Port int `json:"port" yaml:"port"` + Announcement string `json:"announcement" yaml:"announcement"` } `json:"web"` Cron string `json:"cron" yaml:"cron"` EdgePath string `json:"edge_path" yaml:"edge_path"` diff --git a/docs/config.md b/docs/config.md index 5f79348..c3bbe48 100644 --- a/docs/config.md +++ b/docs/config.md @@ -1,4 +1,7 @@ ## 配置文件 + +> 配置文件修改后需要重启程序才能生效 + ```yaml # 刷课模式,默认为3, # 1:只刷文章何视频 diff --git a/docs/index.html b/docs/index.html index 92c1c59..e585355 100644 --- a/docs/index.html +++ b/docs/index.html @@ -3,7 +3,7 @@ - Docsify-Guide + Study_xxqg 适用于部署在服务器上或者家里有公网IP的设备上 @@ -60,7 +62,9 @@ web: password: admin ``` -开启后通过浏览器访问 *http://ip:port*即可打开网址 ++ 开启后通过浏览器访问 *http://ip:port*即可打开网址 ,若为docker运行,则ip为宿主机公网ip,端口为docker映射到宿主机的端口 ++ 若无法访问,首先检查程序运行日志,查看有无报错,其次查看docker的运行情况,端口是否映射正常,然后可以通过curl命令检测在宿主机中能否访问,然后检查防火墙之类的 ++ 若点击登录之后出现一个小框然后无反应,则说明账户密码错误,请重新配置程序账户密码并重启程序 ### 钉钉推送 配置config.yml的如下部分,具体使用教程详情参考[钉钉](https://developers.dingtalk.com/document/robots/custom-robot-access?spm=ding_open_doc.document.0.0.7f875e5903iVpC#topic-2026027) @@ -70,6 +74,11 @@ ding: access_token: "" secret: "" ``` ++ 在电脑端钉钉中创建群聊,在聊天设置中选择只能群助手,选择添加机器人,机器人类别选择webhook自定义机器人 ++ 机器人名字任意,机器人安全设置勾选加签,复制加签的密钥,作为secret配置项填入配置文件中 ++ 勾选协议,确认添加,会出现一个webhook地址,形如这样:```https://oapi.dingtalk.com/robot/send?access_token=aaabbbbcccc``` ++ 将上述地址中的后半段,就是access_token=之后的内容作为access_token配置项填入配置文件中,例如上述网址,则填入aaabbbccc到access_token中 ++ 设置定时cron,启动程序,程序会在定时时间运行脚本 ### pushplus推送 配置config.yml的如下部分,具体使用教程参考[pushplus](https://www.pushplus.plus/)