| | |
| | | style="height: 50vh;width: 100%;" |
| | | @load="onLoad" |
| | | > |
| | | <van-row class="markets_item" v-for="item in stockList" :key="item.id"> |
| | | <van-row class="markets_item" v-for="item in stockList" :key="item.id" @click="toDetails(item)"> |
| | | <van-col span="14" class="item_n"> |
| | | <div class="flex-start"> |
| | | <span class="i_icon">{{ item.stock_type }}</span> |
| | |
| | | |
| | | // this.CreateKLineChart(); |
| | | this.$nextTick(() => { |
| | | // this.timerss = setInterval(() => { |
| | | this.CreateMinuteChart(); |
| | | this.CreateKLineChart(); |
| | | // }, 3000); |
| | | // this.CreateMinuteChart(); |
| | | // this.CreateKLineChart(); |
| | | |
| | | // this.timerss = setInterval(() => { |
| | | // // this.KLineChart = null |
| | | // // this.CreateMinuteChart(); |
| | |
| | | beforeDestroy() { |
| | | clearInterval(this.timerss); // 在组件销毁前清除定时器 |
| | | this.timerss = null; |
| | | }, |
| | | destroyed() { |
| | | clearInterval(this.timerss); // 在组件销毁前清除定时器 |
| | | }, |
| | | methods: { |
| | | OnSize() { |
| | |
| | | chart.SetOption(option); |
| | | this.Chart = chart; |
| | | }, |
| | | |
| | | // k线图创建 |
| | | CreateKLineChart() { |
| | | if (this.KLineChart) return; |
| | | |
| | |
| | | option.Symbol = this.Symbol; |
| | | |
| | | option.NetworkFilter = (data, callback) => { |
| | | console.log("data, callback", data, callback); |
| | | |
| | | this.NetworkFilter(data, callback); |
| | | }; // 网络请求回调函数 |
| | | var chart = HQChart.Chart.JSChart.Init(this.$refs.kline2); |
| | |
| | | data, |
| | | callback // 第3方数据替换接口 |
| | | ) { |
| | | EastMoney.HQData.Log("[HQChartDemo::NetworkFilter] data", data); |
| | | // EastMoney.HQData.Log("[HQChartDemo::NetworkFilter] data", data); |
| | | if (this.timerss) { |
| | | clearInterval(this.timerss); |
| | | this.timerss = null; |
| | |
| | | }, |
| | | |
| | | created() { |
| | | // 进入页面的时候清除所以得计时器,防止页面切换的时候出现多个定时器 |
| | | let end = setTimeout(function() {}, 0); |
| | | for (let i = 0; i <= end; i++) { |
| | | clearTimeout(i); |
| | | clearInterval(i); |
| | | } |
| | | |
| | | const { query } = this.$route; |
| | | this.kLineDetails = query; |
| | | if (query.if_us === "1") { |
| | |
| | | beforeDestroy() { |
| | | this.clearInterval(this.timer); // 在组件销毁前清除定时器 |
| | | }, |
| | | destroyed() { |
| | | this.clearInterval(this.timer); // 在组件销毁前清除定时器 |
| | | }, |
| | | // beforeDestroy() { |
| | | // this.Klinetype = false; |
| | | // window.clearInterval() |
| | |
| | | { |
| | | text: "中文", |
| | | lang: "zh-CN" |
| | | }, |
| | | } |
| | | // { |
| | | // text: "हिंदी", |
| | | // lang: "hi" |
| | |
| | | </script> |
| | | |
| | | <style scoped lang="less"> |
| | | @green: #c4d600; |
| | | @green: #0e7ddd; |
| | | @Black1: #13161e; |
| | | |
| | | .login_footer { |
| | |
| | | .tui-first { |
| | | display: flex; |
| | | align-items: center; |
| | | color: #0e7ddd; |
| | | color: @green; |
| | | font-size: 0.4rem; |
| | | } |
| | | .symbol { |
| | |
| | | routes: [ |
| | | { |
| | | path: "/", |
| | | redirect: "/new-list" |
| | | redirect: "/markets" |
| | | }, |
| | | // #region 7.2 新增路由------------------------------------- |
| | | // 新首页 |