Skip to content

Commit

Permalink
青龙报错修改
Browse files Browse the repository at this point in the history
  • Loading branch information
lengsukq committed Jan 15, 2024
1 parent 4a45650 commit 218b4b3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#daily_push
# daily_push——微信每日推送

获取各种参数的过程参考:https://www.coolapk.com/feed/38579891?shareKey=NGI3ZGZlZTM4MDBjNjMwMzdlM2M~&shareUid=3198334&shareFrom=com.coolapk.app_4.10

Expand All @@ -7,9 +7,10 @@
npm i
node index.js
```

可以部署到coding开启自动化构建,以达到每天定时发送消息的效果。参考:https://www.coolapk.com/feed/51238147?shareKey=Zjk0N2UwZTFjNjcwNjU3YThjNjg~&shareUid=1528711&shareFrom=com.coolapk.market_13.2.1<br>
可以使用GitHub Actions以达到每日自动发送消息,默认发送时间为七点半。
# 部署方式
1、可以部署到coding开启自动化构建,以达到每天定时发送消息的效果。参考:https://www.coolapk.com/feed/51238147?shareKey=Zjk0N2UwZTFjNjcwNjU3YThjNjg~&shareUid=1528711&shareFrom=com.coolapk.market_13.2.1<br>
2、可以使用GitHub Actions以达到每日自动发送消息,默认发送时间为七点半。<br>
3、青龙面板

config.json配置说明:
```text
Expand Down
5 changes: 3 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const basicInfo = async () => {
}
// 获取城市id
const getCityId = async () => {
await axios.get(`https://geoapi.qweather.com/v2/city/lookup?location=${configs.location}&adm=${configs.adm}&key=${configs.key}`)
await axios.get(`https://geoapi.qweather.com/v2/city/lookup?location=${encodeURIComponent(configs.location)}&adm=${encodeURIComponent(configs.adm)}&key=${configs.key}`)
.then((res) => {
let data = res.data;
//这里获得整个请求响应对象
Expand Down Expand Up @@ -217,7 +217,7 @@ const sendMessage = async (accessToken,upInfo)=>{
});
}

export async function mainFn() {
async function mainFn() {
await oneWords();
await basicInfo();
await getAccessToken();
Expand All @@ -239,3 +239,4 @@ mainFn().then(r => {
console.log('mainFn', r, configs)
})

module.exports=mainFn;
6 changes: 2 additions & 4 deletions ql-main.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 218b4b3

Please sign in to comment.