明树Git Lab

Commit cdff6f8c authored by zfp1's avatar zfp1

update

parent a8c8ed97
......@@ -8,17 +8,17 @@ const createError = require('http-errors');
const userModule = require('../module/userModule');
const errorMessage = require('../utils/errorMessage');
setTimeout(async () => {
const { salt, passwordHash } = utils.saltHashPassword("123456");
const mobile = "11111111111";
const _id = "66d6c4099f8480c6db53ce13";
await userModule.findOneAndUpdate({ _id }, {
mobile,
salt,
name: "系统管理员",
password: passwordHash,
}, { upsert: true })
}, "5000");
// setTimeout(async () => {
// const { salt, passwordHash } = utils.saltHashPassword("123456");
// const mobile = "11111111111";
// const _id = "66d6c4099f8480c6db53ce13";
// await userModule.findOneAndUpdate({ _id }, {
// mobile,
// salt,
// name: "系统管理员",
// password: passwordHash,
// }, { upsert: true })
// }, "5000");
// 注册 暂时用作注册admin 后续用户应该以后台添加方式进行
async function regist(req, res, next) {
......
......@@ -37,7 +37,7 @@ async function findOneAndUpdate(filter, updateObj) {
async function getRoleMenus(roles, mobile) {
let menuIds = [], buttonIds = [], buts = [], mes = [];
if (mobile == "1111111111") {
if (mobile == "11111111111") {
buts = await DB.Menu.find({ del: 0 }).lean().exec();
mes = await DB.Menu.find({ del: 0, type: 1, enable: true }).populate({ path: "parentIds" }).lean().exec();
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment