Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string str2;

            if (base.IsPostBack)
            {
                return;
            }
            if (!(this.type == "getarticleinfo"))
            {
                if (!(this.type == "postdata"))
                {
                    if (this.sendID > 0)
                    {
                        this.hdfSendID.Value = this.sendID.ToString();
                        SendAllInfo sendAllInfo = WeiXinHelper.GetSendAllInfo(this.sendID);
                        if (sendAllInfo != null)
                        {
                            MessageType messageType = sendAllInfo.MessageType;
                            this.hdfMessageType.Value = ((int)sendAllInfo.MessageType).ToString();
                            int articleID = sendAllInfo.ArticleID;
                            this.hdfArticleID.Value = articleID.ToString();
                            this.txtTitle.Text      = sendAllInfo.Title;
                            switch (messageType)
                            {
                            case MessageType.Text:
                                this.fkContent.Text = sendAllInfo.Content;
                                break;

                            case MessageType.News:
                                if (articleID <= 0)
                                {
                                    this.hdfIsOldArticle.Value = "1";
                                    NewsReplyInfo reply = ReplyHelper.GetReply(this.sendID) as NewsReplyInfo;
                                    if (((reply != null) && (reply.NewsMsg != null)) && (reply.NewsMsg.Count != 0))
                                    {
                                        this.htmlInfo = "<div class=\"mate-inner\"><h3 id=\"singelTitle\">" + reply.NewsMsg[0].Title + "</h3><span>" + reply.LastEditDate.ToString("M月d日") + "</span><div class=\"mate-img\"><img id=\"img1\" src=\"" + reply.NewsMsg[0].PicUrl + "\" class=\"img-responsive\"></div><div class=\"mate-info\" id=\"Lbmsgdesc\">" + reply.NewsMsg[0].Description + "</div><div class=\"red-all clearfix\"><strong class=\"fl\">查看全文</strong><em class=\"fr\">&gt;</em></div></div>";
                                    }
                                }
                                break;

                            case MessageType.List:
                                if (articleID <= 0)
                                {
                                    this.hdfIsOldArticle.Value = "1";
                                    NewsReplyInfo info6 = ReplyHelper.GetReply(this.sendID) as NewsReplyInfo;
                                    if (info6 != null)
                                    {
                                        StringBuilder builder2 = new StringBuilder();
                                        if ((info6.NewsMsg != null) && (info6.NewsMsg.Count > 0))
                                        {
                                            int num15 = 0;
                                            foreach (NewsMsgInfo info7 in info6.NewsMsg)
                                            {
                                                num15++;
                                                if (num15 == 1)
                                                {
                                                    builder2.Append("<div class=\"mate-inner top\">                 <div class=\"mate-img\" >                     <img id=\"img1\" src=\"" + info7.PicUrl + "\" class=\"img-responsive\">                     <div class=\"title\" id=\"title1\">" + info7.Title + "</div>                 </div>             </div>");
                                                }
                                                else
                                                {
                                                    builder2.Append("             <div class=\"mate-inner\">                 <div class=\"child-mate\">                     <div class=\"child-mate-title clearfix\">                         <div class=\"title\">" + info7.Title + "</div>                         <div class=\"img\">                             <img src=\"" + info7.PicUrl + "\" class=\"img-responsive\">                         </div>                     </div>                 </div>             </div>");
                                                }
                                            }
                                            this.htmlInfo = builder2.ToString();
                                        }
                                    }
                                }
                                break;
                            }
                        }
                        else
                        {
                            base.Response.Redirect("sendalllist.aspx");
                            base.Response.End();
                        }
                    }
                    else if (this.LocalArticleID > 0)
                    {
                        ArticleInfo articleInfo = ArticleHelper.GetArticleInfo(this.LocalArticleID);
                        if (articleInfo != null)
                        {
                            this.hdfArticleID.Value   = this.LocalArticleID.ToString();
                            this.hdfMessageType.Value = ((int)articleInfo.ArticleType).ToString();
                        }
                    }
                    if (string.IsNullOrEmpty(this.htmlInfo))
                    {
                        this.htmlInfo = "<div class=\"exit-shop-info\">内容区</div>";
                    }
                    this.litInfo.Text = this.htmlInfo;
                    return;
                }
                base.Response.ContentType = "application/json";
                str2        = "{\"type\":\"1\",\"tips\":\"操作成功\"}";
                this.sendID = Globals.RequestFormNum("sendid");
                int    num2         = Globals.RequestFormNum("sendtype");
                int    msgType      = Globals.RequestFormNum("msgtype");
                int    num4         = Globals.RequestFormNum("articleid");
                string title        = Globals.RequestFormStr("title");
                string content      = Globals.RequestFormStr("content");
                int    isoldarticle = Globals.RequestFormNum("isoldarticle");
                string str5         = this.SavePostData(msgType, num4, title, content, isoldarticle, this.sendID, true);
                if (!string.IsNullOrEmpty(str5))
                {
                    str2 = "{\"type\":\"0\",\"tips\":\"" + str5 + "\"}";
                }
                else
                {
                    MessageType  type           = (MessageType)msgType;
                    string       msg            = string.Empty;
                    SiteSettings masterSettings = SettingsManager.GetMasterSettings(false);
                    string       str7           = JsonConvert.DeserializeObject <Token>(TokenApi.GetToken(masterSettings.WeixinAppId, masterSettings.WeixinAppSecret)).access_token;
                    switch (type)
                    {
                    case MessageType.News:
                    case MessageType.List:
                    {
                        bool        flag  = true;
                        ArticleInfo info3 = ArticleHelper.GetArticleInfo(num4);
                        if (info3.MediaId.Length < 1)
                        {
                            string jsonValue = NewsApi.GetJsonValue(NewsApi.GetMedia_IDByPath(str7, info3.ImageUrl), "media_id");
                            if (string.IsNullOrEmpty(jsonValue))
                            {
                                flag = false;
                                str2 = "{\"type\":\"2\",\"tips\":\"" + NewsApi.GetErrorCodeMsg(NewsApi.GetJsonValue(jsonValue, "errcode")) + "111111\"}";
                            }
                            else
                            {
                                ArticleHelper.UpdateMedia_Id(0, info3.ArticleId, jsonValue);
                            }
                        }
                        if (type == MessageType.List)
                        {
                            foreach (ArticleItemsInfo info4 in info3.ItemsInfo)
                            {
                                if ((info4.MediaId == null) || (info4.MediaId.Length < 1))
                                {
                                    string str9    = NewsApi.GetMedia_IDByPath(str7, info4.ImageUrl);
                                    string mediaid = NewsApi.GetJsonValue(str9, "media_id");
                                    if (mediaid.Length == 0)
                                    {
                                        this.errcode = NewsApi.GetJsonValue(str9, "errcode");
                                        str9         = "";
                                        flag         = false;
                                        str2         = "{\"type\":\"2\",\"tips\":\"" + NewsApi.GetErrorCodeMsg(this.errcode) + "\"}";
                                        break;
                                    }
                                    ArticleHelper.UpdateMedia_Id(1, info4.Id, mediaid);
                                }
                            }
                        }
                        if (flag)
                        {
                            string articlesJsonStr = this.GetArticlesJsonStr(info3);
                            string str12           = NewsApi.UploadNews(str7, articlesJsonStr);
                            this.sendID = Globals.ToNum(this.SavePostData(msgType, num4, title, content, isoldarticle, this.sendID, false));
                            string str13 = NewsApi.GetJsonValue(str12, "media_id");
                            if (str13.Length > 0)
                            {
                                if (num2 == 1)
                                {
                                    msg = NewsApi.SendAll(str7, NewsApi.CreateImageNewsJson(str13));
                                    if (!string.IsNullOrWhiteSpace(msg))
                                    {
                                        string str14 = NewsApi.GetJsonValue(msg, "msg_id");
                                        if (!string.IsNullOrEmpty(str14))
                                        {
                                            WeiXinHelper.UpdateMsgId(this.sendID, str14, 0, 0, 0, "");
                                        }
                                        else
                                        {
                                            this.errcode = NewsApi.GetJsonValue(msg, "errcode");
                                            string errorCodeMsg = NewsApi.GetErrorCodeMsg(this.errcode);
                                            WeiXinHelper.UpdateMsgId(this.sendID, str14, 2, 0, 0, errorCodeMsg);
                                            str2 = "{\"type\":\"2\",\"tips\":\"" + errorCodeMsg + "!!\"}";
                                        }
                                    }
                                    else
                                    {
                                        str2 = "{\"type\":\"2\",\"tips\":\"type参数错误\"}";
                                    }
                                }
                                else
                                {
                                    DataTable rencentOpenID  = WeiXinHelper.GetRencentOpenID(100);
                                    int       count          = rencentOpenID.Rows.Count;
                                    int       sendcount      = 0;
                                    string    returnjsondata = string.Empty;
                                    for (int i = 0; i < rencentOpenID.Rows.Count; i++)
                                    {
                                        string str17 = NewsApi.KFSend(str7, this.GetKFSendImageJson(rencentOpenID.Rows[i][0].ToString(), info3));
                                        this.errcode = NewsApi.GetJsonValue(str17, "errcode");
                                        if (this.errcode == "0")
                                        {
                                            sendcount++;
                                        }
                                        else
                                        {
                                            returnjsondata = NewsApi.GetErrorCodeMsg(this.errcode);
                                        }
                                    }
                                    int sendstate = (sendcount > 0) ? 1 : 2;
                                    WeiXinHelper.UpdateMsgId(this.sendID, "", sendstate, sendcount, count, returnjsondata);
                                }
                            }
                            else
                            {
                                this.errcode = NewsApi.GetJsonValue(str12, "errcode");
                                str2         = "{\"type\":\"2\",\"tips\":\"" + NewsApi.GetErrorCodeMsg(this.errcode) + "!\"}";
                            }
                        }
                        goto Label_091D;
                    }
                    }
                    this.sendID = Globals.ToNum(this.SavePostData(msgType, num4, title, content, isoldarticle, this.sendID, false));
                    if (num2 == 1)
                    {
                        msg = NewsApi.SendAll(str7, this.CreateTxtNewsJson(content));
                        if (!string.IsNullOrWhiteSpace(msg))
                        {
                            string msgid = NewsApi.GetJsonValue(msg, "msg_id");
                            if (msgid.Length == 0)
                            {
                                this.errcode = NewsApi.GetJsonValue(msg, "errcode");
                                string str19 = NewsApi.GetErrorCodeMsg(this.errcode);
                                WeiXinHelper.UpdateMsgId(this.sendID, msgid, 2, 0, 0, str19);
                                str2 = "{\"type\":\"2\",\"tips\":\"" + str19 + "\"}";
                            }
                            else
                            {
                                WeiXinHelper.UpdateMsgId(this.sendID, msgid, 0, 0, 0, "");
                            }
                        }
                        else
                        {
                            str2 = "{\"type\":\"2\",\"tips\":\"type参数错误\"}";
                        }
                    }
                    else
                    {
                        DataTable table2     = WeiXinHelper.GetRencentOpenID(100);
                        int       totalcount = table2.Rows.Count;
                        int       num11      = 0;
                        string    str20      = string.Empty;
                        for (int j = 0; j < table2.Rows.Count; j++)
                        {
                            string str21 = NewsApi.KFSend(str7, NewsApi.CreateKFTxtNewsJson(table2.Rows[j][0].ToString(), this.String2Json(this.FormatSendContent(content))));
                            this.errcode = NewsApi.GetJsonValue(str21, "errcode");
                            if (this.errcode == "0")
                            {
                                num11++;
                            }
                            else
                            {
                                str20 = NewsApi.GetErrorCodeMsg(this.errcode);
                            }
                        }
                        int num13 = (num11 > 0) ? 1 : 2;
                        WeiXinHelper.UpdateMsgId(this.sendID, "", num13, num11, totalcount, str20);
                        if (num11 == 0)
                        {
                            str2 = "{\"type\":\"0\",\"tips\":\"发送失败\"}";
                        }
                    }
                }
                goto Label_091D;
            }
            base.Response.ContentType = "application/json";
            string s         = "{\"type\":\"0\",\"tips\":\"操作失败\"}";
            int    articleid = Globals.RequestFormNum("articleid");

            if (articleid > 0)
            {
                ArticleInfo info = ArticleHelper.GetArticleInfo(articleid);
                if (info != null)
                {
                    StringBuilder builder = new StringBuilder();
                    switch (info.ArticleType)
                    {
                    case ArticleType.News:
                        s = string.Concat(new object[] { "{\"type\":\"1\",\"articletype\":", (int)info.ArticleType, ",\"title\":\"", this.String2Json(info.Title), "\",\"date\":\"", this.String2Json(info.PubTime.ToString("M月d日")), "\",\"imgurl\":\"", this.String2Json(info.ImageUrl), "\",\"memo\":\"", this.String2Json(info.Memo), "\"}" });
                        goto Label_030E;

                    case ArticleType.List:
                        foreach (ArticleItemsInfo info2 in info.ItemsInfo)
                        {
                            builder.Append("{\"title\":\"" + this.String2Json(info2.Title) + "\",\"imgurl\":\"" + this.String2Json(info2.ImageUrl) + "\"},");
                        }
                        s = string.Concat(new object[] { "{\"type\":\"1\",\"articletype\":", (int)info.ArticleType, ",\"title\":\"", this.String2Json(info.Title), "\",\"date\":\"", this.String2Json(info.PubTime.ToString("M月d日")), "\",\"imgurl\":\"", this.String2Json(info.ImageUrl), "\",\"items\":[", builder.ToString().Trim(new char[] { ',' }), "]}" });
                        goto Label_030E;
                    }
                    s = string.Concat(new object[] { "{\"type\":\"1\",\"articletype\":", (int)info.ArticleType, ",\"title\":\"", this.String2Json(info.Title), "\",\"date\":\"", this.String2Json(info.PubTime.ToString("M月d日")), "\",\"imgurl\":\"", this.String2Json(info.ImageUrl), "\",\"memo\":\"", this.String2Json(info.Content), "\"}" });
                }
            }
