1
PC-20250623MANY\Administrator
2025-09-23 797f0cc9c7da1ba910d5c702c130b08692ab3d1c
1
7 files modified
127 ■■■■■ changed files
src/locales/cht.json 3 ●●●● patch | view | raw | blame | history
src/locales/en.json 3 ●●●● patch | view | raw | blame | history
src/locales/zh.json 3 ●●●● patch | view | raw | blame | history
src/page/kline/components/kLine.vue 113 ●●●●● patch | view | raw | blame | history
src/page/kline/index.vue 2 ●●● patch | view | raw | blame | history
src/page/login/register.vue 1 ●●●● patch | view | raw | blame | history
src/page/user/myOrder.vue 2 ●●● patch | view | raw | blame | history
src/locales/cht.json
@@ -711,5 +711,6 @@
  "可卖": "可賣",
  "每週盈利": "每週盈利",
  "平仓盈亏":"平倉盈虧",
  "获取验证码":"獲取驗證碼"
  "获取验证码":"獲取驗證碼",
  "hjsfz": "15分鐘"
}
src/locales/en.json
@@ -711,5 +711,6 @@
  "可卖": "For sale",
  "每週盈利": "Weekly profit",
  "平仓盈亏":"Closing position profit and loss",
  "获取验证码":"Obtain verification code"
  "获取验证码":"Obtain verification code",
  "hjsfz": "15 min"
}
src/locales/zh.json
@@ -711,5 +711,6 @@
  "可卖": "可卖",
  "每週盈利": "每周盈利",
  "平仓盈亏":"平仓盈亏",
  "获取验证码":"获取验证码"
  "获取验证码":"获取验证码",
  "hjsfz": "15分钟"
}
src/page/kline/components/kLine.vue
@@ -6,60 +6,27 @@
          <div class="periodWrap kline_periodWrap" ref="kline_periodWrap">
            <!-- DWM 分 -->
            <div class="btnGroup" style="position: relative">
              <div
                class="btn2"
                v-for="(item, index) in KLinePeriodMenu"
                :class="{ active: KLinePeriodIndex == index }"
                :key="item.ID"
                @click="OnClickKLinePeriodMenu(index, item, 'kline')"
              >
              <div class="btn2" v-for="(item, index) in KLinePeriodMenu" :class="{ active: KLinePeriodIndex == index }"
                :key="item.ID" @click="OnClickKLinePeriodMenu(index, item, 'kline')">
                <span>{{ item.Name }}</span>
              </div>
              <div
                style="position: absolute; right: 0; top: 25px; z-index: 99"
                v-if="isShow == true"
              >
                <div
                  class="btnGroup"
                  v-show="IsShowRightMenu"
                  style="display: flex; flex-direction: column"
                >
                  <div
                    class="btn"
                    :class="{ active: KLineRightIndex == index }"
                    v-for="(item, index) in KLineRightMenu"
                    :key="item.ID"
                    style="padding: 10px"
                    @click="OnClickKLineRightMenu(index, item)"
                  >
              <div style="position: absolute; right: 0; top: 25px; z-index: 99" v-if="isShow == true">
                <div class="btnGroup" v-show="IsShowRightMenu" style="display: flex; flex-direction: column">
                  <div class="btn" :class="{ active: KLineRightIndex == index }" v-for="(item, index) in KLineRightMenu"
                    :key="item.ID" style="padding: 10px" @click="OnClickKLineRightMenu(index, item)">
                    {{ item.Name }}
                  </div>
                  <div
                    class="btn"
                    v-for="item in KLineIndexMenu"
                    :key="item.ID"
                    style="padding: 10px"
                    @click="ChangeKLineIndex(item)"
                  >
                  <div class="btn" v-for="item in KLineIndexMenu" :key="item.ID" style="padding: 10px"
                    @click="ChangeKLineIndex(item)">
                    {{ item.Name }}
                  </div>
                </div>
              </div>
            </div>
          </div>
          <div
            class="hqchart"
            id="hqchart_minute"
            ref="kline"
            v-show="chartType == 'minute'"
          ></div>
          <div
            class="hqchart"
            id="hqchart_kline"
            ref="kline2"
            v-show="chartType == 'kline'"
          ></div>
          <div class="hqchart" id="hqchart_minute" ref="kline" v-show="chartType == 'minute'"></div>
          <div class="hqchart" id="hqchart_kline" ref="kline2" v-show="chartType == 'kline'"></div>
        </div>
      </div>
    </div>
@@ -67,8 +34,8 @@
</template>
<script>
var _timers = []
import * as echarts from "echarts";
import _ from "lodash";
import HQChart from "hqchart";
import "hqchart/src/jscommon/umychart.resource/css/tools.css";
@@ -1071,14 +1038,18 @@
      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("hjsfz"),
      ID: 6
    },
    {
      Name: i18n.t("hj92"),
      ID: 7
@@ -1139,9 +1110,8 @@
      VolChartHeight: 10,
      chartType: "kline",
      timerss: null,
      isShow: false,
      xData: []
      xData: [],
    };
  },
@@ -1171,17 +1141,6 @@
    this.$nextTick(() => {
      // this.CreateMinuteChart();
      this.CreateKLineChart();
      // this.timerss = setInterval(() => {
      //   // this.KLineChart = null
      //   // this.CreateMinuteChart();
      //   // this.CreateKLineChart();
      //   console.log(this.KLinePeriodMenu);
      //   //此处为了 让k线实时刷新
      //   this.OnClickKLinePeriodMenu(this.KLinePeriodIndex, 0, 'kline')
      //   this.OnClickKLinePeriodMenu(this.KLinePeriodIndex, this.KLinePeriodMenu[this.KLinePeriodIndex],
      //     'kline')
      // }, 3000);
    });
    let that = this;
    window.onresize = _.debounce(this.OnSize, 200);
@@ -1216,20 +1175,16 @@
    });
  },
  beforeDestroy() {
    clearInterval(this.timerss); // 在组件销毁前清除定时器
    this.timerss = null;
    this.clearTime();
  },
  methods: {
    // 清除所有定时器
    clearTime() {
      // 创建一个额外的定时器以获取当前最大定时器 ID
      let lastIntervalId = setInterval(() => {}, 1000);
      // 遍历并清除所有定时器
      for (let i = 1; i <= lastIntervalId; i++) {
        clearInterval(i);
        clearTimeout(i);
      }
      _timers.forEach(id => {
        clearInterval(id);
        clearTimeout(id);
      });
      _timers = [];
    },
    OnSize() {
      var width = this.$refs.right.clientWidth;
@@ -1335,7 +1290,7 @@
      item,
      type // K线周期
    ) {
      this.clearTime();
      this.clearTime()
      //分时额外处理才注释的
      this.chartType = type;
      this.KLinePeriodIndex = index;
@@ -1371,9 +1326,11 @@
      EastMoney.HQData.Log("[HQChartDemo::NetworkFilter] data", data);
      
      this.getFilter(data, callback);
      this.timerss = setInterval(() => {
      let timerId = setInterval(() => {
        this.getFilter(data, callback);
      }, 5000);
      }, 2000);
      _timers.push(timerId);
    },
    getFilter(data, callback) {
      switch (data.Name) {
@@ -1419,9 +1376,11 @@
</script>
<style lang="less">
@animation-duration: 0.3s;
.parameter{
  background-color: #333 !important;
}
.box {
  width: 100%;
  height: 100%;
src/page/kline/index.vue
@@ -504,7 +504,7 @@
      this.getSingDetails();
      this.timer = setInterval(() => {
        this.getSingDetails();
      }, 5000);
      }, 2000);
    }
    this.getOpation();
    this.getUserInfo();
src/page/login/register.vue
@@ -153,6 +153,7 @@
          };
          let data = await api.register(opts);
          if (data.status === 0) {
            Notify({ type: "success", message: this.$t('hj34') });
            setTimeout(() => {
              this.$router.push("/login");
            }, 1000);
src/page/user/myOrder.vue
@@ -346,7 +346,7 @@
    this.getMoney();
    teimss = setInterval(() => {
      this.getMoney();
    }, 10000);
    }, 3000);
  },
  beforeDestroy() {
    clearInterval(teimss);