当前位置:网站首页>Notes on the development of kindergarten enrollment registration system based on WeChat applet
Notes on the development of kindergarten enrollment registration system based on WeChat applet
2022-08-08 14:48:00 【InfoQ】
开发背景
- The core is the enrollment registration for the new semester and the new school year of kindergarten,
- Taking into account the graphic display of the kindergarten environment(室内,室外,文娱,living, etc.),Kindergarten Admissions Policy Answers,Latest dynamic news,Introduction to kindergarten recipes,Registration project poster sharing, etc,
- The purpose is to facilitate the kindergarten to conveniently count the registration data of children,Reasonable control of the number of applicants,Parents of young children can fill in the basic information of their children,住址信息,Guardian information, etc(可自定义设置),
- The garden staff can do pre-review based on the information,And prompt the user to modify and improve the information,And can view and export the listExcel,审核报名记录等,The labor cost of on-site registration is greatly reduced,Digital means improve work efficiency, It also saves time for parents.
功能图

技术运用
- 本项目使用微信小程序平台进行开发.
- 使用腾讯专门的小程序云开发技术,云资源包含云函数,数据库,带宽,存储空间,定时器等,资源配额价格低廉,无需域名和服务器即可搭建.
- 小程序本身的即用即走,适合小工具的使用场景,也适合快速开发迭代.
- 云开发技术采用腾讯内部链路,没有被黑客攻击的风险,安全性高且免维护.
- 资源承载力可根据业务发展需要随时弹性扩展.
数据库设计
报名项目表
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=It cannot be cancelled after review',
ENROLL_EDIT_SET: 'int|true|default=1|comment=修改 0=不允,1=允许,2=仅截止前可,3=It cannot be modified after review',
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',
};
User registration form
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) {
// Whether the registration is over
let whereEnroll = {
_id: enrollId,
ENROLL_STATUS: EnrollModel.STATUS.COMM
}
let enroll = await EnrollModel.getOne(whereEnroll);
if (!enroll)
this.AppError('该' + ENROLL_NAME + 'does not exist or has been discontinued');
// Whether to start registration
if (enroll.ENROLL_START > this._timestamp)
this.AppError('该' + ENROLL_NAME + '尚未开始');
// Whether the registration deadline has passed
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 + '人数已满');
}
// whether you have already registered
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('You have already filled in,正在等待审核,No need to refill');
else
this.AppError('You have filled in successfully,No need to refill');
}
// 入库
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





后台系统







代码
https://gitee.com/leerechard/KidEnroll
边栏推荐
- Mx_yolov3环境配置+模型测试训练
- Common regularization methods in deep learning (Regularization) and detailed explanation of WeightDecay parameters in optimizers
- 1
- HMS Core分析服务智能运营6.5.1版本上线
- Talking about the underlying data structure of Redis
- 非科班毕业生,五面阿里:四轮技术面+HR一面已拿offer
- 超详细的最新版 2022.2 kali 安装步骤及拍摄快照的方法
- JDBC工具类的封装及使用
- 看三年的CRUD程序员如何解决数据库死锁的
- 【控制】动力学建模举例 --> 拉格朗日法
猜你喜欢
随机推荐
星起航跨境—跨境电商进入3.0时代,卖家迎来全新机遇
如何使用 Eolink 实现 API 文档自动生成
【小码匠自习室】重做ABC250-D, 我无力反抗
企业开发小程序有什么优势?为什么要开发小程序?
从洞察到决策,一文解读标签画像体系建设方法论丨DTVision分析洞察篇
Introduction to Recurrent Neural Network (RNN)
IBM3650M4的ESXI主机报警“其他主机硬件对象的状态”
增效降本开源节流,2022年技术趋势前瞻(异步编程/容器技术)
【小码匠自习室】 [NOI Online 2022 入门组] 王国比赛
JS加法器(DOM)
【小码匠自习室】朋友的朋友不是朋友
1052. The Angry Bookstore Boss
【小码匠自习室】ABC179-C:代码竟然没排倒数堪称一大奇迹
基于微信小程序的幼儿园招生报名系统开发笔记
token系统讲解及过期处理
JS-Bom-while(计算闰年)
bandanas Kerchief头巾是何含义?
【系统设计】S3 对象存储
PostgreSQL 用户与schema有什么区别?
Shell Three Musketeers-----sed command