lxf
2025-07-11 fd66f3c47027795370f363d74f2258491dd38542
src/components/Transform/contract-header/index.vue
@@ -14,6 +14,8 @@
            <div class="pl-10 w-160  font-28" :class="{ 'text-green': range > 0, 'text-red': range <= 0 }">{{ range || '--' }}%</div>
              <!-- 右上角小图标 -->
            <img src="@/assets/image/kline.png" class="w-44 h-44 right" alt="" @click="klineJump()">
         <img src="../../../assets/image/public/record.png" alt="record-img" class="w-64 h-35 pr-30 record-img"
           @click="goHistory" />
          </div>
          <!-- <div class="flex items-center">
                        <img src="../../assets/image/public/k-line.png" alt="line-img" class="w-38 h-35"
@@ -144,6 +146,21 @@
    }
  },
  methods: {
     goHistory() {
       if (this.$store.state.user.userInfo.token) {
         let type = 'cryptos'
         if (this.$route.query.type) {
           type = this.$route.query.type
         }
         const url = this.topIndex / 1 === 1 ? '/cryptos/perpetualHistory' : '/cryptos/deliveryContractHistory'
         this.$router.push({
           path: url, query: { symbol: this.symbol, type: type }
         });
       } else {
         this.$router.push('/login')
       }
     },
    onRoute(item) {
      if (this.$route.params.symbol !== item.symbol) {
        this.$router.push(`/cryptos/perpetualContract/${item.symbol}?selectIndex=${this.selectIndex}`)