Label_030E:
            base.Response.Write(s);
            base.Response.End();
            return;

Label_091D:
            base.Response.Write(str2);
            base.Response.End();
        }
 public NewsSourceController(IUserRepository userRepo, NewsApi newsApi, IConfiguration configuration)
 {
     _userRepo      = userRepo;
     _configuration = configuration;
     _newsApi       = newsApi;
 }
Ejemplo n.º 3
0
 public void Init()
 {
     instance = new NewsApi();
 }
Ejemplo n.º 4
0
        public static async Task PopulateLatestNewsAsync(ObservableCollection <NewsApi> latestNews, string sorting, int Type, int Count, int offset, string Mode, string query)
        {
            var newsWrapper = new List <NewsApi>();

            if (Mode == "search")
            {
                newsWrapper = await GetSearchResults(query);
            }
            else
            {
                newsWrapper = await GetNewsDataWrapperAsync(sorting, Type, Count, offset);
            }

            Windows.Storage.ApplicationDataContainer localSettings =
                Windows.Storage.ApplicationData.Current.LocalSettings;

            foreach (var item in newsWrapper)
            {
                if (item.likes.summ > 0) // Настраиваем цвет рейтинга
                {
                    item.likes.color = "#008542";
                }
                else if (item.likes.summ < 0)
                {
                    item.likes.color = "#DD0000";
                }
                else
                {
                    item.likes.color = "#eee";
                }

                bool temp = false;

                if (localSettings.Values["NewsContentVisible"] != null)
                {
                    Boolean.TryParse(localSettings.Values["NewsContentVisible"].ToString(), out temp);
                }

                item.ShowNewsDetailsInSidebar = Visibility.Visible;
                if (temp == true)
                {
                    item.ShowNewsDetailsInSidebar = Visibility.Collapsed;
                }

                item._isReadMore = Visibility.Collapsed;
                if (item.isReadMore == true)
                {
                    item._isReadMore = Visibility.Visible;
                }
                ;

                item.ShowGenericInfo   = Visibility.Visible;
                item.IsThisANextButton = Visibility.Collapsed;

                if (item.cover == null)
                {
                    item.cover     = new Cover();
                    item.cover.url = "x";
                }
                else
                {
                    if (item.cover.url == null)
                    {
                        item.cover     = new Cover();
                        item.cover.url = "x";
                    }
                }

                string[] date = item.dateRFC.Split(' ');
                item.dateRFC = date[1] + ' ' + date[2] + ' ' + date[3] + ' ' + date[4];
                string pattern = "<[^>]*>"; // режем html-теги
                string content = item.intro;
                item.intro = Regex.Replace(content, pattern, "");

                if (NewsBlackList.Any(p => p.id == item.author.id))
                {
                    Debug.WriteLine("В чёрном списке");
                }
                else
                {
                    latestNews.Add(item);
                }
            }

            if (Mode == "search")
            {
            }
            else
            {
                var NextButton = new NewsApi();
                int n          = 30;
                int.TryParse(localSettings.Values["NumberOfOnetimeLoadedItems"].ToString(), out n); // количество загружаемых новостей
                NextButton.IsThisANextButton = Visibility.Visible;
                NextButton.ShowGenericInfo   = Visibility.Collapsed;
                NextButton.intro             = String.Format("Загрузить следующие {0} записей", n);
                latestNews.Add(NextButton);
            }
        }
