33 lines
909 B
C#
33 lines
909 B
C#
using HtmlAgilityPack;
|
|
using Microsoft.AspNetCore.Authorization;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using Newtonsoft.Json.Linq;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
using Vote.Services.Entities;
|
|
|
|
namespace Ewide.Web.Entry.Controllers
|
|
{
|
|
[AllowAnonymous]
|
|
public class WXController : Controller
|
|
{
|
|
public IActionResult Index()
|
|
{
|
|
ViewBag.Title = "微信公众号";
|
|
return View();
|
|
}
|
|
public IActionResult Result(string url)
|
|
{
|
|
if (string.IsNullOrWhiteSpace(url))
|
|
return Redirect("Index");
|
|
ViewBag.Title = "微信公众号";
|
|
var art = new Vote.Services.ApiController.WxService().GetArticle(url).Result;
|
|
ViewBag.Title = art?.Title;
|
|
ViewBag.Detail = art?.Detail;
|
|
return View();
|
|
}
|
|
}
|
|
}
|