CC 通用成绩查询小程序 (云开发无服务器解决方案)

项目介绍
本小程序包括成绩查询(学科成绩,考级成绩,竞赛成绩,其他成绩),后台成绩科目管理,后台成绩导入,后台成绩管理等功能模块!

功能说明

技术运用
项目使用微信小程序平台进行开发。
使用腾讯云开发技术,免费资源配额,无需域名和服务器即可搭建。
小程序本身的即用即走,适合小工具的使用场景,也适合程序的开发。
项目效果截图



项目后台截图




导入数据的 Excel 文档成绩样本格式

部署教程:
1 源码导入微信开发者工具

2 开通云开发环境
参考微信官方文档:https://developers.weixin.qq.com/miniprogram/dev/wxcloud/basis/getting-started.html
在使用云开发能力之前,需要先开通云开发。
在开发者工具的工具栏左侧,点击 “云开发” 按钮即可打开云控制台,根据提示开通云开发,并且创建一个新的云开发环境。

每个环境相互隔离,拥有唯一的环境 ID(拷贝此 ID,后面配置用到),包含独立的数据库实例、存储空间、云函数配置等资源;
3 云函数及配置
本项目使用到了一个云函数 score_cloud
在云函数 cloudfunctions 文件夹下选择云函数 score_cloud , 右键选择在终端中打开,然后执行
npm install –product


打开 cloudfunctions/score_cloud/comm/ccmini_config.js 文件,配置环境 ID 和后台管理员账号和密码

本系统需要导入 Excel 文件,需要在云函数安装 Excel 内库支持,
在云函数 cloudfunctions 文件夹下选择云函数 score_cloud , 右键选择在终端中打开,然后执行
npm install node-xlsx

4 客户端配置
打开 miniprogram/app.js 文件,配置环境 ID

5 云函数配置
在微信开发者工具-》云开发-》云函数-》对指定的函数添加环境变量
[服务端时间时区 TZ] =>Asia/Shanghai
[函数内存] =>128M
[函数超时时间] => 60 秒

6 设置图片域名信任关系
进入小程序 开发管理=》开发设置=》服务器域名 =》downloadFile 合法域名
添加 2 个域名:
1)你的云存储域名,格式类似:https://1234-test-pi5po-1250248.tcb.qcloud.la
2)微信头像域名:https://thirdwx.qlogo.cn

7 上传云函数 &指定云环境 ID

评论