Ejemplo n.º 5
0
        public override AbstractResponse OnEvent_ClickRequest(ClickEventRequest clickEventRequest)
        {
            string userOpenId = clickEventRequest.FromUserName;

            WeiXinHelper.UpdateRencentOpenID(userOpenId);
            try
            {
                Hidistro.Entities.VShop.MenuInfo menu = VShopHelper.GetMenu(Convert.ToInt32(clickEventRequest.EventKey));
                if (menu == null)
                {
                    return(null);
                }
                if (menu.BindType == BindType.StoreCard)
                {
                    try
                    {
                        SiteSettings siteSettings = SettingsManager.GetMasterSettings(false);
                        string       access_token = TokenApi.GetToken(siteSettings.WeixinAppId, siteSettings.WeixinAppSecret);
                        access_token = JsonConvert.DeserializeObject <Token>(access_token).access_token;
                        MemberInfo member = MemberProcessor.GetOpenIdMember(userOpenId, "wx");
                        if (member == null)
                        {
                            this.CreatMember(userOpenId, 0, access_token);
                            member = MemberProcessor.GetOpenIdMember(userOpenId, "wx");
                        }
                        string           userHead        = member.UserHead;
                        string           storeLogo       = siteSettings.DistributorLogoPic;
                        string           webStart        = Globals.GetWebUrlStart();
                        string           imageUrl        = "/Storage/master/DistributorCards/MemberCard" + member.UserId + ".jpg";
                        string           mediaid         = string.Empty;
                        int              ReferralId      = 0;
                        string           storeName       = siteSettings.SiteName;
                        string           NotSuccessMsg   = string.Empty;
                        DistributorsInfo distributorInfo = DistributorsBrower.GetDistributorInfo(member.UserId);
                        if (distributorInfo != null)
                        {
                            ReferralId = member.UserId;
                            if (siteSettings.IsShowDistributorSelfStoreName)
                            {
                                storeName = distributorInfo.StoreName;
                                storeLogo = distributorInfo.Logo;
                            }
                            imageUrl = "/Storage/master/DistributorCards/StoreCard" + ReferralId + ".jpg";
                        }
                        else if (!siteSettings.IsShowSiteStoreCard)
                        {
                            string str = "您还不是分销商,不能为您生成推广图片,立即<a href='" + webStart + "/Vshop/DistributorCenter.aspx'>申请分销商</a>";
                            if (!string.IsNullOrEmpty(siteSettings.ToRegistDistributorTips))
                            {
                                str = Regex.Replace(siteSettings.ToRegistDistributorTips, "{{申请分销商}}", "<a href='" + webStart + "/Vshop/DistributorCenter.aspx'>申请分销商</a>");
                            }
                            return(new TextResponse {
                                CreateTime = DateTime.Now, ToUserName = userOpenId, FromUserName = clickEventRequest.ToUserName, Content = str
                            });
                        }
                        string postData = string.Empty;
                        string creatingStoreCardTips = siteSettings.CreatingStoreCardTips;
                        if (!string.IsNullOrEmpty(creatingStoreCardTips))
                        {
                            postData = "{\"touser\":\"" + userOpenId + "\",\"msgtype\":\"text\",\"text\":{\"content\":\"" + Globals.String2Json(creatingStoreCardTips) + "\"}}";
                            NewsApi.KFSend(access_token, postData);
                        }
                        string filePath = HttpContext.Current.Request.MapPath(imageUrl);
                        Task.Factory.StartNew(delegate {
                            try
                            {
                                File.Exists(filePath);
                                string str = File.ReadAllText(HttpRuntime.AppDomainAppPath + "/Storage/Utility/StoreCardSet.js");
                                string qRImageUrlByTicket = webStart + "/Follow.aspx?ReferralId=" + ReferralId.ToString();
                                ScanInfos info            = ScanHelp.GetScanInfosByUserId(ReferralId, 0, "WX");
                                if (info == null)
                                {
                                    ScanHelp.CreatNewScan(ReferralId, "WX", 0);
                                    info = ScanHelp.GetScanInfosByUserId(ReferralId, 0, "WX");
                                }
                                if ((info != null) && !string.IsNullOrEmpty(info.CodeUrl))
                                {
                                    qRImageUrlByTicket = BarCodeApi.GetQRImageUrlByTicket(info.CodeUrl);
                                }
                                else
                                {
                                    string token = TokenApi.GetToken_Message(siteSettings.WeixinAppId, siteSettings.WeixinAppSecret);
                                    if (TokenApi.CheckIsRightToken(token))
                                    {
                                        string str4 = BarCodeApi.CreateTicket(token, info.Sceneid, "QR_LIMIT_SCENE", "2592000");
                                        if (!string.IsNullOrEmpty(str4))
                                        {
                                            qRImageUrlByTicket  = BarCodeApi.GetQRImageUrlByTicket(str4);
                                            info.CodeUrl        = str4;
                                            info.CreateTime     = DateTime.Now;
                                            info.LastActiveTime = DateTime.Now;
                                            ScanHelp.updateScanInfosCodeUrl(info);
                                        }
                                    }
                                }
                                StoreCardCreater creater = new StoreCardCreater(str, userHead, storeLogo, qRImageUrlByTicket, member.UserName, storeName, ReferralId, member.UserId);
                                if (creater.ReadJson() && creater.CreadCard(out NotSuccessMsg))
                                {
                                    if (ReferralId > 0)
                                    {
                                        DistributorsBrower.UpdateStoreCard(ReferralId, NotSuccessMsg);
                                    }
                                    string msg = NewsApi.GetMedia_IDByPath(access_token, webStart + imageUrl);
                                    mediaid    = NewsApi.GetJsonValue(msg, "media_id");
                                }
                                else
                                {
                                    Globals.Debuglog(NotSuccessMsg, "_DebugCreateStoreCardlog.txt");
                                }
                                postData = "{\"touser\":\"" + userOpenId + "\",\"msgtype\":\"image\",\"image\":{\"media_id\":\"" + mediaid + "\"}}";
                                NewsApi.KFSend(access_token, postData);
                            }
                            catch (Exception exception)
                            {
                                postData = "{\"touser\":\"" + userOpenId + "\",\"msgtype\":\"text\",\"text\":{\"content\":\"生成图片失败," + Globals.String2Json(exception.ToString()) + "\"}}";
                                NewsApi.KFSend(access_token, postData);
                            }
                        });
                        return(null);
                    }
                    catch (Exception exception)
                    {
                        return(new TextResponse {
                            CreateTime = DateTime.Now, ToUserName = userOpenId, FromUserName = clickEventRequest.ToUserName, Content = "问题:" + exception.ToString()
                        });
                    }
                }
                Hidistro.Entities.VShop.ReplyInfo reply = ReplyHelper.GetReply(menu.ReplyId);
                if (reply == null)
                {
                    return(null);
                }
                if (reply.MessageType != Hidistro.Entities.VShop.MessageType.Image)
                {
                    AbstractResponse keyResponse = this.GetKeyResponse(reply.Keys, clickEventRequest);
                    if (keyResponse != null)
                    {
                        return(keyResponse);
                    }
                }
                AbstractResponse response = this.GetResponse(reply, clickEventRequest.FromUserName);
                if (response == null)
                {
                    this.GotoManyCustomerService(clickEventRequest);
                }
                response.ToUserName   = clickEventRequest.FromUserName;
                response.FromUserName = clickEventRequest.ToUserName;
                return(response);
            }
            catch (Exception exception2)
            {
                return(new TextResponse {
                    CreateTime = DateTime.Now, ToUserName = clickEventRequest.FromUserName, FromUserName = clickEventRequest.ToUserName, Content = "问题:" + exception2.ToString()
                });
            }
        }
        // GET: News
        public ActionResult GetTopNews()
        {
            var FetchNews = new NewsApi().getTopNews();

            return(View(FetchNews));
        }