jhzh
2025-04-03 db12897dc68c68d40c557aa59ad78022e2b30ac2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<template>
  <div class="p-md">
    <view :style="{height:taskHeight+'px'}"></view>
    <div class="title fn-22 color-light">Option</div>
    <div class="group">
      <table class="w-max">
          <thead>
              <tr class="fn-sm">
                  <th class="fn-left">{{$t('option.a0')}}</th>
                  <th>{{$t('option.e4')}}</th>
                  <th class="fn-right">{{$t('option.a1')}}</th>
              </tr>
          </thead>
        <template v-for="parentItem in list">
          <thead :key="parentItem.guessPairsName">
            <tr>
              <th colspan="3" class="fn-left color-light p-y-md">
                <div class="d-inline-block h-10 w-4 bg-danger"></div>
               {{parentItem.guessPairsName}}
              </th>
            </tr>
          </thead>
          <tbody :key="parentItem.guessPairsName+'1'">
            <tr v-for="item in parentItem.scenePairList" :key="item.pair_time_name" class="link-active" @click="$emit('check',item);$emit('close')">
              <td class="color-light">
               {{item.pair_time_name|coinText}}
              </td>
              <td>
                <span :class="item.increase>=0?'color-buy':'color-sell'">{{item.increaseStr}}</span>
              </td>
              <td class="fn-right">
                 <van-count-down :time="item.seconds*1000">
                  </van-count-down>
              </td>
            </tr>
          </tbody>
        </template>
      </table>
    </div>
  </div>
</template>
<script>
import Option from '@/api/option'
import { mapState } from "vuex";
export default {
  data(){
    return {
      list:[],
      taskHeight:0
    }
  },
  filters:{
    coinText(str){
      return str.replace('/USDT','').replace('-','·')
    }
  },
  computed:{
    ...mapState({
      ws:'ws'
    })
  },
  methods:{
       // 获取交易对
    sceneListByPairs(){
      Option.sceneListByPairs().then(res=>{
        this.list = res.data
      })
    }
  },
   created(){
    this.sceneListByPairs()
     uni.getSystemInfo({
        success:(obj)=>{
          this.taskHeight = obj.statusBarHeight
        }
      })
  }
}
</script>