当前位置:网站首页>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
边栏推荐
猜你喜欢
随机推荐
投资一个约20台桩的充电站需要多少钱?多久可以实现盈利?
基于微信小程序的幼儿园招生报名系统开发笔记
万字长文:常见的软件测试面试题(附答案)
俄驻美大使馆:扎波罗热核电站遭炮击威胁欧洲核安全
直播卖货APP——为何能得到商家和用户的喜欢?
什么是低代码开发?大家都真的看好低代码开发吗?
【小码匠自习室】CSP-J/S复试高分秘诀经验分享
兆骑科创赛事服务平台对接,海内外高层次人才引进
1052. 爱生气的书店老板
Code Casual Recording Notes_Dynamic Programming_322 Change Exchange
1052. The Angry Bookstore Boss
JS-Bom-while (calculate leap year)
vijos1212 Way Selection
[内部资源] 想拿年薪30W的软件测试人员,这份资料必须领取
文献阅读_VistaNet:用于多模式情绪分析的视觉方面注意网络
医学图像数据增强-归一化
Introduction to Recurrent Neural Network (RNN)
Is it safe to open an account in China Galaxy Securities?
面试官:Redis 大 key 要如何处理?
2022-08-07 第五小组 顾祥全 学习笔记 day31-集合-Map集合