Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

部署说明

推荐使用uv工具 运行 uv sync 或者直接用pip install Requests BeautifulSoup4 PyExecJS FastAPI uvicorn

Requests 发送http请求 BeautifulSoup4 解析html,方便获取页面内容 PyExecJS 运行js FastAPI 框架搭建后端服务器服务 uvicorn 运行FastAPI服务器

Node.js 环境 // 运行encry.js,(post)login 发送加密后的密码需要

测试: 运行 main.py

curl -i -X POST http://127.0.0.1:8000/api/login
-H "Content-Type: application/json"
-d '{"username":"","password":""}' 替换username,password字段(教务系统的帐号密码),发送登录请求

如果登录成功,测试/api/schedule 无参时返回当前周的课表 curl -i -X GET http://127.0.0.1:8000/api/schedule 有参时写法 curl -i -X GET http://127.0.0.1:8000/api/schedule?monday=2025-12-08&sunday=2025-12-14

前后端通信流程 参考SPA

前端点击登录按钮,通过wx.request向后端http://127.0.0.1:8000/api/login发送post请求,带json数据{username="",password=""} 对接收的js信息进行判断 if success wx.navigateTo({url: '/pages/index/index'}) else wx.showToast({title: '登录失败'})

schedule页面加载时向后端发送请求

前端实现

页面效果

About

wechat-miniprogram-qust-schedule

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages