public ActionResultVM GetAppList(int pageNumber = 1, int pageSize = 20, string password = "******") { var vm = new ActionResultVM(); try { if (GlobalTo.GetValue <bool>("Safe:IsDev")) { if (string.IsNullOrWhiteSpace(password) || password != GlobalTo.GetValue("Safe:CreateAppPassword")) { vm.Set(ARTag.unauthorized); vm.Msg = "密码错误"; } else { vm = FileServerService.GetAppList(pageNumber, pageSize); } } else { vm.Set(ARTag.refuse); } } catch (Exception ex) { vm.Set(ex); Core.ConsoleTo.Log(ex); } return(vm); }
public ActionResultVM GetAppList(int pageNumber = 1, int pageSize = 20) { var vm = new ActionResultVM(); try { if (GlobalTo.GetValue <bool>("Safe:IsDev")) { vm = FileServerService.GetAppList(pageNumber, pageSize); } else { vm.Set(ARTag.refuse); } } catch (Exception ex) { vm.Set(ex); Core.ConsoleTo.Log(ex); } return(vm); }
public ActionResultVM GetAppList(string password, int pageNumber = 1, int pageSize = 20) { var vm = new ActionResultVM(); try { if (string.IsNullOrWhiteSpace(password) || password != GlobalTo.GetValue("Safe:AdminPassword")) { vm.Set(ARTag.unauthorized); vm.Msg = "密码错误或已关闭管理接口"; } else { vm = FileServerService.GetAppList(pageNumber, pageSize); } } catch (Exception ex) { vm.Set(ex); Core.ConsoleTo.Log(ex); } return(vm); }