1import{x as c}from"./chunk-2RZNBXEW.js";import{k as r,sa as g}from"./chunk-LKIBVTZY.js";import{b as h}from"./chunk-IXSVJUWF.js";import{e as l,j as o}from"./chunk-LZGEQQYD.js";var m=(()=>{let a=class a{constructor(t,e,i,s){this.httpService=t,this.globalData=e,this.appConfigService=i,this.langService=s,this.nowTab=0,this.isUnreadExist=!1,this.qQEventToken="",this.page=1,this.continueGetData=!1,this.noMoreData=!1}updateUnreadCount(){if(!this.globalData.isLogin){this.globalData.unReadCount=0,this.isUnreadExist=!1;return}this.httpService.getNewsUnreadCount({}).subscribe(t=>{t.code===0&&t.data&&(this.globalData.unReadCount=Number(t.data.unreadCount)||0,this.isUnreadExist=this.globalData.unReadCount>0)})}changeTab(t){t!==this.nowTab&&(this.nowTab=t,this.notifyData=null,this.page=1,this.noMoreData=!1,t===0?this.getUnReadData():this.getReadData())}getReadData(){this.globalData.loading=!0;let t={page:this.page.toString()};this.httpService.getNewsReadList(t).subscribe(e=>{if(e.code===0){let i=e.data.model;this.page===1?(this.notifyData=e.data,i.length>0&&(this.continueGetData=!0)):i.length>0?(this.globalData.isMobileStyle?i.forEach(s=>{this.notifyData.model.push(s)}):this.notifyData=e.data,this.continueGetData=!0):this.noMoreData=!0,this.globalData.loading=!1}})}getUnReadData(){this.globalData.loading=!0;let t={page:this.page.toString()};this.httpService.getNewsUnreadList(t).subscribe(e=>{if(e.code===0){let i=e.data.model;this.page===1?(this.notifyData=e.data,this.updateUnreadCount(),i.length>0?(this.continueGetData=!0,this.isUnreadExist=!0):this.isUnreadExist=!1):i.length>0?(this.globalData.isMobileStyle?i.forEach(s=>{this.notifyData.model.push(s)}):this.notifyData=e.data,this.continueGetData=!0):this.noMoreData=!0,this.globalData.loading=!1}})}readNews(t){let e={newId:t,date:new Date};this.httpService.setNewsRead(e).subscribe(i=>{i.code===0&&this.updateUnreadCount()})}allRead(){this.globalData.loading=!0,this.httpService.setNewsReadAll({}).subscribe(t=>{t.code===0&&(this.isUnreadExist=!1,this.globalData.unReadCount=0,this.notifyData=t.data,this.nowTab===0&&this.getUnReadData()),this.globalData.loading=!1})}getQQEventToken(){return new Promise((t,e)=>{this.httpService.getQQEventToken({}).subscribe(i=>{if(i.code===0)this.qQEventToken=i.data.token;else{this.qQEventToken="";let s=this.appConfigService.getConfig("hostUrl");this.globalData.showDirectAlert(this.globalData.translateString("pleaseLogin"),2,()=>window.close());let d={key:"qqevent",url:"".concat(s,"/qqtime/auth/autologin?lang=").concat(this.langService.language)};window.opener&&window.opener.parent.postMessage(d,"*"),e("error")}t("ok")})})}};a.\u0275fac=function(e){return new(e||a)(o(c),o(g),o(h),o(r))},a.\u0275prov=l({token:a,factory:a.\u0275fac,providedIn:"root"});let n=a;return n})();export{m as a};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.