# family-bucket **Repository Path**: aizhangcheng/family-bucket ## Basic Information - **Project Name**: family-bucket - **Description**: 音乐+电子书 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-04-15 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README 1、关于登录,可根据权重分配登录用户的权限,0=>超级管理员最高级别,可操作1=>普通管理员和2=>普通用户(增删改查), 可以决定他们的权重,普通管理员可以操作普通用户(增删改查) 2、sqlite和nedb本地数据库,决定使用nedb存储用户名密码等数据 3、其他数据使用mysql 4、思考使用node.js还是springboot搭建后台 nedb用法 查 // this.$db.find({userName: this.userName, password: this.password}, (err, docs) => { // if (err) { // this.$message.error(err); // return; // } // if (docs.length === 1) { // this.$message.success('登陆成功!'); // this.close(); // } else { // this.$message.error("查询无果!"); // } // }); this.$db.find({userName: this.userName}, (err, docs) => { if (err) { this.$message.error(err); return; } if (docs.length >= 1) { this.$message.error("该用户名已被注册,请切换用户名"); } else { 增 this.$db.insert({ userName: this.userName, password: this.password, weight: this.weight, createTime: new Date() }, (err, newDocs) => { if (err) { this.$message.error(err); return; } this.$message.success('注册成功啦,请进行登陆'); this.close(); } ); } }); // this.$db.find({}, (err, newDocs) => { // if (err) { // this.$message.error(err); // return; // } // this.tableData = newDocs; // }); // this.$db.remove({_id: e._id}, {}, (err, numRemoved) => { // if (err) { // this.$message.error(err); // return; // } // this.searchPerson(); // }); // this.$db.update({_id: 'V6Cc6xuKFxZL6D3Y'}, { // userName: 'Admin', // password: 'asdzxc', // weight: 0, // createTime: new Date() // }, (err, numRemoved) => { // if (err) { // this.$message.error(err); // return; // } // });