public async Task OnGetAsync() { var parm = new PageParm { page = 1, limit = 10000 }; if (!await HttpContext.IsSystem()) { parm.CreateBy = await HttpContext.LoginUserId(); } var list = await merchantService.GetPagesAsync(parm); if (list.data != null && list.data.Items != null) { ViewData["merchants"] = list.data.Items.Select(p => new SelectListItem { Text = p.name, Value = p.out_sub_mch_id }).ToList(); } var role_info = await roleService.GetRoleByAdminGuid(await HttpContext.LoginUserId()); if (role_info.isSystem || role_info.isAgent) { Display = true; } }
public async Task <IActionResult> GetPages([FromQuery] PageParm parm) { if (!await HttpContext.IsSystem()) { parm.CreateBy = await HttpContext.LoginUserId(); } var res = await merchantService.GetPagesAsync(parm); return(Ok(new { code = 0, msg = "success", count = res.data.TotalItems, data = res.data.Items })); }