dcc
2024-06-07 d5381ec06ab5f549fade867c3a874de613bdd5d4
src/components/trade-head/index.vue
@@ -5,18 +5,22 @@
      <div class="pl-30 pr-30">
        <div class="flex justify-between pt-45">
          <div class="flex">
            <!-- <img
              v-if="isReturn"
              :src="require(`@/assets/theme/${theme}/image/icon_back.png`)"
              class="w-40 h-40 back mr-50"
              alt=""
            <span
              @click="
                kineType
                  ? $router.push(`/trade/${symbol}`)
                  : $router.push(`/perpetualContract/${symbol}`)
              "
            />
            <img
            >
              <img
                v-if="isReturn"
                :src="require(`@/assets/theme/${theme}/image/icon_back.png`)"
                class="w-40 h-40 back mr-50"
                alt=""
              />
            </span>
            <!-- <img
              :src="require(`@/assets/theme/${theme}/image/convert.png`)"
              alt="convert-img"
              class="w-35 h-35"
@@ -24,7 +28,7 @@
            /> -->
            <div class="flex flex-col pl-21" @click="onSidebar">
              <div class="font-35 textColor">
                {{ (symbol && symbol.toUpperCase()) || "--" }}/USDT
                {{ symbol | _symbolName(1) }}
              </div>
            </div>
            <div
@@ -36,34 +40,37 @@
            </div>
          </div>
          <div class="flex items-center" v-if="islevel">
            <span @click="changeModel()">
              <img
                class="w-32 h-35"
                :src="require(`@/assets/theme/${theme}/image/sun.png`)"
                alt=""
              />
            </span>
            <span @click="onCollect">
              <img
                :src="
                  require(`@/assets/image/icon-star${
                    collected === '1' ? '_active' : ''
                  }.png`)
                "
                class="w-30 h-30 mr-10 ml-20"
              />
            </span>
            <span @click="openRecord()">
              <img
                src="@/assets/image/public/record.png"
                class="w-32 h-35 ml-20"
            /></span>
          </div>
          <span @click="$router.push(`/trendDetails/${symbol}?kineType=trade`)">
            <img
              @click="changeModel()"
              class="w-32 h-35"
              :src="require(`@/assets/theme/${theme}/image/sun.png`)"
              v-if="isTrade"
              :src="require(`@/assets/3x/names14.png`)"
              class="w-44 h-44 right"
              alt=""
            />
            <img
              :src="
                require(`@/assets/image/icon-star${
                  collected === '1' ? '_active' : ''
                }.png`)
              "
              class="w-30 h-30 mr-10 ml-20"
              @click="onCollect"
            />
            <img
              src="@/assets/image/public/record.png"
              class="w-32 h-35 ml-20"
              @click="openRecord()"
            />
          </div>
          <img
            v-if="isTrade"
            :src="require(`@/assets/3x/names14.png`)"
            class="w-44 h-44 right"
            alt=""
            @click="$router.push(`/trendDetails/${symbol}?kineType=trade`)"
          />
          </span>
        </div>
      </div>
    </div>
@@ -97,7 +104,10 @@
          @click="onRoute(item)"
        >
          <div>
            <div class="font-700 textColor">{{ item.name || "--" }}</div>
            <!-- {{ JSON.stringify(item) }} -->
            <div class="font-700 textColor">
              {{ item.symbol | _symbolName(1) }}
            </div>
            <div v-if="!kineType" class="text-grey mt-10">{{ title }}</div>
          </div>
          <div class="text-right">
@@ -172,6 +182,7 @@
    ...mapGetters({
      coinList: "home/coinList",
      theme: "home/theme",
      newcoinArr: "home/newcoinArr",
    }),
  },
  data() {
@@ -191,6 +202,9 @@
      // { name:"ADA/USDT",close:"0.493085",change_ratio:"-4.08"},
      //]
    };
  },
  mounted() {
    this.NEW_CION_LIST();
  },
  watch: {
    symbol(val) {
@@ -218,7 +232,7 @@
    }
  },
  methods: {
    ...mapMutations("home", ["SET_THEME"]),
    ...mapMutations("home", ["SET_THEME", "NEW_CION_LIST"]),
    onRoute(item) {
      if (this.islevel) {
        if (this.$route.params.symbol !== item.symbol) {
@@ -251,7 +265,10 @@
    },
    fetchList() {
      // 获取行情
      _getHomeList(this.coins.join(",")).then((list) => {
      const mainArray = this.coins.filter(
        (item) => !this.newcoinArr.includes(item)
      );
      _getHomeList(mainArray.join(",")).then((list) => {
        // console.log(list)
        this.list = list;
        if (this.timeout) {