├── .devcontainer ├── Dockerfile ├── devcontainer.json └── sources.list ├── .editorconfig ├── .eslintignore ├── .eslintrc.js ├── .gitignore ├── .prettierrc.js ├── ChangeLog.md ├── img ├── preview.jpg └── qcode.jpg ├── jsconfig.json ├── logo.png ├── package-lock.json ├── package.json ├── readme.md ├── src ├── app.vue ├── components │ ├── card.vue │ ├── course │ │ └── card.vue │ ├── empty.vue │ ├── htmlParser.vue │ ├── list.vue │ ├── listBottom.vue │ ├── mview.vue │ ├── search.vue │ └── share.vue ├── config │ ├── .gitignore │ └── index.example.js ├── icon │ ├── course.png │ ├── course@select.png │ ├── error.png │ ├── home.png │ ├── home@select.png │ ├── home@select.svg │ ├── iconfont.css │ ├── iconfont.less │ ├── index │ │ ├── bus.svg │ │ ├── cal.svg │ │ ├── card.svg │ │ ├── classroom.svg │ │ ├── contact.svg │ │ ├── course_eva.svg │ │ ├── eva.svg │ │ ├── exam.svg │ │ ├── feedback.svg │ │ ├── grade.svg │ │ ├── gs.svg │ │ ├── help.svg │ │ ├── lecture.svg │ │ ├── loan.svg │ │ ├── loan_all.svg │ │ ├── lost_find.svg │ │ ├── money.svg │ │ ├── notify.svg │ │ ├── schedule.svg │ │ └── search.svg │ ├── news.png │ ├── news@select.png │ ├── success.png │ ├── user.png │ └── user@select.png ├── index.template.html ├── less │ ├── app.css │ ├── app.less │ ├── bind.less │ ├── config.css │ └── config.less ├── mixins │ ├── data.js │ ├── ecard.js │ ├── exam.js │ ├── http.js │ ├── modal.js │ ├── move.js │ ├── term.js │ ├── toast.js │ └── verify.js ├── pages │ ├── addSchedule.vue │ ├── bind.vue │ ├── bus.vue │ ├── calendar.vue │ ├── chooseTags.vue │ ├── classroom.vue │ ├── contact │ │ ├── detail.vue │ │ └── lists.vue │ ├── course │ │ ├── comment.vue │ │ ├── commentLists.vue │ │ ├── details.vue │ │ ├── lists.vue │ │ └── search.vue │ ├── details.vue │ ├── ecard.vue │ ├── evaluate │ │ └── lists.vue │ ├── exam.vue │ ├── grade.vue │ ├── help.vue │ ├── index.vue │ ├── lecture │ │ └── lecture.vue │ ├── library │ │ ├── loan.vue │ │ └── search.vue │ ├── lostFind │ │ ├── item.vue │ │ ├── lists.vue │ │ └── new.vue │ ├── my │ │ ├── adConfig.vue │ │ ├── feedback.vue │ │ ├── feedbackDetail.vue │ │ ├── feedbackList.vue │ │ ├── my.vue │ │ ├── notifyConfig.vue │ │ └── userConfig.vue │ ├── newsLists.vue │ ├── schedule.vue │ ├── share │ │ └── schedule.vue │ └── tagLists.vue ├── plugins │ ├── wxParse │ │ ├── html2json.js │ │ ├── htmlparser.js │ │ ├── showdown.js │ │ ├── wxDiscode.js │ │ ├── wxParse.js │ │ ├── wxParse.wxml │ │ └── wxParse.wxss │ └── wxcharts-min.js └── util │ ├── ad.js │ ├── cos-wx-sdk-v5.js │ ├── cos.js │ ├── db.js │ ├── exam │ └── index.js │ ├── grade.js │ ├── http.js │ ├── index │ └── index.js │ ├── login.js │ └── term.js └── wepy.config.js /.devcontainer/Dockerfile: -------------------------------------------------------------------------------- 1 | #------------------------------------------------------------------------------------------------------------- 2 | # Copyright (c) Microsoft Corporation. All rights reserved. 3 | # Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information. 4 | #------------------------------------------------------------------------------------------------------------- 5 | 6 | # To fully customize the contents of this image, use the following Dockerfile instead: 7 | # https://github.com/microsoft/vscode-dev-containers/tree/v0.117.1/containers/typescript-node-12/.devcontainer/Dockerfile 8 | FROM node:12-buster-slim 9 | 10 | # 更换为阿里云源 11 | COPY sources.list /etc/apt/sources.list 12 | 13 | # ** [Optional] Uncomment this section to install additional packages. ** 14 | # 15 | ENV DEBIAN_FRONTEND=noninteractive 16 | RUN apt-get update \ 17 | && apt-get -y install --no-install-recommends git wget curl \ 18 | # 19 | # Clean up 20 | && apt-get autoremove -y \ 21 | && apt-get clean -y \ 22 | && rm -rf /var/lib/apt/lists/* 23 | ENV DEBIAN_FRONTEND=dialog 24 | 25 | # 设置淘宝源 26 | RUN npm config set registry https://registry.npm.taobao.org && \ 27 | npm i wepy-cli -g 28 | -------------------------------------------------------------------------------- /.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- 1 | // For format details, see https://aka.ms/vscode-remote/devcontainer.json or this file's README at: 2 | // https://github.com/microsoft/vscode-dev-containers/tree/v0.117.1/containers/typescript-node-12 3 | { 4 | "name": "scuplus-dev", 5 | "dockerFile": "Dockerfile", 6 | // Set *default* container specific settings.json values on container create. 7 | "settings": { 8 | "terminal.integrated.shell.linux": "/bin/bash" 9 | }, 10 | // Add the IDs of extensions you want installed when the container is created. 11 | "extensions": [ 12 | "dbaeumer.vscode-eslint", 13 | "wleven.wepy-snippets", 14 | "esbenp.prettier-vscode", 15 | "qiu8310.minapp-vscode", 16 | "ms-vscode.vscode-typescript-tslint-plugin", 17 | "octref.vetur" 18 | ], 19 | // Use 'forwardPorts' to make a list of ports inside the container available locally. 20 | // "forwardPorts": [], 21 | // Use 'postCreateCommand' to run commands after the container is created. 22 | "postCreateCommand": "npm i" 23 | // Uncomment to connect as a non-root user. See https://aka.ms/vscode-remote/containers/non-root. 24 | // "remoteUser": "node" 25 | } 26 | -------------------------------------------------------------------------------- /.devcontainer/sources.list: -------------------------------------------------------------------------------- 1 | deb http://mirrors.aliyun.com/debian/ buster main non-free contrib 2 | deb-src http://mirrors.aliyun.com/debian/ buster main non-free contrib 3 | deb http://mirrors.aliyun.com/debian-security buster/updates main 4 | deb-src http://mirrors.aliyun.com/debian-security buster/updates main 5 | deb http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib 6 | deb-src http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib 7 | deb http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib 8 | deb-src http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | dist/* 2 | cos*.js 3 | **/plugins/* -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | parser: "babel-eslint", 4 | parserOptions: { 5 | sourceType: "module", 6 | }, 7 | env: { 8 | browser: true, 9 | }, 10 | // https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style 11 | extends: "standard", 12 | // required to lint *.wpy files 13 | plugins: ["html","prettier"], 14 | settings: { 15 | "html/html-extensions": [".html", ".wpy", ".vue"], 16 | }, 17 | // add your custom rules here 18 | rules: { 19 | // allow paren-less arrow functions 20 | "arrow-parens": 0, 21 | // allow async-await 22 | "generator-star-spacing": 0, 23 | // allow debugger during development 24 | "no-debugger": process.env.NODE_ENV === "production" ? 2 : 0, 25 | "space-before-function-paren": 0, 26 | }, 27 | }; 28 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | dist 2 | node_modules 3 | .wepy* 4 | .vscode 5 | .idea 6 | src/config/index.js 7 | -------------------------------------------------------------------------------- /.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "printWidth": 80, //一行的字符数,如果超过会进行换行,默认为80 3 | "tabWidth": 2, //一个tab代表几个空格数,默认为80 4 | "useTabs": false, //是否使用tab进行缩进,默认为false,表示用空格进行缩减 5 | "singleQuote": false, //字符串是否使用单引号,默认为false,使用双引号 6 | "semi": true, //行位是否使用分号,默认为true 7 | "trailingComma": "none", //是否使用尾逗号,有三个可选值"" 8 | "bracketSpacing": true, //对象大括号直接是否有空格,默认为true,效果:{ foo: bar } 9 | "parser": "babylon" //代码的解析引擎,默认为babylon,与babel相同。 10 | } -------------------------------------------------------------------------------- /ChangeLog.md: -------------------------------------------------------------------------------- 1 | # ChangeLog 2 | 3 | [toc] 4 | 5 | ## 0.7.0 6 | - [x] 资讯页面 7 | - [x] 新增tabs选择页面 8 | - [x] 列表页面优化 9 | - [x] 文章详情页面,文章链接点击复制 10 | - [ ] ~~文章详情页面,文档预览(暂时不做,链接太多,如果通过服务器中转又会导致严重占用带宽)~~ 11 | - [x] 新增10个左右网站爬虫, 去除scuinfo爬虫 12 | - [x] 校车背景调整 13 | - [x] 修复校历下拉刷新后事件重复的bug,校历页面优化 14 | - [x] 校历新增分享 15 | - [x] Toast去除图标以显示更多的信息 16 | - [x] 更新检测 17 | 18 | ## 0.6.1 19 | 20 | 新增校车时刻表 21 | 修复校历周次bug #61 22 | 绩点计算器新增选择所有必修课成绩 #60 23 | 图标修改为全局引入 24 | 25 | ## 0.6.0 26 | - [x] 反馈功能优化 27 | - [x] 新增我的反馈(可以查看我的所有反馈信息) 28 | - [x] 新增个人中心,包括(反馈中心,我的反馈,bug上报,功能建议,修改绑定账号,获取微信用户昵称等功能) 29 | - [x] 新增文章分享功能,生成带二维码的图片 30 | - [x] 新增校历,事件通过数据库保存,例如开学日期,放假日期,国庆节等 31 | - [x] 课程表优化,本地只显示当前周次上课的课程 32 | - [x] 新增绩点计算功能 33 | 34 | ## 0.5.0 35 | 36 | 0.4.0 版本功能包含在0.5.0当中, 0.4.0未独立上线 37 | 38 | - [x] 添加后台任务队列服务 39 | - [x] 成绩自动更新 40 | - [x] 一卡通 41 | - [x] 图书借阅 42 | - [x] 课程表 43 | - [x] 新增通知系统,第一版仅包含小程序模板消息 44 | - [x] 修改账号绑定方式,采用统一认证账号 45 | - [ ] 新增个人中心页面,添加修改绑定账号功能 @前端 // 放置到0.5.1 完成 46 | - [x] 新增一卡通数据查询功能 47 | - [x] 修改前端组件获取足够的模板消息id @前端 48 | - [x] 添加redis服务作为消息队列与缓存数据库 49 | 50 | ## 0.3.0 51 | 52 | - [x] 图书借阅信息 53 | - [x] 当前借阅 54 | - [x] 历史借阅 55 | - [x] 图书搜索 56 | 57 | ## 0.2.0 58 | 59 | - [x] 反馈 60 | - [x] 我要自习 61 | - [x] tagList 62 | 63 | ## 0.1.0 64 | 65 | - [x] 基础框架 66 | - [x] 最新图文资讯(基础版) 67 | - [x] 青春川大 68 | - [x] scuinfo 69 | - [x] 学工部 70 | - [x] 教务处 71 | - [x] 川大在线 72 | - [x] 社团联[暂未在tab显示] 73 | 74 | - [x] 课程表 75 | - [x] 成绩(基础版) 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /img/preview.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohuishou/scuplus-wechat/3c5b8e6e7d1358c8cd45915e797c1e566c2ca8dd/img/preview.jpg -------------------------------------------------------------------------------- /img/qcode.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohuishou/scuplus-wechat/3c5b8e6e7d1358c8cd45915e797c1e566c2ca8dd/img/qcode.jpg -------------------------------------------------------------------------------- /jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "include": [ 3 | "./src/**/*" 4 | ] 5 | } -------------------------------------------------------------------------------- /logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohuishou/scuplus-wechat/3c5b8e6e7d1358c8cd45915e797c1e566c2ca8dd/logo.png -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "scuplus", 3 | "version": "1.5.1", 4 | "description": "", 5 | "main": "dist/app.js", 6 | "scripts": { 7 | "dev": "wepy build --watch", 8 | "build": "cross-env NODE_ENV=production wepy build --no-cache", 9 | "test": "echo \"Error: no test specified\" && exit 1" 10 | }, 11 | "author": "", 12 | "license": "MIT", 13 | "dependencies": { 14 | "dayjs": "^1.6.5", 15 | "wepy": "^1.7.2", 16 | "wepy-async-function": "^1.4.4", 17 | "wepy-com-toast": "^1.0.2" 18 | }, 19 | "devDependencies": { 20 | "babel-eslint": "^7.2.1", 21 | "babel-plugin-transform-class-properties": "^6.24.1", 22 | "babel-plugin-transform-decorators-legacy": "^1.3.4", 23 | "babel-plugin-transform-export-extensions": "^6.22.0", 24 | "babel-plugin-transform-node-env-inline": "^0.3.0", 25 | "babel-plugin-transform-object-rest-spread": "^6.26.0", 26 | "babel-preset-env": "^1.6.1", 27 | "cross-env": "^5.1.3", 28 | "eslint": "^3.19.0", 29 | "eslint-config-standard": "^7.1.0", 30 | "eslint-friendly-formatter": "^2.0.7", 31 | "eslint-plugin-html": "^3.0.3", 32 | "eslint-plugin-prettier": "^3.1.3", 33 | "eslint-plugin-promise": "^3.8.0", 34 | "eslint-plugin-standard": "^2.0.1", 35 | "eslint-plugin-vue": "^6.2.2", 36 | "i": "^0.3.6", 37 | "wepy-compiler-babel": "^1.5.1", 38 | "wepy-compiler-less": "^1.3.10", 39 | "wepy-eslint": "^1.5.4", 40 | "wepy-plugin-imagemin": "^1.5.2", 41 | "wepy-plugin-uglifyjs": "^1.3.6" 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # SCUPLUS - 微信小程序[We川大] 2 | 3 | > 这是一个主要服务四川大学师生的一个综合工具类微信小程序 4 | > 这应该是目前为止四川大学功能最为全面也是最好的工具类应用了 5 | > 目前小程序在积极开发阶段主要以实现功能为主,代码结构以及API随时可能改变,稳定版本出来之后会整理一份API,方便其他学校想要快速搭建小程序的同学 6 | 7 | 小程序采用wepy开发,不知道怎么取名字,仿照we重邮取了一个 8 | 9 | ## APIDOC 10 | 11 | 开发者已经毕业,小程序不会有大的变动,1.0版本已经发布,接下来会陆续完善小程序当中所涉及到的所有API 12 | [https://documenter.getpostman.com/view/364695/RWaGUpsy](https://documenter.getpostman.com/view/364695/RWaGUpsy) 13 | 14 | ## 后端 15 | https://github.com/mohuishou/scuplus-go 16 | 17 | ## 功能概要 18 | 19 | - [x] 成绩查询/绩点计算器/成绩更新通知 20 | - [x] 我的课程表(完善的课程表,包含时间日期,并且可以自定义) 21 | - [x] 图书搜索/我的借阅/续借/历史借阅/图书到期通知 22 | - [x] 空闲/自习教室 23 | - [x] 一卡通信息 24 | - [x] 考表/考试通知 25 | - [x] 校历(基础的日历功能,事件订阅功能待开发) 26 | - [x] 校车时刻表 27 | - [x] 资讯(完善的资讯功能,类似今日头条,网易新闻,可以选择不超过10个栏目) 28 | - [x] 反馈/查看/评论/通知(已整合github issues) 29 | - [x] 寻课(课程助手,可以获取课程详细信息,拥有该课程的用户可以进行评价) 30 | - [x] 寻物/寻卡(失物招领,并且针对校园卡单独分类) 31 | 32 | ## 预览 33 | > 部分页面,截止于0.9.2 34 | 35 | ![img/preview.jpg](img/preview.jpg) 36 | 37 | ## 安装说明 38 | 39 | > 已经配置好了容器化开发环境只需要安装 vscode、docker 即可快速使用 40 | 41 | ### 开发工具 42 | 43 | - vscode(已安装扩展: ms-vscode-remote.remote-containers) 44 | - docker 45 | 46 | ### 1. 克隆本仓库 47 | 48 | ```bash 49 | git clone git@github.com:mohuishou/scuplus-wechat.git 50 | ``` 51 | 52 | ### 2. vscode 中点击左下角, 选择 remote-container: open in 53 | 54 | ### 3. 修改配置文件 55 | ```bash 56 | cd src/config 57 | mv index.example.js index.js 58 | ``` 59 | 60 | ### 4. 开启实时编译 61 | ```bash 62 | npm run dev 63 | ``` -------------------------------------------------------------------------------- /src/app.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 162 | -------------------------------------------------------------------------------- /src/components/card.vue: -------------------------------------------------------------------------------- 1 | 87 | 88 | 105 | 106 | 140 | -------------------------------------------------------------------------------- /src/components/course/card.vue: -------------------------------------------------------------------------------- 1 | 42 | 43 | 63 | 64 | 88 | -------------------------------------------------------------------------------- /src/components/empty.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | 26 | 27 | 38 | -------------------------------------------------------------------------------- /src/components/htmlParser.vue: -------------------------------------------------------------------------------- 1 |