"use strict";const e=require("../../../common/vendor.js"),t=require("../../../request/api.js"),o=require("../../../utils/util.js"),s=require("../../../common/assets.js"),a={data:()=>({navH:e.inject("navHeight"),eventId:"",contentTop:"",investDetails:null,former:"",categoryList:["背景","推演","相关股票"],selectCategory:0,stockCategoryList:[{title:"全部股票",num:0,bgColor:"#C00000",color:"white"},{title:"大周期",num:0,bgColor:"#305496",color:"white"},{title:"TMT板块",num:0,bgColor:"#FFBF00",color:"white"},{title:"大金融地产",num:0,bgColor:"#FFF4D3"},{title:"大消费",num:0,bgColor:"#CDEEEE"},{title:"公共产业板块",num:0,bgColor:"#DEEBF7"}],accMul:o.accMul}),onLoad(t){this.contentTop=this.navH+.136*e.inject("windowWidth"),t.id&&(this.eventId=t.id,this.getEventDetailsData())},methods:{clickCategoryItem(e){this.selectCategory!=e&&(this.selectCategory=e)},clickLookRelatedStockItem(t){e.index.navigateTo({url:"/pages/index/stockDetails/stockDetails?type=2&code="+t.code+"&des="+t.description+"&name="+t.name})},getEventDetailsData(){t.investEventDetails(this.eventId).then((t=>{if(200==t.code){let e=t.data.detail;for(let t of this.stockCategoryList)t.num=e.sector_stats[t.title];this.investDetails=e,this.former=e.former.replace("<answer>","").replace("</answer>","")}else e.index.showToast({title:t.message,icon:"none"})})).catch((e=>{}))}}};if(!Array){(e.resolveComponent("navBar")+e.resolveComponent("ua-markdown"))()}Math||((()=>"../../../components/navBar/navBar.js")+(()=>"../../../components/ua-markdown/ua-markdown.js"))();const r=e._export_sfc(a,[["render",function(t,o,a,r,c,i){return e.e({a:e.p({leftText:"详情"}),b:s._imports_0,c:e.f(c.categoryList,((t,o,s)=>e.e({a:e.t(t),b:c.selectCategory==o},(c.selectCategory,{}),{c:e.n("item relative "+(c.selectCategory==o?"select":"")),d:o,e:e.o((e=>i.clickCategoryItem(o)),o)}))),d:e.s("top:"+c.navH+"px;"),e:c.investDetails},c.investDetails?e.e({f:0==c.selectCategory},0==c.selectCategory?{g:e.p({source:c.former})}:{},{h:1==c.selectCategory},1==c.selectCategory?{i:e.p({source:c.investDetails.forecast})}:{},{j:2==c.selectCategory},2==c.selectCategory?{k:e.f(c.stockCategoryList,((t,o,s)=>({a:e.t(t.num),b:e.t(t.title),c:e.s("background-color:"+t.bgColor+";color:"+t.color+";"),d:o}))),l:e.f(c.investDetails.related_stocks,((t,o,s)=>e.e({a:e.t(t.code+" "+t.name),b:e.t(c.accMul(t.score,100)),c:t.sw_primary_sector},t.sw_primary_sector?{d:e.t(t.sw_primary_sector)}:{},{e:e.t(t.description),f:o,g:e.o((e=>i.clickLookRelatedStockItem(t)),o)})))}:{},{m:4==c.selectCategory},4==c.selectCategory?{n:e.f(c.investDetails.extracted_concepts,((o,s,a)=>({a:o.first_image,b:e.t(o.name),c:e.t(o.reason),d:s,e:e.o((e=>t.clickConceptItem()),s)})))}:{},{o:e.s("top:"+c.contentTop+"px;")}):{})}]]);wx.createPage(r);
