zzzz
2024-04-30 7a57bcc3208f804cde9915d361f1a738a4e88e1d
src/page/home.vue
@@ -3,38 +3,39 @@
    <!--    //头部组件-->
    <div class="px-32">
      <ex-header :unread_num="`${unreadMsg_num}`"></ex-header>
      <ioe-swiper />
      <van-notice-bar
        class="font-26 textColor"
        left-icon="volume-o"
        :scrollable="false"
        background="transparent"
        :text="announceTitle"
      >
        <div slot="left-icon" class="pr-13 flex items-center">
          <img class="w-36 h-36" src="../assets/Horn.png" alt="" />
        </div>
        <van-swipe
          vertical
          class="notice-swipe"
          :autoplay="2000"
          :show-indicators="false"
      <ioe-swiper>
        <van-notice-bar
          class="font-26 textColors"
          left-icon="volume-o"
          :scrollable="false"
          background="transparent"
          :text="announceTitle"
        >
          <van-swipe-item
            v-for="item in announceList"
            :key="item.id"
            @click="toAnnounceDetail(item.id)"
            >{{ item.title }}</van-swipe-item
          <div slot="left-icon" class="pr-13 flex items-center">
            <img class="w-36 h-36" src="../assets/Horn.png" alt="" />
          </div>
          <van-swipe
            vertical
            class="notice-swipe"
            :autoplay="2000"
            :show-indicators="false"
          >
        </van-swipe>
        <div
          class="ml-20 flex items-center"
          slot="right-icon"
          @click.stop="$router.push('/announce')"
        >
          <img class="w-36 h-36" src="../assets/more.png" alt="" />
        </div>
      </van-notice-bar>
            <van-swipe-item
              v-for="item in announceList"
              :key="item.id"
              @click="toAnnounceDetail(item.id)"
              >{{ item.title }}</van-swipe-item
            >
          </van-swipe>
          <!-- <div
            class="ml-20 flex items-center"
            slot="right-icon"
            @click.stop="$router.push('/announce')"
          >
            <img class="w-36 h-36" src="../assets/more.png" alt="" />
          </div> -->
        </van-notice-bar>
      </ioe-swiper>
    </div>
    <div
      class="pt-40 contRound"
@@ -45,12 +46,6 @@
      "
    >
      <ex-nav></ex-nav>
      <!--   <div class="h-150 text-white rounded-lg mt-34 flex items-center justify-center contNav"
        @click="$router.push('/wantBuy')">
        <img :src="require(`../assets/theme/${theme}/image/c2c1.png`)" alt="" class="w-96 h-96" />
        <div class="c2cbg w-616 h-56 lh-56 font-30 pl-50 box-border" :class="theme == 'dark' ? 'dark' : 'light'">{{
          $t('C2C快捷交易') }}</div>
      </div> -->
      <list-quatation :listData="qList" @listSort="listSort" />
      <div class="addBox" v-show="showSave" @click="closeSaveBox">
        <div class="add">
@@ -142,6 +137,7 @@
      coinList: "home/coinList",
      currency: "home/currency",
      coinArr: "home/coinArr",
      newcoinArr: "home/newcoinArr",
      hotArr: "home/hotArr",
      userInfo: "user/userInfo",
      theme: "home/theme",
@@ -174,7 +170,7 @@
    };
  },
  methods: {
    ...mapActions("home", [SET_COIN_LIST]),
    ...mapActions("home", [SET_COIN_LIST, "NEW_CION_LIST"]),
    fetchUnread() {
      // 获取未读
      _getUnreadMsg().then((unread_num) => {
@@ -187,7 +183,12 @@
    },
    async fetchQList() {
      // 获取行情
      const list = await _getHomeList(this.coinArr.join(",")).catch(() => {
      // console.log(this.newcoinArr, "[[[[[]]]]]");
      const mainArray = this.coinArr.filter(
        (item) => !this.newcoinArr.includes(item)
      );
      const list = await _getHomeList(mainArray.join(",")).catch(() => {
        this.timeout = setTimeout(() => {
          this.fetchQList();
        }, 1000);
@@ -336,6 +337,7 @@
    },
  },
  async created() {
    await this.NEW_CION_LIST();
    this.getIsSave();
    this.getNews();
    this.getPopupNews();
@@ -345,6 +347,7 @@
  async activated() {
    this.getNews();
    this.getPopupNews();
    await this.NEW_CION_LIST();
    await this.SET_COIN_LIST();
    this.startTimeout();
    if (this.userInfo.token) {
@@ -665,4 +668,7 @@
    transform: translatex(-50%);
  }
}
.textColors {
  color: #fff !important;
}
</style>