当前位置:网站首页>基于微信小程序的幼儿园招生报名系统开发笔记
基于微信小程序的幼儿园招生报名系统开发笔记
2022-08-08 14:41:00 【InfoQ】
开发背景
- 以幼儿园新学期新学年招生报名为核心,
- 兼顾幼儿园环境图文展示(室内,室外,文娱,起居等),幼儿园招生政策答疑,最新动态新闻,幼儿园食谱介绍,报名项目海报分享等,
- 目的是方便园方方便的统计幼儿登记资料,合理的控制报名人数,幼儿家长可以填写幼儿的基本信息,住址信息,监护人信息等资料(可自定义设置),
- 园方人员根据资料可以做预先审核,并提示用户修改完善资料,并可查看和导出名单Excel,审核报名记录等,大大减少了现场报名的人力成本,数字化手段提高了工作效率, 也为家长节省了时间。
功能图

技术运用
- 本项目使用微信小程序平台进行开发。
- 使用腾讯专门的小程序云开发技术,云资源包含云函数,数据库,带宽,存储空间,定时器等,资源配额价格低廉,无需域名和服务器即可搭建。
- 小程序本身的即用即走,适合小工具的使用场景,也适合快速开发迭代。
- 云开发技术采用腾讯内部链路,没有被黑客攻击的风险,安全性高且免维护。
- 资源承载力可根据业务发展需要随时弹性扩展。
数据库设计
报名项目表
EnrollModel.DB_STRUCTURE = {
_pid: 'string|true',
ENROLL_ID: 'string|true',
ENROLL_TITLE: 'string|true|comment=标题',
ENROLL_STATUS: 'int|true|default=1|comment=状态 0=未启用,1=使用中',
ENROLL_CATE_ID: 'string|true|default=0|comment=分类',
ENROLL_CATE_NAME: 'string|false|comment=分类冗余',
ENROLL_CANCEL_SET: 'int|true|default=1|comment=取消设置 0=不允,1=允许,2=仅截止前可取消,3=审核后不可取消',
ENROLL_EDIT_SET: 'int|true|default=1|comment=修改 0=不允,1=允许,2=仅截止前可,3=审核后不可修改',
ENROLL_CHECK_SET: 'int|true|default=0|comment=审核 0=不需要审核,1=需要审核',
ENROLL_MAX_CNT: 'int|true|default=20|comment=人数上限 0=不限',
ENROLL_START: 'int|false|comment=开始时间',
ENROLL_END: 'int|false|comment=截止时间',
ENROLL_ORDER: 'int|true|default=9999',
ENROLL_VOUCH: 'int|true|default=0',
ENROLL_FORMS: 'array|true|default=[]',
ENROLL_OBJ: 'object|true|default={}',
ENROLL_JOIN_FORMS: 'array|true|default=[]',
ENROLL_QR: 'string|false',
ENROLL_VIEW_CNT: 'int|true|default=0',
ENROLL_JOIN_CNT: 'int|true|default=0',
ENROLL_ADD_TIME: 'int|true',
ENROLL_EDIT_TIME: 'int|true',
ENROLL_ADD_IP: 'string|false',
ENROLL_EDIT_IP: 'string|false',
};
用户报名表
EnrollJoinModel.DB_STRUCTURE = {
_pid: 'string|true',
ENROLL_JOIN_ID: 'string|true',
ENROLL_JOIN_ENROLL_ID: 'string|true|comment=报名PK',
ENROLL_JOIN_IS_ADMIN: 'int|true|default=0|comment=是否管理员添加 0/1',
ENROLL_JOIN_USER_ID: 'string|true|comment=用户ID',
ENROLL_JOIN_FORMS: 'array|true|default=[]|comment=表单',
ENROLL_JOIN_STATUS: 'int|true|default=1|comment=状态 0=待审核 1=报名成功, 99=审核未过',
ENROLL_JOIN_REASON: 'string|false|comment=审核拒绝或者取消理由',
ENROLL_JOIN_LAST_TIME: 'int|true|default=0',
ENROLL_JOIN_ADD_TIME: 'int|true',
ENROLL_JOIN_EDIT_TIME: 'int|true',
ENROLL_JOIN_ADD_IP: 'string|false',
ENROLL_JOIN_EDIT_IP: 'string|false',
};
核心逻辑
async enrollJoin(userId, enrollId, forms) {
// 登记是否结束
let whereEnroll = {
_id: enrollId,
ENROLL_STATUS: EnrollModel.STATUS.COMM
}
let enroll = await EnrollModel.getOne(whereEnroll);
if (!enroll)
this.AppError('该' + ENROLL_NAME + '不存在或者已经停止');
// 是否登记开始
if (enroll.ENROLL_START > this._timestamp)
this.AppError('该' + ENROLL_NAME + '尚未开始');
// 是否过了登记截止期
if (enroll.ENROLL_END < this._timestamp)
this.AppError('该' + ENROLL_NAME + '已经截止');
// 人数是否满
if (enroll.ENROLL_MAX_CNT > 0) {
let whereCnt = {
ENROLL_JOIN_ENROLL_ID: enrollId,
ENROLL_JOIN_STATUS: ['in', [EnrollJoinModel.STATUS.WAIT, EnrollJoinModel.STATUS.SUCC]]
}
let cntJoin = await EnrollJoinModel.count(whereCnt);
if (cntJoin >= enroll.ENROLL_MAX_CNT)
this.AppError('该' + ENROLL_NAME + '人数已满');
}
// 自己是否已经有登记
let whereMy = {
ENROLL_JOIN_USER_ID: userId,
ENROLL_JOIN_ENROLL_ID: enrollId,
ENROLL_JOIN_STATUS: ['in', [EnrollJoinModel.STATUS.WAIT, EnrollJoinModel.STATUS.SUCC]]
}
let my = await EnrollJoinModel.getOne(whereMy);
if (my) {
if (my.ENROLL_JOIN_STATUS == EnrollJoinModel.STATUS.WAIT)
this.AppError('您已经填报,正在等待审核,无须重复填报');
else
this.AppError('您已经填报成功,无须重复填报');
}
// 入库
let data = {
ENROLL_JOIN_USER_ID: userId,
ENROLL_JOIN_ENROLL_ID: enrollId,
ENROLL_JOIN_STATUS: (enroll.ENROLL_CHECK_SET == 0) ? EnrollJoinModel.STATUS.SUCC : EnrollJoinModel.STATUS.WAIT,
ENROLL_JOIN_FORMS: forms
}
let enrollJoinId = await EnrollJoinModel.insert(data);
// 统计数量
this.statEnrollJoin(enrollId);
let check = enroll.ENROLL_CHECK_SET;
return { enrollJoinId, check }
}
UI





