1
PC-20250623MANY\Administrator
2025-08-30 bc3a812e4134c46f2c7f118de0cf7cbee7ef58c2
src/views/home/components/HomeLtr.vue
@@ -954,7 +954,7 @@
    ],
    SplashTitle: "loading...",
    Symbol: "600015.sh",
    IsAutoUpdate: true, // 是自动更新数据
    IsAutoUpdate: false, // 是自动更新数据
    AutoUpdateFrequency: 15000,
    IsApiPeriod: true,
    IsShowRightMenu: false, // 是否显示右键菜单
@@ -1069,14 +1069,14 @@
      Name: i18n.t("hj89"),
      ID: 2,
    },
    {
      Name: i18n.t("hj90"),
      ID: 4,
    },
    {
      Name: i18n.t("hj91"),
      ID: 5,
    },
    // {
    //   Name: i18n.t("hj90"),
    //   ID: 4,
    // },
    // {
    //   Name: i18n.t("hj91"),
    //   ID: 5,
    // },
    {
      Name: i18n.t("hj92"),
      ID: 7,
@@ -1145,7 +1145,23 @@
  mounted() {
    this.init();
  },
  beforeDestroy() {
    if (this.timerss) {
      clearInterval(this.timerss);
    }
    this.clearTime();
  },
  methods: {
    // 清除所有定时器
    clearTime() {
      // 创建一个额外的定时器以获取当前最大定时器 ID
      let lastIntervalId = setInterval(() => {}, 1000);
      // 遍历并清除所有定时器
      for (let i = 1; i <= lastIntervalId; i++) {
        clearInterval(i);
        clearTimeout(i);
      }
    },
    init() {
      this.OnSize();
      this.SetChartStyle();
@@ -1200,7 +1216,8 @@
    SetChartStyle() {
      EastMoney.HQData.SetMinuteChartCoordinate();
      var blackStyle = HQChart.Chart.HQChartStyle.GetStyleConfig(
        HQChart.Chart.STYLE_TYPE_ID.WHITE_ID
        // HQChart.Chart.STYLE_TYPE_ID.WHITE_ID // 白色风格
        HQChart.Chart.STYLE_TYPE_ID.BLACK_ID // 黑色风格
      ); // 读取黑色风格配置
      blackStyle.UpBarColor = "#449b54"; //上涨
@@ -1208,6 +1225,7 @@
      HQChart.Chart.JSChart.SetStyle(blackStyle);
    },
    handleClick(tab) {
      this.clearTime();
      this.KLineChart.ChangePeriod(tab.$attrs.Id);
    },
@@ -1242,10 +1260,8 @@
      data,
      callback // 第3方数据替换接口
    ) {
      if (this.timerss) {
        clearInterval(this.timerss);
        this.timerss = null;
      }
      EastMoney.HQData.Log("[HQChartDemo::NetworkFilter] data", data);
      this.timeChange(data, callback);
      this.timerss = setInterval(() => {
        this.timeChange(data, callback);
@@ -1303,14 +1319,14 @@
    #hqchart_minute {
      height: 0;
      flex: 1;
      background-color: #fff;
      // background-color: #fff;
      position: relative;
    }
    #hqchart_kline {
      height: 0;
      flex: 1;
      background-color: #fff;
      // background-color: #fff;
      position: relative;
    }
  }