1
This commit is contained in:
parent
49e9e51eb4
commit
4bcb683ccc
@ -22,6 +22,7 @@ namespace asg_form.Controllers
|
||||
public string allow_operate { get; set; }
|
||||
public string show { get; set; }
|
||||
public int sort { get; set; }
|
||||
public string adaptability { get; set; }
|
||||
}
|
||||
public class menuInput
|
||||
{
|
||||
@ -35,6 +36,7 @@ namespace asg_form.Controllers
|
||||
public string allowOperate { get; set; }
|
||||
public string show { get; set; }
|
||||
public int sort { get; set; }
|
||||
public string adaptability { get; set; }
|
||||
}
|
||||
|
||||
private readonly UserManager<User> userManager;
|
||||
@ -70,7 +72,7 @@ namespace asg_form.Controllers
|
||||
allow_operate = msg.allowOperate,
|
||||
show = msg.show,
|
||||
sort = msg.sort,
|
||||
|
||||
adaptability = msg.adaptability == null ? "1" :msg.adaptability,
|
||||
};
|
||||
db.mainMenu.Add(menu);
|
||||
db.SaveChanges();
|
||||
@ -87,6 +89,7 @@ namespace asg_form.Controllers
|
||||
mA.allow_operate = msg.allowOperate;
|
||||
mA.show = msg.show;
|
||||
mA.sort = msg.sort;
|
||||
mA.adaptability = msg.adaptability == null ? "1" : msg.adaptability;
|
||||
db.SaveChanges();
|
||||
}
|
||||
return Ok(new error_mb { code = 200, message = "成功存入" });
|
||||
@ -138,6 +141,7 @@ namespace asg_form.Controllers
|
||||
public string allowOperate { get; set; }
|
||||
public string show { get; set; }
|
||||
public int sort { get; set; } = 1;
|
||||
public string adaptability { get; set; }
|
||||
public List<menuFront> children { get; set; } = new List<menuFront>();
|
||||
}
|
||||
|
||||
@ -159,6 +163,7 @@ namespace asg_form.Controllers
|
||||
allowOperate = x.allow_operate,
|
||||
show = x.show,
|
||||
sort = x.sort,
|
||||
adaptability = x.adaptability,
|
||||
children = BuildTree(nodes, x.id)
|
||||
}).ToList();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user