"use strict";const t=require("../../../common/vendor.js"),e=require("../../../request/api.js"),o=require("../../../common/assets.js"),i=require("../../../uni_modules/lime-echart/static/echarts.min.js"),a={data:()=>({navH:t.inject("navHeight"),contentTop:"",navTitle:"",type:"",eventId:"",stockCode:"",categoryList:["分时图","日K线"],selectCategory:0,option:{title:{show:!1},tooltip:{position:function(t,e,o,i,a){var s={top:"10%"};return s[["left","right"][+(t[0]{if(200==e.code){this.navTitle=e.data.basic_info.stock_name+"("+e.data.basic_info.stock_code+")";let t=e.data.minute_chart_data,o=[],i=[];for(let e of t)o.push(e.time),i.push(e.close);this.option1.xAxis.data=o,this.option1.series.data=i,this.option1.series.markLine.data=[{yAxis:t[0].open,label:{show:!0,position:"start",color:"#333"}},{yAxis:t[0].open,label:{show:!0,position:"end",formatter:"0.00%",color:"#333"}}],e.data.related_desc&&(this.relatedDesc=e.data.related_desc.relation_desc),this.init()}else t.index.showToast({title:e.message,icon:"none"})})).catch((t=>{}))},getStockCandlestickChartData(){let t=this.stockCode,o={chart_type:"minute"};1==this.selectCategory&&(o.chart_type="daily"),e.stockCandlestickChartData(t,o).then((t=>{let e=t.data,o=[],i=[];for(let a of e)o.push(a.time),i.push([a.open,a.close,a.low,a.high]);this.option.xAxis.data=o,this.option.series[0].data=i,this.init()})).catch((t=>{}))}}};if(!Array){(t.resolveComponent("navBar")+t.resolveComponent("l-echart"))()}Math||((()=>"../../../components/navBar/navBar.js")+(()=>"../../../uni_modules/lime-echart/components/l-echart/l-echart.js"))();const s=t._export_sfc(a,[["render",function(e,i,a,s,n,r){return t.e({a:t.p({leftText:n.navTitle}),b:o._imports_0,c:1==n.type},1==n.type?{d:t.f(n.categoryList,((e,o,i)=>t.e({a:t.t(e),b:n.selectCategory==o},(n.selectCategory,{}),{c:t.n("item relative "+(n.selectCategory==o?"select":"")),d:o,e:t.o((t=>r.clickCategoryItem(o)),o)}))),e:t.s("top:"+n.navH+"px;")}:{},{f:1==n.type},1==n.type?{g:t.sr("chartRef","42054871-1")}:{},{h:t.t(n.relatedDesc),i:t.n("contentC fixed "+(2==n.type?"radius":"")),j:t.s("top:"+n.contentTop+"px;")})}]]);wx.createPage(s);