Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

17 Commits

Folders and files

Repository files navigation

CUC 羽毛球场地监测(捡漏)

功能

  • 定期监测羽毛球场地的使用情况
  • 今明两日空闲场地自动邮件通知

使用

1-从代码部署

  1. 下载代码
git clone github.com/lihan3238/orderBadminton.git
cd orderBadminton
  1. 安装依赖
go get github.com/gin-gonic/gin
  1. 配置邮箱

在目录下创建 email_config.json 文件并进行配置:

{
    "from": "xxx@xxx.com",          // 发件人邮箱
    "password": "qwedqwwdqw",       // 发件人邮箱授权码(SMTP)
    "to": [                         // 需要接收提醒的收件人邮箱
        "xxx@xxx.com",
        "mmm@mmm.com"
    ],
    "smtp_host": "smtp.xxx.com",    // SMTP服务器地址
    "smtp_port": "25"               // SMTP服务器端口(非SSL)
}
  1. 运行
go run main.go
  • 默认每 15s 监测一次场地使用情况,如需修改,请在 /static/script.js 中修改 setInterval 的参数:
setInterval(updateStatus, 15000);//将 15000 修改为你想要的时间间隔(单位:ms)

2-从 EXE 应用部署

  1. 下载 EXE 应用

从 Github 下载orderBadminton

  1. 目录结构
project/
├── orderBadminton.exe
├── email_config.json
└── static/
    ├── index.html
    ├── style.css
    └── script.js
  1. 配置邮箱

在目录下创建 email_config.json 文件并进行配置:

{
    "from": "xxx@xxx.com",          // 发件人邮箱
    "password": "qwedqwwdqw",       // 发件人邮箱授权码(SMTP)
    "to": [                         // 需要接收提醒的收件人邮箱
        "xxx@xxx.com",
        "mmm@mmm.com"
    ],
    "smtp_host": "smtp.xxx.com",    // SMTP服务器地址
    "smtp_port": "25"               // SMTP服务器端口(非SSL)
}
  1. 运行
./orderBadminton.exe
  • 默认每 15s 监测一次场地使用情况,如需修改,请在 /static/script.js 中修改 setInterval 的参数:
setInterval(updateStatus, 15000);//将 15000 修改为你想要的时间间隔(单位:ms)

注意

声明

本项目完全出于学习目的,禁止用于任何商业用途。 本项目不对任何人或组织负责,使用本项目的代码和数据所产生的后果由使用者自行承担。

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages