Ejemplo n.º 1
0
        public async Task <IActionResult> List(GetAboutUsCommand cmd)
        {
            cmd.LinkUrl = $"/aboutus/news/list?PageIndex=__id__&PageSize={cmd.PageSize}";
            var result = await _mediator.Send(cmd, HttpContext.RequestAborted);

            return(View(result));
        }
Ejemplo n.º 2
0
        public async Task <Result> List([FromBody] GetAboutUsCommand cmd)
        {
            _logger.LogInformation($"接收到请求{HttpContext.Request.Host}{HttpContext.Request.Path},参数 {JsonConvert.SerializeObject(cmd)}");
            cmd.Show      = true;
            cmd.PageSize  = 5;
            cmd.PageIndex = 1;
            var result = await _mediator.Send(cmd, HttpContext.RequestAborted);

            return(result);
        }
Ejemplo n.º 3
0
        public async Task <IActionResult> Index()
        {
            var cmd = new GetAboutUsCommand
            {
                PageIndex = 1,
                PageSize  = 100,
                Show      = true,
                Status    = 1
            };
            var result = await _mediator.Send(cmd, HttpContext.RequestAborted);

            return(View(result.Data));
        }