| | |
| | | text: "English", |
| | | lang: "en", |
| | | }, |
| | | { |
| | | text: "简体中文", |
| | | lang: "zh-CN", |
| | | }, |
| | | // { |
| | | // text: "简体中文", |
| | | // lang: "zh-CN", |
| | | // }, |
| | | { text: "हिंदी", lang: "hi" }, |
| | | // { |
| | | // text: "Deutsch", |
| | |
| | | |
| | | stock.date = date; |
| | | stock.minute.push(stockItem); |
| | | // stock.minute= stockItem; |
| | | } |
| | | |
| | | var hqchartData = { stock: [stock], code: 0 }; |
| | |
| | | }; |
| | | |
| | | HQData.GetMinuteKLineApiUrl = function(symbol, period, right, option) { |
| | | // https://push2his.eastmoney.com/api/qt/stock/kline/get?fields1=f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,f13&fields2=f51,f52,f53,f54,f55,f56,f57,f58,f59,f60,f61&beg=0&end=20500101&ut=fa5fd1943c7b386f172d6893dbfba10b&rtntype=6&secid=0.300059&klt=101&fqt=0 |
| | | |
| | | var internalSymbol = HQData.GetInternalSymbol(symbol); |
| | | // console.log(internalSymbol,'caonima'); |
| | | var internalPeriod = HQData.GetInternalPeriod(period); |
| | | var internalRight = HQData.GetInternalRight(right); |
| | | console.log(internalPeriod); |
| | | var url = ""; |
| | | if (option && option.Update === true) { |
| | | var beginDate = option.End; |
| | | // url = `https://kline.mitrade.cc11/api/qt/stock/kline/get?fields1=f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,f13&fields2=f51,f52,f53,f54,f55,f56,f57,f58,f59,f60,f61&beg=${beginDate}&end=20500101&ut=fa5fd1943c7b386f172d6893dbfba10b&rtntype=6&secid=${internalSymbol.Market}.${internalSymbol.Symbol}&klt=${internalPeriod}&fqt=${internalRight}` |
| | | // var url = `https://kline.mitrade.cc11/api/qt/stock/kline/get?fields1=f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,f13&fields2=f51,f52,f53,f54,f55,f56,f57,f58,f59,f60,f61&beg=${beginDate}&end=20500101&ut=fa5fd1943c7b386f172d6893dbfba10b&rtntype=6&secid=${internalSymbol.Market}.${internalSymbol.Symbol}&klt=${internalPeriod}&fqt=${internalRight}` |
| | | } else { |
| | | // var url = `http://api-in.js-stock.top/kline?interval=${internalPeriod}&key=nvmihAoT51LnAWCpDeuw&pid=${internalSymbol.Symbol}` |
| | | // url = `http://api-in.js-stock.top/kline?interval=${internalPeriod}&key=nvmihAoT51LnAWCpDeuw&pid=${internalSymbol.Symbol}` |
| | | const kLines = JSON.parse(window.localStorage.getItem("kLine")); |
| | | // if (kLines.type === 'IN' ||kLines.type === 'US') { |
| | | url = |
| | | window.globalVar + |
| | | `api/stock/getKData.do?pid=${kLines.pid}&interval=${internalPeriod}&stockType=${kLines.type}`; |
| | | // } |
| | | // if (kLines.type === 'qh') { |
| | | // const internalPe = internalPeriod === 1 ? 5 : internalPeriod |
| | | // url = window.globalVar+`api/stock/getKData.do?symbol=${encodeURIComponent(kLines.pid)}&cmd=history&period=${internalPe}&stockType=${kLines.type}` |
| | | // url = window.globalVar+`api/stock/getKData.do?symbol=${encodeURIComponent(kLines.pid)}&cmd=history&period=${internalPe}&key=jssj2023key` |
| | | // } |
| | | |
| | | } |
| | | |
| | | return { |
| | |
| | | HQData.RecvRealtimeData = function(recvData, callback, option) { |
| | | var data = recvData.data; |
| | | // var stock = { symbol: option.Obj.Symbol, name: 'K线图' } |
| | | var stock = { symbol: option.Obj.Symbol, name: data.name || "" }; |
| | | // var stock = { symbol: option.Obj.Symbol, name: data.name || "" }; |
| | | // var yClose = data[0].c |
| | | // for (var i = 0; i < data.length; ++i) { |
| | | // var item = data[i] |
| | |
| | | // yClose = close |
| | | // } |
| | | const kLines = JSON.parse(window.localStorage.getItem("kLine")); |
| | | var yClose = data.preKPrice; |
| | | // var yClose = data.preKPrice; |
| | | var yClose = '123'; |
| | | console.log("recvDatadata====", data); |
| | | if (kLines.type === "IN" || kLines.type === "US") { |
| | | for (var i = 0; i < data.klines.length; ++i) { |
| | |
| | | |
| | | var hqchartData = { code: 0, stock: [stock] }; |
| | | |
| | | if (option.Data.Self.IsDestroy === false) { |
| | | // if (option.Data.Self.IsDestroy === false) { |
| | | HQData.Log("[HQData.RecvRealtimeData] hqchartData ", hqchartData); |
| | | callback(hqchartData); |
| | | } |
| | | // } |
| | | }; |
| | | HQData.RequestHistoryMinuteData = function(data, callback) { |
| | | data.PreventDefault = true; |
| | |
| | | "hj71": "The index currently does not support self-selection! ", |
| | | "hj72": "Open today", |
| | | "hj73": "Highest", |
| | | "hj74": "Harvested yesterday", |
| | | "hj74": "Yesterday", |
| | | "hj75": "Lowest", |
| | | "hj76": "Fifth gear", |
| | | "hj77": "Purchase", |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | key:0, |
| | | active:0, |
| | | MinuteDayMenu: DefaultData.GetMinuteDayMenu(), |
| | | MinuteDayIndex: 0, |
| | | KLinePeriodMenu: DefaultData.GetKLinePeriodMenu(), |
| | |
| | | |
| | | VolChartHeight: 10, |
| | | chartType: "kline", |
| | | timerss:null, |
| | | isShow: false, |
| | | xData: [], |
| | | }; |
| | | }, |
| | | |
| | | created() { |
| | | const { query } = this.$route; |
| | | if (query.if_zhishu === "0") { |
| | |
| | | this.OnSize(); |
| | | this.SetChartStyle(); |
| | | this.$nextTick(() => { |
| | | // this.CreateMinuteChart(); |
| | | this.CreateKLineChart(); |
| | | this.CreateMinuteChart(); |
| | | this.CreateKLineChart(); |
| | | // this.timerss = setInterval(() => { |
| | | // this.CreateKLineChart(); |
| | | // console.log(this.KLinePeriodMenu); |
| | | // // this.KLineChart.ChangePeriod(this.KLinePeriodMenu[this.KLinePeriodIndex].ID); |
| | | // //此处为了 让k线实时刷新 |
| | | // this.OnClickKLinePeriodMenu(this.KLinePeriodIndex, 0, 'kline') |
| | | // this.OnClickKLinePeriodMenu(this.KLinePeriodIndex, this.KLinePeriodMenu[this.KLinePeriodIndex], 'kline') |
| | | // // this.OnClickKLinePeriodMenu(this.KLinePeriodIndex+1, this.KLinePeriodMenu[this.KLinePeriodIndex+1], 'kline') |
| | | // // this.OnClickKLinePeriodMenu(this.KLinePeriodIndex-1, this.KLinePeriodMenu[this.KLinePeriodIndex-1], 'kline') |
| | | // }, 5000); |
| | | }); |
| | | let that = this; |
| | | window.onresize = _.debounce(this.OnSize, 200); |
| | |
| | | that.OnSize(); |
| | | }); |
| | | }, |
| | | |
| | | beforeDestroy() { |
| | | clearInterval(this.timerss); // 在组件销毁前清除定时器 |
| | | this.timerss = null |
| | | }, |
| | | methods: { |
| | | |
| | | OnSize() { |
| | | var width = this.$refs.right.clientWidth; |
| | | // var rightTab = this.$refs.rightTab |
| | |
| | | }, |
| | | |
| | | CreateMinuteChart() { |
| | | if (this.Chart) return; |
| | | // if (this.Chart) return; |
| | | |
| | | var option = DefaultData.GetMinuteOption(); |
| | | option.Symbol = this.Symbol; |
| | |
| | | option.Symbol = this.Symbol; |
| | | option.NetworkFilter = (data, callback) => { |
| | | this.NetworkFilter(data, callback); |
| | | |
| | | // this.NetworkFilter(data, callback); |
| | | }; // 网络请求回调函数 |
| | | var chart = HQChart.Chart.JSChart.Init(this.$refs.kline2); |
| | | HQChart.Chart.JSChart.GetResource().FrameLogo.Text = null; |
| | |
| | | item, |
| | | type // K线周期 |
| | | ) { |
| | | console.log('1'); |
| | | //分时额外处理才注释的 |
| | | this.chartType = type; |
| | | this.KLinePeriodIndex = index; |
| | |
| | | >₹{{ singDetails.preclose_px }}</span |
| | | > |
| | | </div> |
| | | <div class="rights bots"> |
| | | <div class="rights bots"> |
| | | <span class="titles">{{ $t("hj75") }}</span> |
| | | <!-- <span :class="singDetails.preclose_px < 0 ? 'number green' : 'number red'">{{ |
| | | singDetails.today_min |
| | |
| | | </div> |
| | | </div> |
| | | <div class="k_line_detail"> |
| | | <Kline :type="singDetails.type" /> |
| | | <Kline :key="key" :type="singDetails.type" /> |
| | | </div> |
| | | <div |
| | | class="priect_top_bottom" |
| | |
| | | newsdetailList: [], |
| | | bayType: "", |
| | | timer: null, |
| | | key:0, |
| | | }; |
| | | }, |
| | | components: { |
| | |
| | | } else { |
| | | this.timer = setInterval(() => { |
| | | this.getSingDetails(); |
| | | }, 500); |
| | | }, 5000); |
| | | } |
| | | this.getOpation(); |
| | | // this.$Lazyload(); |
| | |
| | | .top_now { |
| | | width: 100%; |
| | | // height: 65%; |
| | | font-size: 0.741rem; |
| | | font-size: 25px; |
| | | display: flex; |
| | | align-items: center; |
| | | |
| | | font-weight: bold; |
| | | span { |
| | | font-weight: 500; |
| | | } |
| | |
| | | |
| | | <van-col span="3"> |
| | | <div style="text-align: right"> |
| | | {{ (item.gid || item.stockGid) == "nse" ? "NSE" : "BSE" }} |
| | | {{ (item.gid || item.stockGid).toUpperCase() }} |
| | | </div> |
| | | </van-col> |
| | | |
| | |
| | | <div class="sport-content-title2" > |
| | | {{ $t("盈虧") }} ({{ activeObj.symbolCode }}) |
| | | </div> |
| | | <div class="sport-content-text" style="color:#3e9976;"> |
| | | <div class="sport-content-text2" :style="item.profitAndLoseParent.charAt(0)=='-'?'color:#cc1b1b;':'color:#3e9976;'"> |
| | | ₹{{ item.profitAndLose | _toLocaleString }} |
| | | </div> |
| | | </div> |
| | |
| | | <div class="sport-content-title2"> |
| | | {{ $t("hj141") }} ({{ activeObj.symbolCode }}) |
| | | </div> |
| | | <div class="sport-content-text2" style="color:#3e9976;"> |
| | | <div class="sport-content-text2" :style="item.profitAndLoseParent.charAt(0)=='-'?'color:#cc1b1b;':'color:#3e9976;'"> |
| | | {{ item.profitAndLoseParent }} |
| | | </div> |
| | | </div> |
| | |
| | | <van-col span="8"> |
| | | <div style="text-align: right"> |
| | | <div class="sport-content-title2">{{ $t("倉位(股)") }}</div> |
| | | <div class="sport-content-text">{{ item.orderNum }}</div> |
| | | <div class="sport-content-text2">{{ item.orderNum }}</div> |
| | | </div></van-col |
| | | > |
| | | </van-row> |
| | |
| | | <div class="sport-content-title2"> |
| | | {{ $t("盈虧") }} ({{ activeObj.symbolCode }}) |
| | | </div> |
| | | <div class="sport-content-text" style="color:#3e9976;"> |
| | | <div class="sport-content-text2" :style="item.profitAndLoseParent.charAt(0)=='-'?'color:#cc1b1b;':'color:#3e9976;'"> |
| | | ₹{{ item.profitAndLose | _toLocaleString }} |
| | | </div> |
| | | </div> |
| | |
| | | <div class="sport-content-title2"> |
| | | {{ $t("hj141") }} ({{ activeObj.symbolCode }}) |
| | | </div> |
| | | <div class="sport-content-text2" style="color:#3e9976;"> |
| | | <div class="sport-content-text2" :style="item.profitAndLoseParent.charAt(0)=='-'?'color:#cc1b1b;':'color:#3e9976;'"> |
| | | {{ item.profitAndLoseParent }} |
| | | </div> |
| | | </div> |
| | |
| | | <van-col span="8"> |
| | | <div style="text-align: right"> |
| | | <div class="sport-content-title2">{{ $t("倉位(股)") }}</div> |
| | | <div class="sport-content-text">{{ item.orderNum }}</div> |
| | | <div class="sport-content-text2">{{ item.orderNum }}</div> |
| | | </div></van-col |
| | | > |
| | | </van-row> |