后台系统







代码
边栏推荐
- 万字长文:常见的软件测试面试题(附答案)
- Common regularization methods in deep learning (Regularization) and detailed explanation of WeightDecay parameters in optimizers
- 【控制】动力学建模简介 --> 牛顿-欧拉 (Newton-Euler) 法和拉格朗日 (Lagrange) 法
- shell三剑客-----awk命令
- 【Kaggle实践记录】电商图片分类
- 面试官:Redis 大 key 要如何处理?
- kali换源详细步骤
- 2022-08-07 The fifth group Gu Xiangquan study notes day31-collection-Map collection
- JS-BOM-名字转换器-输入名字位置颠倒
- Code Casual Recording Notes_Dynamic Programming_322 Change Exchange
猜你喜欢
全网最全的AItium Designer 16下载资源与安装步骤
想去银行测试?那这套题目你必须要会
[Redis] Bitmap and usage scenarios of bitmap (statistics of online people and user online status)
Code Casual Recording Notes_Dynamic Programming_322 Change Exchange
你真的会软件测试bug分析定位嘛
idea增加左右箭头
IT故障快速解决就用行云管家!快速安全!
华为云云数据库RDS MySQL 版初试探【华为云至简致远】
JS-Bom-while(计算闰年)
Mx_yolov3环境配置+模型测试训练
随机推荐
面试官:Redis 大 key 要如何处理?
小白大白读论文-关于EfficientNetV2论文的 疑问 与 总结
P8352-[SDOI/SXOI2022]小N的独立集【dp套dp】
Code Casual Recording Notes_Dynamic Programming_322 Change Exchange
【小码匠自习室】ABC180-C: 马虎是小孩的天性吗?
【系统设计】S3 对象存储
良心到难以置信的网站推荐第7期丨全程干货
kali换源详细步骤
1052. The Angry Bookstore Boss
基于ModelArts的StyleGAN3生成高清图丨【华为云至简致远】
[Redis] Bitmap and usage scenarios of bitmap (statistics of online people and user online status)
UOJ#748-[UNR #6]机器人表演【dp】
"Small yards artisan study room" friends of friends is not a friend
设计一个跨平台的即时通讯系统(采用华为云ECS服务器作为服务端 )【华为云至简致远】
什么样的程序员在35岁依然被公司抢着要?打破程序员“中年危机”
MySQL中UNION和UNION ALL的区别
什么是幂等性
全网最全的PADS 9.5安装教程与资源包
什么是发饰hair accessories?
兆骑科创赛事服务平台对接,海内外高层次人才引进