1
李凌
2025-09-11 9495998e97dd04d4bdfcf32dfd4d49cd45c1fe32
1
6 files modified
16 ■■■■ changed files
src/components/Transform/cryptos-trade-deep-data/index.vue 2 ●●●●● patch | view | raw | blame | history
src/components/Transform/perpetual-open/index.vue 2 ●●● patch | view | raw | blame | history
src/components/trade-deep-data/index.vue 6 ●●●●● patch | view | raw | blame | history
src/views/cryptos/PerpetualContract/index.vue 2 ●●●●● patch | view | raw | blame | history
src/views/foreign/foreignPerpetualContract/deliveryContract.vue 2 ●●●●● patch | view | raw | blame | history
src/views/trade/index.vue 2 ●●●●● patch | view | raw | blame | history
src/components/Transform/cryptos-trade-deep-data/index.vue
@@ -160,6 +160,8 @@
      })
    },
    startDeepSocket() { // 开启socket链接 
      this.redData = []
      this.greenData = []
      this.closeSocket()
      this.socket = new WebSocket(`${WS_URL}/3/${this.symbol}`)
      this.socket.onmessage = (evt) => {
src/components/Transform/perpetual-open/index.vue
@@ -257,7 +257,7 @@
                    '%,rgba(246,70,93,.1) 100%)',
                }"> -->
              <div v-if="showType == 0 || showType == 2" class="w-290 flex justify-between pt-1 font-26"
              <div v-show="(showType == 0 || showType == 2) " class="w-290 flex justify-between pt-1 font-26"
                v-for="(item, index) in redData" :key="item + index" @click="onQuickPrice(item.price)" :style="{
                  background:
                    `linear-gradient(to right,${THEME == 'dark' ? '#131A2E' : '#fff'
src/components/trade-deep-data/index.vue
@@ -20,8 +20,8 @@
        <div class="green"></div>
      </div>
    </div>
    <div class="flex font-10 orderbook sell" v-for="(item, index) in greenData" :key="index" @click="onPrice(item.price)"
      :style="{
    <div class="flex font-10 orderbook sell" v-for="(item, index) in greenData" :key="index"
      @click="onPrice(item.price)" :style="{
        'background': `linear-gradient(to right,${THEME == 'dark' ? '#131a2e' : '#ffffff'} 0%` +
          (item.amount / greenData[greenData.length - 1].amount) * 100 + '%,rgba(69, 46, 66, 1) ' +
          (item.amount / greenData[greenData.length - 1].amount) * 100 + '%,rgba(69, 46, 66, 1) 100%)'
@@ -81,6 +81,8 @@
  },
  methods: {
    startDeepSocket() { // 开启socket链接
      this.redData = []
      this.greenData = []
      this.closeSocket()
      this.socket = new WebSocket(`${WS_URL}/3/${this.symbol}`)
      this.socket.onmessage = (evt) => {
src/views/cryptos/PerpetualContract/index.vue
@@ -445,6 +445,8 @@
      }
    },
    fetchDeepData(symbol) {
      this.asks = []
      this.bids = []
      _getDeepData(symbol).then(data => { // 获取深度
        this.handleDeep(data)
        this.startDeepSocket() // socket
src/views/foreign/foreignPerpetualContract/deliveryContract.vue
@@ -163,6 +163,8 @@
}
const startDeepSocket = () => {
    asks.value = []
    bids.value = []
    sockets.value.deep = new WebSocket(`${WS_URL}/3/${currentSymbol.value}`)
    sockets.value.deep.onmessage = (evt) => {
        const { data } = evt
src/views/trade/index.vue
@@ -493,6 +493,8 @@
      }
    },
    startDeepSocket() {
      this.asks = []
      this.bids = []
      this.sockets.deep = new WebSocket(`${WS_URL}/3/${this.symbol}`)
      this.sockets.deep.onmessage = (evt) => {
        const { data } = evt