lxf
2025-06-12 4e9d0bd63532b9c15a34d1b4d5d57c12d51bd893
src/page/perpetualContract/index.vue
@@ -154,6 +154,7 @@
      });
    }
    return {
      updateKey: 1,
      quote: {},
      initTimer: null,
      keyIndex: 0,
@@ -162,7 +163,7 @@
      timer1: null, // tab切换动画
      timer2: null, // 交割合约底部持仓等的公用定时器
      balance: 0,
      symbol: "",
      symbol: "btc",
      price: "",
      range: "",
      stop_price_profit: "",
@@ -534,7 +535,8 @@
    this.init(symbol);
  },
  activated() {
    let symbol = this.$route.params.symbol;
    // let symbol = this.$route.params.symbol;
    let symbol = getStorage("symbol");
    let catchSymbol = getStorage("symbol");
    if (!symbol && catchSymbol) {
      symbol = catchSymbol;
@@ -546,6 +548,10 @@
    }
    this.symbol = symbol;
    this.init(symbol);
    this.currentType = this.$route.query.currentType
      ? this.$route.query.currentType
      : "long";
  },
  // beforeRouteEnter(to, from, next) {
  //     let { params: { symbol }, query: { selectIndex } } = to
@@ -581,11 +587,9 @@
    this.closeSocket();
    this.clearTimer();
  },
  activated() {
    this.currentType = this.$route.query.currentType
      ? this.$route.query.currentType
      : "long";
  },
  // activated() {
  // },
  beforeDestroy() {
    this.closeSocket();
    // this.clearTimeout(true)